Index: /ruby/branches/0.0/adl_parser/bin/adl_validator.rb
===================================================================
--- /ruby/branches/0.0/adl_parser/bin/adl_validator.rb	(revision 166)
+++ /ruby/branches/0.0/adl_parser/bin/adl_validator.rb	(revision 167)
@@ -7,5 +7,5 @@
 require 'net/http'
 
-module OpenEHR
+module OpenEhr
   module CommandLine
     class Arguments < Hash
@@ -40,5 +40,5 @@
             when /\A(http:\/\/.*)/
               name = $1
-              input = case response = Net::HTTP.get_response(URI.parse($1))
+              input = case response = Net::HTTP.get_response(Uri.parse($1))
                       when Net::HTTPSuccess   
                         response.body
@@ -74,6 +74,6 @@
 if __FILE__ == $0
   begin
-    arguments = OpenEHR::CommandLine::Arguments.new(ARGV)
-    validator = OpenEHR::CommandLine::ADLValidator.new(arguments)
+    arguments = OpenEhr::CommandLine::Arguments.new(ARGV)
+    validator = OpenEhr::CommandLine::ADLValidator.new(arguments)
     validator.run
   end
Index: /ruby/branches/0.0/adl_parser/lib/model.rb
===================================================================
--- /ruby/branches/0.0/adl_parser/lib/model.rb	(revision 166)
+++ /ruby/branches/0.0/adl_parser/lib/model.rb	(revision 167)
@@ -2,5 +2,5 @@
 
 
-module OpenEHR
+module OpenEhr
   module ADL
     module Model
Index: /ruby/branches/0.0/adl_parser/lib/parser.rb
===================================================================
--- /ruby/branches/0.0/adl_parser/lib/parser.rb	(revision 166)
+++ /ruby/branches/0.0/adl_parser/lib/parser.rb	(revision 167)
@@ -20,5 +20,5 @@
 
 
-module OpenEHR
+module OpenEhr
 
   module ADL
Index: /ruby/branches/0.0/adl_parser/lib/scanner.rb
===================================================================
--- /ruby/branches/0.0/adl_parser/lib/scanner.rb	(revision 166)
+++ /ruby/branches/0.0/adl_parser/lib/scanner.rb	(revision 167)
@@ -5,5 +5,5 @@
 
 
-module OpenEHR
+module OpenEhr
   module ADL
     module Scanner
@@ -138,13 +138,13 @@
             @parser = lambda do |input|
               Yaparc::Alt.new(Reserved.new,
-                              OpenEHR::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF.new,
-                              OpenEHR::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF.new,
-                              OpenEHR::ADL::Scanner::Common::ERR_V_QUALIFIED_TERM_CODE_REF.new,
-                              OpenEHR::ADL::Scanner::Common::V_TYPE_IDENTIFIER.new,
-                              OpenEHR::ADL::Scanner::Common::V_GENERIC_TYPE_IDENTIFIER.new,
-                              OpenEHR::ADL::Scanner::Common::V_STRING.new,
-                              OpenEHR::ADL::Scanner::Common::V_LOCAL_CODE.new,
-                              OpenEHR::ADL::Scanner::Common::V_REAL.new,
-                              OpenEHR::ADL::Scanner::Common::V_ISO8601_DURATION.new
+                              OpenEhr::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF.new,
+                              OpenEhr::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF.new,
+                              OpenEhr::ADL::Scanner::Common::ERR_V_QUALIFIED_TERM_CODE_REF.new,
+                              OpenEhr::ADL::Scanner::Common::V_TYPE_IDENTIFIER.new,
+                              OpenEhr::ADL::Scanner::Common::V_GENERIC_TYPE_IDENTIFIER.new,
+                              OpenEhr::ADL::Scanner::Common::V_STRING.new,
+                              OpenEhr::ADL::Scanner::Common::V_LOCAL_CODE.new,
+                              OpenEhr::ADL::Scanner::Common::V_REAL.new,
+                              OpenEhr::ADL::Scanner::Common::V_ISO8601_DURATION.new
                               )
             end
@@ -157,5 +157,5 @@
           def initialize
             @parser = lambda do |input|
-              reserved_parsers = OpenEHR::ADL::Scanner::DADL::RESERVED.map do |keyword| 
+              reserved_parsers = OpenEhr::ADL::Scanner::DADL::RESERVED.map do |keyword|
                 Yaparc::Tokenize.new(
                                      Yaparc::Literal.new(keyword[0])
@@ -163,9 +163,9 @@
               end
               Yaparc::Alt.new(Yaparc::Apply.new(Yaparc::Alt.new(*reserved_parsers)) do |match|
-                                OpenEHR::ADL::Scanner::Common::LOG.info("Reserved: #{match}")
-                                [OpenEHR::ADL::Scanner::DADL::RESERVED[match], OpenEHR::ADL::Scanner::DADL::RESERVED[match]]
+                                OpenEhr::ADL::Scanner::Common::LOG.info("Reserved: #{match}")
+                                [OpenEhr::ADL::Scanner::DADL::RESERVED[match], OpenEhr::ADL::Scanner::DADL::RESERVED[match]]
                               end,
                               Yaparc::Apply.new(Yaparc::Regex.new(/\A[a-z][a-zA-Z0-9_]*/)) do |match|
-                                OpenEHR::ADL::Scanner::Common::LOG.info("V_ATTRIBUTE_IDENTIFIER: #{match}")
+                                OpenEhr::ADL::Scanner::Common::LOG.info("V_ATTRIBUTE_IDENTIFIER: #{match}")
                                 [:V_ATTRIBUTE_IDENTIFIER, match]
                               end)
@@ -215,5 +215,5 @@
             @parser = lambda do |input|
               Yaparc::Apply.new(Yaparc::Regex.new(/\A[yY][yY][yY][yY]-[mM?X][mM?X]-[dD?X][dD?X][T\t][hH?X][hH?X]:[mM?X][mM?X]:[sS?X][sS?X]/)) do |match|
-                OpenEHR::ADL::Scanner::Common::LOG.info("V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN: #{match}")
+                OpenEhr::ADL::Scanner::Common::LOG.info("V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN: #{match}")
                 [:V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN, match]
               end
@@ -228,5 +228,5 @@
             @parser = lambda do |input|
               Yaparc::Apply.new(Yaparc::Regex.new(/\A[yY][yY][yY][yY]-[mM?X][mM?X]-[dD?X][dD?X]/)) do |match|
-                OpenEHR::ADL::Scanner::Common::LOG.info("V_ISO8601_DATE_CONSTRAINT_PATTERN: #{match}")
+                OpenEhr::ADL::Scanner::Common::LOG.info("V_ISO8601_DATE_CONSTRAINT_PATTERN: #{match}")
                 [:V_ISO8601_DATE_CONSTRAINT_PATTERN, match]
               end
@@ -241,5 +241,5 @@
             @parser = lambda do |input|
               Yaparc::Apply.new(Yaparc::Regex.new(/\A[hH][hH]:[mM?X][mM?X]:[sS?X][sS?X]/)) do |match|
-                OpenEHR::ADL::Scanner::Common::LOG.info("V_ISO8601_TIME_CONSTRAINT_PATTERN: #{match}")
+                OpenEhr::ADL::Scanner::Common::LOG.info("V_ISO8601_TIME_CONSTRAINT_PATTERN: #{match}")
                 [:V_ISO8601_TIME_CONSTRAINT_PATTERN, match]
               end
@@ -255,5 +255,5 @@
               Yaparc::Apply.new(Yaparc::Alt.new(Yaparc::Regex.new(/\AP[yY]?[mM]?[wW]?[dD]?T[hH]?[mM]?[sS]?/),
                                                 Yaparc::Regex.new(/\AP[yY]?[mM]?[wW]?[dD]?/))) do |match|
-                OpenEHR::ADL::Scanner::Common::LOG.info("V_ISO8601_DURATION_CONSTRAINT_PATTERN: #{match}")
+                OpenEhr::ADL::Scanner::Common::LOG.info("V_ISO8601_DURATION_CONSTRAINT_PATTERN: #{match}")
                 [:V_ISO8601_DURATION_CONSTRAINT_PATTERN, match]
               end
@@ -268,5 +268,5 @@
             @parser = lambda do |input|
               Yaparc::Apply.new(Yaparc::Regex.new(/\A[A-Z][a-zA-Z0-9_]*[ \n]*\</)) do |match|
-                OpenEHR::ADL::Scanner::Common::LOG.info("V_C_DOMAIN_TYPE: #{match}")
+                OpenEhr::ADL::Scanner::Common::LOG.info("V_C_DOMAIN_TYPE: #{match}")
                 [:START_V_C_DOMAIN_TYPE_BLOCK, match]
               end
@@ -282,17 +282,17 @@
                               V_ISO8601_DATE_CONSTRAINT_PATTERN.new,
                               V_ISO8601_TIME_CONSTRAINT_PATTERN.new,
-                              OpenEHR::ADL::Scanner::Common::V_ISO8601_DURATION.new,
+                              OpenEhr::ADL::Scanner::Common::V_ISO8601_DURATION.new,
                               V_C_DOMAIN_TYPE.new,
                               V_ISO8601_DURATION_CONSTRAINT_PATTERN.new,
                               Reserved.new,
-                              OpenEHR::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF.new,
-                              OpenEHR::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF.new,
-                              OpenEHR::ADL::Scanner::Common::ERR_V_QUALIFIED_TERM_CODE_REF.new,
-                              OpenEHR::ADL::Scanner::Common::V_TYPE_IDENTIFIER.new,
-                              OpenEHR::ADL::Scanner::Common::V_GENERIC_TYPE_IDENTIFIER.new,
-                              OpenEHR::ADL::Scanner::Common::V_STRING.new,
-                              OpenEHR::ADL::Scanner::Common::V_LOCAL_CODE.new,
-                              OpenEHR::ADL::Scanner::Common::V_REAL.new,
-                              OpenEHR::ADL::Scanner::Common::V_ISO8601_DURATION.new
+                              OpenEhr::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF.new,
+                              OpenEhr::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF.new,
+                              OpenEhr::ADL::Scanner::Common::ERR_V_QUALIFIED_TERM_CODE_REF.new,
+                              OpenEhr::ADL::Scanner::Common::V_TYPE_IDENTIFIER.new,
+                              OpenEhr::ADL::Scanner::Common::V_GENERIC_TYPE_IDENTIFIER.new,
+                              OpenEhr::ADL::Scanner::Common::V_STRING.new,
+                              OpenEhr::ADL::Scanner::Common::V_LOCAL_CODE.new,
+                              OpenEhr::ADL::Scanner::Common::V_REAL.new,
+                              OpenEhr::ADL::Scanner::Common::V_ISO8601_DURATION.new
                               )
             end
@@ -310,9 +310,9 @@
               end
               Yaparc::Alt.new(Yaparc::Apply.new(Yaparc::Alt.new(*reserved_parsers)) do |match|
-                                OpenEHR::ADL::Scanner::Common::LOG.info("Reserved: #{match}")
-                                [OpenEHR::ADL::Scanner::CADL::RESERVED[match], OpenEHR::ADL::Scanner::CADL::RESERVED[match]]
+                                OpenEhr::ADL::Scanner::Common::LOG.info("Reserved: #{match}")
+                                [OpenEhr::ADL::Scanner::CADL::RESERVED[match], OpenEhr::ADL::Scanner::CADL::RESERVED[match]]
                               end,
                               Yaparc::Apply.new(Yaparc::Regex.new(/\A[a-z][a-zA-Z0-9_]*/)) do |match|
-                                OpenEHR::ADL::Scanner::Common::LOG.info("V_ATTRIBUTE_IDENTIFIER: #{match}")
+                                OpenEhr::ADL::Scanner::Common::LOG.info("V_ATTRIBUTE_IDENTIFIER: #{match}")
                                 [:V_ATTRIBUTE_IDENTIFIER, match]
                               end)
Index: /ruby/branches/0.0/adl_parser/lib/shell.rb
===================================================================
--- /ruby/branches/0.0/adl_parser/lib/shell.rb	(revision 166)
+++ /ruby/branches/0.0/adl_parser/lib/shell.rb	(revision 167)
@@ -3,5 +3,5 @@
 require 'stringio'
 
-module OpenEHR
+module OpenEhr
   module Application
     class Shell
Index: /ruby/branches/0.0/adl_parser/lib/validator.rb
===================================================================
--- /ruby/branches/0.0/adl_parser/lib/validator.rb	(revision 166)
+++ /ruby/branches/0.0/adl_parser/lib/validator.rb	(revision 167)
@@ -3,5 +3,5 @@
 
 
-module OpenEHR
+module OpenEhr
   module ADL
 
Index: /ruby/branches/0.0/adl_parser/tests/parser_test.rb
===================================================================
--- /ruby/branches/0.0/adl_parser/tests/parser_test.rb	(revision 166)
+++ /ruby/branches/0.0/adl_parser/tests/parser_test.rb	(revision 167)
@@ -15,7 +15,7 @@
     assert_nothing_raised do
       result = @parser.parse(laboratory_request, 'openEHR-EHR-ITEM_TREE.Laboratory_request.v1.adl')
-      assert_instance_of OpenEHR::AM::Archetype::ARCHETYPE, result
-      assert_instance_of OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION, result.description
-      assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, result.definition
+      assert_instance_of OpenEhr::AM::Archetype::ARCHETYPE, result
+      assert_instance_of OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION, result.description
+      assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, result.definition
 #      assert_equal '', result.definition
     end
@@ -24,7 +24,7 @@
     assert_nothing_raised do
       result = @parser.parse(apgar, 'openEHR-EHR-OBSERVATION.apgar.v1.adl')
-      assert_instance_of OpenEHR::AM::Archetype::ARCHETYPE, result
-      assert_instance_of OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION, result.description
-      assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, result.definition
+      assert_instance_of OpenEhr::AM::Archetype::ARCHETYPE, result
+      assert_instance_of OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION, result.description
+      assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, result.definition
     end
 
Index: /ruby/branches/0.0/adl_parser/tests/scanner_test.rb
===================================================================
--- /ruby/branches/0.0/adl_parser/tests/scanner_test.rb	(revision 166)
+++ /ruby/branches/0.0/adl_parser/tests/scanner_test.rb	(revision 167)
@@ -4,12 +4,12 @@
 class YaparcParserTest < Test::Unit::TestCase
   def test_RootScanner
-    parser = OpenEHR::ADL::Scanner::DADL::RootScanner.new
-    assert_instance_of OpenEHR::ADL::Scanner::DADL::RootScanner,parser
+    parser = OpenEhr::ADL::Scanner::DADL::RootScanner.new
+    assert_instance_of OpenEhr::ADL::Scanner::DADL::RootScanner,parser
     result = parser.parse('')
   end
 
   def test_V_LOCAL_TERM_CODE_REF
-    parser = OpenEHR::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF.new
-    assert_instance_of OpenEHR::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF,parser
+    parser = OpenEhr::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF.new
+    assert_instance_of OpenEhr::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF,parser
     result = parser.parse('[en-us]')
     assert_instance_of Yaparc::Result::OK, result
@@ -17,6 +17,6 @@
 
   def test_V_QUALIFIED_TERM_CODE_REF
-    parser = OpenEHR::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF.new
-    assert_instance_of OpenEHR::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF,parser
+    parser = OpenEhr::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF.new
+    assert_instance_of OpenEhr::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF,parser
     result = parser.parse('[ISO_639::en]')
     assert_instance_of Yaparc::Result::OK, result
@@ -26,6 +26,6 @@
 
   def test_V_STRING
-    parser = OpenEHR::ADL::Scanner::Common::V_STRING.new
-    assert_instance_of OpenEHR::ADL::Scanner::Common::V_STRING,parser
+    parser = OpenEhr::ADL::Scanner::Common::V_STRING.new
+    assert_instance_of OpenEhr::ADL::Scanner::Common::V_STRING,parser
     result = parser.parse('"this is a string"')
     assert_instance_of Yaparc::Result::OK, result
@@ -35,6 +35,6 @@
 
   def test_V_REAL
-    parser = OpenEHR::ADL::Scanner::Common::V_REAL.new
-    assert_instance_of OpenEHR::ADL::Scanner::Common::V_REAL,parser
+    parser = OpenEhr::ADL::Scanner::Common::V_REAL.new
+    assert_instance_of OpenEhr::ADL::Scanner::Common::V_REAL,parser
     result = parser.parse('0.1')
     assert_instance_of Yaparc::Result::OK, result
@@ -46,6 +46,6 @@
 
   def test_V_ISO8601_DURATION
-    parser = OpenEHR::ADL::Scanner::Common::V_ISO8601_DURATION.new
-    assert_instance_of OpenEHR::ADL::Scanner::Common::V_ISO8601_DURATION,parser
+    parser = OpenEhr::ADL::Scanner::Common::V_ISO8601_DURATION.new
+    assert_instance_of OpenEhr::ADL::Scanner::Common::V_ISO8601_DURATION,parser
     result = parser.parse('PT1M')
     assert_instance_of Yaparc::Result::OK, result
@@ -56,6 +56,6 @@
 
   def test_V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN
-    parser = OpenEHR::ADL::Scanner::CADL::V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN.new
-    assert_instance_of OpenEHR::ADL::Scanner::CADL::V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN,parser
+    parser = OpenEhr::ADL::Scanner::CADL::V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN.new
+    assert_instance_of OpenEhr::ADL::Scanner::CADL::V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN,parser
     result = parser.parse('yyyy-??-??T??:??:??')
     assert_instance_of Yaparc::Result::OK, result
@@ -63,6 +63,6 @@
 
   def test_V_ISO8601_DATE_CONSTRAINT_PATTERN
-    parser = OpenEHR::ADL::Scanner::CADL::V_ISO8601_DATE_CONSTRAINT_PATTERN.new
-    assert_instance_of OpenEHR::ADL::Scanner::CADL::V_ISO8601_DATE_CONSTRAINT_PATTERN,parser
+    parser = OpenEhr::ADL::Scanner::CADL::V_ISO8601_DATE_CONSTRAINT_PATTERN.new
+    assert_instance_of OpenEhr::ADL::Scanner::CADL::V_ISO8601_DATE_CONSTRAINT_PATTERN,parser
     result = parser.parse('yyyy-mm-XX-dd')
     assert_instance_of Yaparc::Result::OK, result
@@ -70,6 +70,6 @@
 
   def test_V_ISO8601_TIME_CONSTRAINT_PATTERN
-    parser = OpenEHR::ADL::Scanner::CADL::V_ISO8601_TIME_CONSTRAINT_PATTERN.new
-    assert_instance_of OpenEHR::ADL::Scanner::CADL::V_ISO8601_TIME_CONSTRAINT_PATTERN,parser
+    parser = OpenEhr::ADL::Scanner::CADL::V_ISO8601_TIME_CONSTRAINT_PATTERN.new
+    assert_instance_of OpenEhr::ADL::Scanner::CADL::V_ISO8601_TIME_CONSTRAINT_PATTERN,parser
     result = parser.parse('hh:mm:ss:??')
     assert_instance_of Yaparc::Result::OK, result
@@ -77,5 +77,5 @@
 
   def test_dadl_reserved
-    parser = OpenEHR::ADL::Scanner::DADL::RootScanner.new
+    parser = OpenEhr::ADL::Scanner::DADL::RootScanner.new
     result = parser.parse('then')
     assert_instance_of Yaparc::Result::OK, result
@@ -86,6 +86,6 @@
 
   def test_cadl
-    parser = OpenEHR::ADL::Scanner::CADL::RootScanner.new
-    assert_instance_of OpenEHR::ADL::Scanner::CADL::RootScanner,parser
+    parser = OpenEhr::ADL::Scanner::CADL::RootScanner.new
+    assert_instance_of OpenEhr::ADL::Scanner::CADL::RootScanner,parser
     result = parser.parse('PT1M')
     assert_instance_of Yaparc::Result::OK, result
@@ -97,5 +97,5 @@
 
   def test_cadl_reserved
-    parser = OpenEHR::ADL::Scanner::CADL::RootScanner.new
+    parser = OpenEhr::ADL::Scanner::CADL::RootScanner.new
     result = parser.parse('then')
     assert_instance_of Yaparc::Result::OK, result
Index: /ruby/branches/0.0/models/am.rb
===================================================================
--- /ruby/branches/0.0/models/am.rb	(revision 166)
+++ /ruby/branches/0.0/models/am.rb	(revision 167)
@@ -14,5 +14,5 @@
 require 'rm/common/resource.rb'
 #require 'rm/support/terminology/openehr_code_set_identifier.rb'
-module OpenEHR
+module OpenEhr
   module AM
     module Archetype
@@ -37,5 +37,5 @@
 
     module OpenEHR_Profile
-      module Data_Types
+      module DataTypes
         module Basic
           autoload :C_DV_STATE, "am/openehr_profile/data_types/basic.rb"
Index: /ruby/branches/0.0/models/am/archetype/archetype.rb
===================================================================
--- /ruby/branches/0.0/models/am/archetype/archetype.rb	(revision 166)
+++ /ruby/branches/0.0/models/am/archetype/archetype.rb	(revision 167)
@@ -1,14 +1,14 @@
 require 'rm/support/terminology.rb'
 
-module OpenEHR
+module OpenEhr
   module AM
     module Archetype
       module ADL_Definition
 #        include OpenEHR::RM::Support::Terminology::OpenEHR_Code_Set_Identifier
-        include OpenEHR::RM::Support::Terminology
+        include OpenEhr::RM::Support::Terminology
         CURRENT_ADL_VERSION = "1.4"
       end
 
-      class ARCHETYPE < OpenEHR::RM::Common::Resource::AUTHORED_RESOURCE
+      class ARCHETYPE < OpenEhr::RM::Common::Resource::AUTHORED_RESOURCE
         include ADL_Definition
         attr_accessor :archetype_id, :concept_code, :is_controlled, :original_language, :parent_archtype_id, :uid
Index: /ruby/branches/0.0/models/am/archetype/archetype_description/archetype_description.rb
===================================================================
--- /ruby/branches/0.0/models/am/archetype/archetype_description/archetype_description.rb	(revision 166)
+++ /ruby/branches/0.0/models/am/archetype/archetype_description/archetype_description.rb	(revision 167)
@@ -1,4 +1,4 @@
 
-module OpenEHR
+module OpenEhr
   module AM
     module Archetype
Index: /ruby/branches/0.0/models/am/archetype/constraint_model/archetype_constraint.rb
===================================================================
--- /ruby/branches/0.0/models/am/archetype/constraint_model/archetype_constraint.rb	(revision 166)
+++ /ruby/branches/0.0/models/am/archetype/constraint_model/archetype_constraint.rb	(revision 167)
@@ -1,4 +1,4 @@
 
-module OpenEHR
+module OpenEhr
   module AM
     module Archetype
Index: /ruby/branches/0.0/models/am/archetype/constraint_model/assertion.rb
===================================================================
--- /ruby/branches/0.0/models/am/archetype/constraint_model/assertion.rb	(revision 166)
+++ /ruby/branches/0.0/models/am/archetype/constraint_model/assertion.rb	(revision 167)
@@ -1,3 +1,3 @@
-module OpenEHR
+module OpenEhr
   module AM
     module Archetype
Index: /ruby/branches/0.0/models/am/archetype/constraint_model/primitive.rb
===================================================================
--- /ruby/branches/0.0/models/am/archetype/constraint_model/primitive.rb	(revision 166)
+++ /ruby/branches/0.0/models/am/archetype/constraint_model/primitive.rb	(revision 167)
@@ -1,3 +1,3 @@
-module OpenEHR
+module OpenEhr
   module AM
     module Archetype
Index: /ruby/branches/0.0/models/am/archetype/ontology.rb
===================================================================
--- /ruby/branches/0.0/models/am/archetype/ontology.rb	(revision 166)
+++ /ruby/branches/0.0/models/am/archetype/ontology.rb	(revision 167)
@@ -1,3 +1,3 @@
-module OpenEHR
+module OpenEhr
   module AM
     module Archetype
Index: /ruby/branches/0.0/models/am/openehr_profile/data_types/basic.rb
===================================================================
--- /ruby/branches/0.0/models/am/openehr_profile/data_types/basic.rb	(revision 166)
+++ /ruby/branches/0.0/models/am/openehr_profile/data_types/basic.rb	(revision 167)
@@ -1,6 +1,6 @@
-module OpenEHR
+module OpenEhr
   module AM
     module OpenEHR_Profile
-      module Data_Types
+      module DataTypes
         module Basic
           class C_DV_STATE
Index: /ruby/branches/0.0/models/am/openehr_profile/data_types/quantity.rb
===================================================================
--- /ruby/branches/0.0/models/am/openehr_profile/data_types/quantity.rb	(revision 166)
+++ /ruby/branches/0.0/models/am/openehr_profile/data_types/quantity.rb	(revision 167)
@@ -1,12 +1,12 @@
-module OpenEHR
+module OpenEhr
   module AM
     module OpenEHR_Profile
-      module Data_Types
+      module DataTypes
 
         module Quantity
-          class C_DV_QUANTITY < OpenEHR::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE
+          class C_DV_QUANTITY < OpenEhr::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE
           end
           
-          class C_DV_ORDINAL < OpenEHR::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE
+          class C_DV_ORDINAL < OpenEhr::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE
           end
 
Index: /ruby/branches/0.0/models/am/openehr_profile/data_types/text.rb
===================================================================
--- /ruby/branches/0.0/models/am/openehr_profile/data_types/text.rb	(revision 166)
+++ /ruby/branches/0.0/models/am/openehr_profile/data_types/text.rb	(revision 167)
@@ -1,8 +1,8 @@
-module OpenEHR
+module OpenEhr
   module AM
     module OpenEHR_Profile
-      module Data_Types
+      module DataTypes
         module Text
-          class C_CODE_PHASE < OpenEHR::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE
+          class C_CODE_PHASE < OpenEhr::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE
           end
         end
Index: /ruby/branches/0.0/models/assumed_library_types.rb
===================================================================
--- /ruby/branches/0.0/models/assumed_library_types.rb	(revision 166)
+++ /ruby/branches/0.0/models/assumed_library_types.rb	(revision 167)
@@ -1,4 +1,4 @@
-module OpenEHR
-  module Assumed_Library_Types
+module OpenEhr
+  module AssumedLibraryTypes
     class Interval
       attr_reader :lower, :lower_included, :lower_unbounded
Index: /ruby/branches/0.0/models/rm.rb
===================================================================
--- /ruby/branches/0.0/models/rm.rb	(revision 166)
+++ /ruby/branches/0.0/models/rm.rb	(revision 167)
@@ -10,5 +10,5 @@
 
 # OpenEHR::RM
-module OpenEHR
+module OpenEhr
   module RM
     autoload :Demographic, "rm/demographic.rb"
@@ -30,5 +30,5 @@
     end
 
-    module Data_Types
+    module DataTypes
       autoload :Basic, "rm/data_types/basic.rb"
       autoload :Text, "rm/data_types/text.rb"
Index: /ruby/branches/0.0/models/rm/common/archetyped.rb
===================================================================
--- /ruby/branches/0.0/models/rm/common/archetyped.rb	(revision 166)
+++ /ruby/branches/0.0/models/rm/common/archetyped.rb	(revision 167)
@@ -1,7 +1,7 @@
-module OpenEHR
+module OpenEhr
   module RM
     module Common
       module Archetyped
-        module Locater_Constants
+        module LocaterConstants
           CURRENT_TRANSACTION_ID = "current"
           FRAGMENT_SEPARATOR = "#"
@@ -32,5 +32,5 @@
         end
         class Locatable < Pathable
-          include Locater_Constants
+          include LocaterConstants
           attr_accessor :uid, :archetype_node_id, :archetype_details
           attr_accessor :feeder_audit, :links, :parent
Index: /ruby/branches/0.0/models/rm/common/generic.rb
===================================================================
--- /ruby/branches/0.0/models/rm/common/generic.rb	(revision 166)
+++ /ruby/branches/0.0/models/rm/common/generic.rb	(revision 167)
@@ -1,8 +1,8 @@
-module OpenEHR
+module OpenEhr
   module RM
     module Common
       module Generic
-        class Revision_History
-        end # of Revision_History
+        class RevisionHistory
+        end # of RevisionHistory
       end # of Generic
     end # of Common
Index: /ruby/branches/0.0/models/rm/common/resource.rb
===================================================================
--- /ruby/branches/0.0/models/rm/common/resource.rb	(revision 166)
+++ /ruby/branches/0.0/models/rm/common/resource.rb	(revision 167)
@@ -1,4 +1,4 @@
 require 'set'
-module OpenEHR
+module OpenEhr
   module RM
     module Common
Index: /ruby/branches/0.0/models/rm/composition/content/entry.rb
===================================================================
--- /ruby/branches/0.0/models/rm/composition/content/entry.rb	(revision 166)
+++ /ruby/branches/0.0/models/rm/composition/content/entry.rb	(revision 167)
@@ -1,3 +1,3 @@
-module OpenEHR
+module OpenEhr
   module RM
     module Content
@@ -5,7 +5,7 @@
         class Entry < Content_Item
         end
-        class Care_Entry < Entry
+        class CareEntry < Entry
         end
-        class Action < Care_Entry
+        class Action < CareEntry
           attr_accessor :description, :time
           attr_accessor :ism_transition, :instruction_details
Index: /ruby/branches/0.0/models/rm/data_types/basic.rb
===================================================================
--- /ruby/branches/0.0/models/rm/data_types/basic.rb	(revision 166)
+++ /ruby/branches/0.0/models/rm/data_types/basic.rb	(revision 167)
@@ -1,14 +1,14 @@
-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)
             check_not_nil(value)
@@ -32,7 +32,7 @@
             end
           end
-        end  # end of DV_Boolean
+        end  # end of DvBoolean
 
-        class DV_State < Data_Value
+        class DvState < DataValue
           attr_accessor :value
           attr_writer :terminal
@@ -47,7 +47,7 @@
             @terminal == true
           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)
@@ -60,5 +60,5 @@
             @type = type
           end
-        end #end of DV_Identifier
+        end #end of DvIdentifier
       end # end of Basic
     end # end of Data_types
Index: /ruby/branches/0.0/models/rm/data_types/encapslated.rb
===================================================================
--- /ruby/branches/0.0/models/rm/data_types/encapslated.rb	(revision 166)
+++ /ruby/branches/0.0/models/rm/data_types/encapslated.rb	(revision 167)
@@ -1,7 +1,7 @@
-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_accessor :charset, :language
           def size
@@ -13,8 +13,8 @@
           end
         end
-        class DV_Multimedia < DV_Encapsulated
+        class DvMultimedia < DvEncapsulated
           
         end
-        class DV_Parsable < DV_Encapsulated
+        class DvParsable < DvEncapsulated
           attr_reader :value, :formalism
           def initialize(value, formalism, charset = nil, language = nil)
Index: /ruby/branches/0.0/models/rm/data_types/quantity/data_time.rb
===================================================================
--- /ruby/branches/0.0/models/rm/data_types/quantity/data_time.rb	(revision 166)
+++ /ruby/branches/0.0/models/rm/data_types/quantity/data_time.rb	(revision 167)
@@ -1,5 +1,5 @@
-module OpenEHR
+module OpenEhr
   module RM
-    module Data_Types
+    module DataTypes
       module Quantity
         module Date_
Index: /ruby/branches/0.0/models/rm/data_types/text.rb
===================================================================
--- /ruby/branches/0.0/models/rm/data_types/text.rb	(revision 166)
+++ /ruby/branches/0.0/models/rm/data_types/text.rb	(revision 167)
@@ -1,7 +1,7 @@
-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)
@@ -23,5 +23,5 @@
             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
@@ -31,5 +31,5 @@
           end
           def purpose_valid(purpose)
-            if !purpose.nil? and !purpose.instance_of? DV_Coded_Text
+            if !purpose.nil? and !purpose.instance_of? DvCodedText
               raise ArgumentError, "purpose is not valid"
             end
@@ -41,5 +41,5 @@
         end
 
-        class Code_Phrase
+        class CodePhrase
           attr_reader :terminology_id, :code_string
           def initialize(terminology_id, code_string)
@@ -50,14 +50,14 @@
               raise Exception.new("empty codeString")
             end
-            if terminology_id.instance_of?(Terminology_ID)
+            if terminology_id.instance_of?(TerminologyId)
               @terminology_id = terminology_id
             else
-              @terminologyID = Terminology_ID.new(terminology_id)
+              @terminologyID = TerminologyId.new(terminology_id)
             end
             @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
@@ -65,8 +65,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
@@ -77,17 +77,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
@@ -96,5 +96,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
@@ -125,5 +125,5 @@
         end
 
-        class DV_Coded_Text < DV_Text
+        class DvCodedText < DvText
           attr_reader :defining_code
           def initialize(value, defining_code, formatting = nil, 
@@ -144,5 +144,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)
Index: /ruby/branches/0.0/models/rm/data_types/time_specification.rb
===================================================================
--- /ruby/branches/0.0/models/rm/data_types/time_specification.rb	(revision 166)
+++ /ruby/branches/0.0/models/rm/data_types/time_specification.rb	(revision 167)
@@ -1,7 +1,7 @@
-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
           def initialize(value)
             @value = value
@@ -18,5 +18,5 @@
         end
         
-        class DV_General_Time_Specification < DV_Time_Specification
+        class DvGeneralTimeSpecification < DvTimeSpecification
           attr_reader :value
           def initialize(value)
@@ -34,5 +34,5 @@
         end
 
-        class DV_Periodic_Time_Specification < DV_Time_Specification
+        class DvPeriodicTimeSpecification < DvTimeSpecification
           attr_reader :value
           def initialize(value)
Index: /ruby/branches/0.0/models/rm/data_types/uri.rb
===================================================================
--- /ruby/branches/0.0/models/rm/data_types/uri.rb	(revision 166)
+++ /ruby/branches/0.0/models/rm/data_types/uri.rb	(revision 167)
@@ -1,6 +1,6 @@
 require 'uri'
 #require 'uri/generic'
-module URI
-  class EHR < ::URI::Generic
+module Uri
+  class Ehr < ::URI::Generic
     COMPONENT = [
       :scheme, :path, :fragment, :query
@@ -17,11 +17,11 @@
     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)
             raise ArgumentError, "value is empty" if value.nil?
@@ -51,5 +51,5 @@
           end
         end
-        class DV_EHR_URI < DV_URI
+        class DvEhrUri < DvUri
           def initialize(value)
             check_value(value)
Index: /ruby/branches/0.0/models/rm/demographic.rb
===================================================================
--- /ruby/branches/0.0/models/rm/demographic.rb	(revision 166)
+++ /ruby/branches/0.0/models/rm/demographic.rb	(revision 167)
@@ -1,6 +1,6 @@
-module OpenEHR
+module OpenEhr
   module RM
     module Demogrphic
-      class Party < OpenEHR::RM::Common::Archetyped::Locatable
+      class Party < OpenEhr::RM::Common::Archetyped::Locatable
         attr_reader :details, :reverse_relationships, :uid
         attr_reader :idetities, :contacts, :relationships
Index: /ruby/branches/0.0/models/rm/support/assumed_types.rb
===================================================================
--- /ruby/branches/0.0/models/rm/support/assumed_types.rb	(revision 166)
+++ /ruby/branches/0.0/models/rm/support/assumed_types.rb	(revision 167)
@@ -1,6 +1,6 @@
-module OpenEHR
+module OpenEhr
   module RM
     module Support
-      module Assumed_Types
+      module AssumedTypes
         class Interval
           attr_accessor :lower, :upper
Index: /ruby/branches/0.0/models/rm/support/definition.rb
===================================================================
--- /ruby/branches/0.0/models/rm/support/definition.rb	(revision 166)
+++ /ruby/branches/0.0/models/rm/support/definition.rb	(revision 167)
@@ -1,12 +1,12 @@
-module OpenEHR
+module OpenEhr
   module RM
     module Support
       module Definition
-        module Basic_Definition
+        module BasicDefinition
           CR = "\015"
           LF = "\012"
         end
-        class OpenEHR_Definitions
-          include Basic_Definition          
+        class OpenEHRDefinitions
+          include BasicDefinition
         end
       end
Index: /ruby/branches/0.0/models/rm/support/identification.rb
===================================================================
--- /ruby/branches/0.0/models/rm/support/identification.rb	(revision 166)
+++ /ruby/branches/0.0/models/rm/support/identification.rb	(revision 167)
@@ -1,3 +1,3 @@
-module OpenEHR
+module OpenEhr
   module RM
     module Support
Index: /ruby/branches/0.0/models/rm/support/terminology.rb
===================================================================
--- /ruby/branches/0.0/models/rm/support/terminology.rb	(revision 166)
+++ /ruby/branches/0.0/models/rm/support/terminology.rb	(revision 167)
@@ -1,8 +1,8 @@
 
-module OpenEHR
+module OpenEhr
   module RM
     module Support
       module Terminology
-        class Code_Set_Access
+        class CodeSetAccess
           def all_codes
             raise NotImplementedError, "all_codes must be implemented"
@@ -18,5 +18,5 @@
           end
         end
-        module OpenEHR_Code_Set_Identifier
+        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 OpenEHR_Terminology_Group_Identifiers
+        module OpenEhrTerminologyGroupIdentifiers
           GROUP_ID_ATTESTATION_REASON = "attestation reason".freeze
           GROUP_ID_AUDIT_CHANGE_TYPE = "audit change type".freeze
@@ -46,5 +46,5 @@
           TERMINOLOGY_ID = "openehr".freeze
         end
-        class Terminology_Access
+        class TerminologyAccess
           def all_codes
             raise NotImplementedError, "all_codes is not implemented"
@@ -74,6 +74,6 @@
           end
         end
-        class Terminology_Service
-          include OpenEHR_Code_Set_Identifier, OpenEHR_Terminology_Group_Identifiers
+        class TerminologyService
+          include OpenEhrCodeSetIdentifier, OpenEhrTerminologyGroupIdentifiers
           def code_set(name)
             raise NotImplementedError, "code_set is not implemented"
Index: /ruby/branches/0.0/models/tests/test_archetype_model.rb
===================================================================
--- /ruby/branches/0.0/models/tests/test_archetype_model.rb	(revision 166)
+++ /ruby/branches/0.0/models/tests/test_archetype_model.rb	(revision 167)
@@ -5,25 +5,25 @@
 class ArchetypeModelTest < Test::Unit::TestCase
   def setup
-    @archetype = OpenEHR::AM::Archetype::ARCHETYPE.new
-    @validity_kind = OpenEHR::AM::Archetype::VALIDITY_KIND.new
+    @archetype = OpenEhr::AM::Archetype::ARCHETYPE.new
+    @validity_kind = OpenEhr::AM::Archetype::VALIDITY_KIND.new
 
-    @archetype_description = OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION.new
-    @archetype_description_item = OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION_ITEM.new
+    @archetype_description = OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION.new
+    @archetype_description_item = OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION_ITEM.new
   end
   
   def test_init
-    assert_instance_of OpenEHR::AM::Archetype::ARCHETYPE, @archetype
-    assert_instance_of OpenEHR::AM::Archetype::VALIDITY_KIND, @validity_kind
-    assert_instance_of OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION, @archetype_description
-    assert_instance_of OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION_ITEM, @archetype_description_item
-    assert_instance_of OpenEHR::AM::Archetype::ARCHETYPE, @archetype
+    assert_instance_of OpenEhr::AM::Archetype::ARCHETYPE, @archetype
+    assert_instance_of OpenEhr::AM::Archetype::VALIDITY_KIND, @validity_kind
+    assert_instance_of OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION, @archetype_description
+    assert_instance_of OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION_ITEM, @archetype_description_item
+    assert_instance_of OpenEhr::AM::Archetype::ARCHETYPE, @archetype
   end
 
   def test_create
-    archetype_instance = OpenEHR::AM::Archetype::ARCHETYPE.create() do |archetype|
+    archetype_instance = OpenEhr::AM::Archetype::ARCHETYPE.create() do |archetype|
       archetype.adl_version = '1.4'
     end
 
-    assert_instance_of OpenEHR::AM::Archetype::ARCHETYPE, archetype_instance
+    assert_instance_of OpenEhr::AM::Archetype::ARCHETYPE, archetype_instance
   end
 end
@@ -31,49 +31,49 @@
 class ArchetypeModelConstraintTest < Test::Unit::TestCase
   def setup
-    @archetype_constraint = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT.new
-    @cardinality = OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY.new    
+    @archetype_constraint = OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT.new
+    @cardinality = OpenEhr::AM::Archetype::Constraint_Model::CARDINALITY.new
     
-    @archetype_constraint = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT.new
-    @c_object = OpenEHR::AM::Archetype::Constraint_Model::C_OBJECT.new
-    @c_defined_object = OpenEHR::AM::Archetype::Constraint_Model::C_DEFINED_OBJECT.new
-    @c_attribute = OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE.new
-    @c_single_attribute = OpenEHR::AM::Archetype::Constraint_Model::C_SINGLE_ATTRIBUTE.new
-    @c_multiple_attribute = OpenEHR::AM::Archetype::Constraint_Model::C_MULTIPLE_ATTRIBUTE.new(:rm_attribute_name => 'attribute_name', :cardinality => @cardinality)
-    @c_primitive_object = OpenEHR::AM::Archetype::Constraint_Model::C_PRIMITIVE_OBJECT.new
-    @c_reference_object =  OpenEHR::AM::Archetype::Constraint_Model::C_REFERENCE_OBJECT.new
-    @archetype_internal_ref =  OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_INTERNAL_REF.new
-    @archetype_slot = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_SLOT.new
-    @constraint_ref = OpenEHR::AM::Archetype::Constraint_Model::CONSTRAINT_REF.new
-    @c_domain_type = OpenEHR::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE.new
-    @c_complex_object = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.new(:attributes => [@c_single_attribute])
+    @archetype_constraint = OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT.new
+    @c_object = OpenEhr::AM::Archetype::Constraint_Model::C_OBJECT.new
+    @c_defined_object = OpenEhr::AM::Archetype::Constraint_Model::C_DEFINED_OBJECT.new
+    @c_attribute = OpenEhr::AM::Archetype::Constraint_Model::C_ATTRIBUTE.new
+    @c_single_attribute = OpenEhr::AM::Archetype::Constraint_Model::C_SINGLE_ATTRIBUTE.new
+    @c_multiple_attribute = OpenEhr::AM::Archetype::Constraint_Model::C_MULTIPLE_ATTRIBUTE.new(:rm_attribute_name => 'attribute_name', :cardinality => @cardinality)
+    @c_primitive_object = OpenEhr::AM::Archetype::Constraint_Model::C_PRIMITIVE_OBJECT.new
+    @c_reference_object =  OpenEhr::AM::Archetype::Constraint_Model::C_REFERENCE_OBJECT.new
+    @archetype_internal_ref =  OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_INTERNAL_REF.new
+    @archetype_slot = OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_SLOT.new
+    @constraint_ref = OpenEhr::AM::Archetype::Constraint_Model::CONSTRAINT_REF.new
+    @c_domain_type = OpenEhr::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE.new
+    @c_complex_object = OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.new(:attributes => [@c_single_attribute])
   end
 
   def test_init
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT, @archetype_constraint
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_OBJECT, @c_object
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_DEFINED_OBJECT, @c_defined_object
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE, @c_attribute
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_SINGLE_ATTRIBUTE, @c_single_attribute
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_MULTIPLE_ATTRIBUTE, @c_multiple_attribute
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT, @archetype_constraint
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_OBJECT, @c_object
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_DEFINED_OBJECT, @c_defined_object
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_ATTRIBUTE, @c_attribute
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_SINGLE_ATTRIBUTE, @c_single_attribute
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_MULTIPLE_ATTRIBUTE, @c_multiple_attribute
     assert_equal 'attribute_name', @c_multiple_attribute.rm_attribute_name
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY, @c_multiple_attribute.cardinality
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_PRIMITIVE_OBJECT, @c_primitive_object
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_REFERENCE_OBJECT, @c_reference_object
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_INTERNAL_REF, @archetype_internal_ref
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_SLOT, @archetype_slot
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::CONSTRAINT_REF, @constraint_ref
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE, @c_domain_type
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, @c_complex_object
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::CARDINALITY, @c_multiple_attribute.cardinality
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_PRIMITIVE_OBJECT, @c_primitive_object
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_REFERENCE_OBJECT, @c_reference_object
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_INTERNAL_REF, @archetype_internal_ref
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_SLOT, @archetype_slot
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::CONSTRAINT_REF, @constraint_ref
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE, @c_domain_type
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, @c_complex_object
     assert_instance_of Array, @c_complex_object.attributes
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT, @archetype_constraint
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY, @cardinality
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT, @archetype_constraint
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::CARDINALITY, @cardinality
   end
 
   def test_create
-    c_complex_object = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.create(:node_id => 'test_node',
+    c_complex_object = OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.create(:node_id => 'test_node',
                                                                                          :attributes => [1,2],
                                                                                          :assumed_value => Array
                                                                                          )
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, c_complex_object
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, c_complex_object
     assert_equal 'test_node', c_complex_object.node_id
   end
@@ -82,27 +82,27 @@
 class ArchetypeModelPrimitiveTest < Test::Unit::TestCase
   def setup
-    @c_primitive = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_PRIMITIVE.new
-    @c_boolean = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true,
+    @c_primitive = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_PRIMITIVE.new
+    @c_boolean = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true,
                                                                                     :false_valid => true,
                                                                                     :assumed_value => true)
-    @c_string = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_STRING.new
-    @c_integer = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_INTEGER.new
-    @c_real = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_REAL.new
-    @c_time = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_TIME.new
-    @c_date = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE.new
-    @c_date_time = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME.new
-    @c_duration = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DURATION.new
+    @c_string = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_STRING.new
+    @c_integer = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_INTEGER.new
+    @c_real = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_REAL.new
+    @c_time = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_TIME.new
+    @c_date = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DATE.new
+    @c_date_time = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME.new
+    @c_duration = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DURATION.new
   end
 
   def test_init
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_PRIMITIVE, @c_primitive
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN, @c_boolean
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_STRING, @c_string
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_INTEGER, @c_integer
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_REAL, @c_real
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_TIME, @c_time
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE, @c_date
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME, @c_date_time
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DURATION, @c_duration
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_PRIMITIVE, @c_primitive
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN, @c_boolean
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_STRING, @c_string
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_INTEGER, @c_integer
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_REAL, @c_real
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_TIME, @c_time
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DATE, @c_date
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME, @c_date_time
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DURATION, @c_duration
   end
 
@@ -119,5 +119,5 @@
     end
     assert_raise(ArgumentError) do 
-      OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid =>false,
+      OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid =>false,
                                                                          :false_valid => false,
                                                                          :assumed_value => false)
@@ -129,11 +129,11 @@
 class ArchetypeModelOntologyTest < Test::Unit::TestCase
   def setup
-    @archetype_ontology = OpenEHR::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY.new
-    @archetype_term = OpenEHR::AM::Archetype::Ontology::ARCHETYPE_TERM.new(:code => '', :items => '')
+    @archetype_ontology = OpenEhr::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY.new
+    @archetype_term = OpenEhr::AM::Archetype::Ontology::ARCHETYPE_TERM.new(:code => '', :items => '')
   end
 
   def test_init
-    assert_instance_of OpenEHR::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY, @archetype_ontology
-    assert_instance_of OpenEHR::AM::Archetype::Ontology::ARCHETYPE_TERM, @archetype_term
+    assert_instance_of OpenEhr::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY, @archetype_ontology
+    assert_instance_of OpenEhr::AM::Archetype::Ontology::ARCHETYPE_TERM, @archetype_term
   end
 end
@@ -141,23 +141,23 @@
 class ArchetypeModelAssertionTest < Test::Unit::TestCase
   def setup
-    @assertion = OpenEHR::AM::Archetype::Assertion::ASSERTION.new
-    @assertion_variable = OpenEHR::AM::Archetype::Assertion::ASSERTION_VARIABLE.new
-    @operator_kind = OpenEHR::AM::Archetype::Assertion::OPERATOR_KIND.new
-    @expr_item = OpenEHR::AM::Archetype::Assertion::EXPR_ITEM.new
-    @expr_leaf = OpenEHR::AM::Archetype::Assertion::EXPR_LEAF.new
-    @expr_operator = OpenEHR::AM::Archetype::Assertion::EXPR_OPERATOR.new
-    @expr_unary_operator = OpenEHR::AM::Archetype::Assertion::EXPR_UNARY_OPERATOR.new
-    @expr_binary_operator = OpenEHR::AM::Archetype::Assertion::EXPR_BINARY_OPERATOR.new
+    @assertion = OpenEhr::AM::Archetype::Assertion::ASSERTION.new
+    @assertion_variable = OpenEhr::AM::Archetype::Assertion::ASSERTION_VARIABLE.new
+    @operator_kind = OpenEhr::AM::Archetype::Assertion::OPERATOR_KIND.new
+    @expr_item = OpenEhr::AM::Archetype::Assertion::EXPR_ITEM.new
+    @expr_leaf = OpenEhr::AM::Archetype::Assertion::EXPR_LEAF.new
+    @expr_operator = OpenEhr::AM::Archetype::Assertion::EXPR_OPERATOR.new
+    @expr_unary_operator = OpenEhr::AM::Archetype::Assertion::EXPR_UNARY_OPERATOR.new
+    @expr_binary_operator = OpenEhr::AM::Archetype::Assertion::EXPR_BINARY_OPERATOR.new
   end
 
   def test_init
-    assert_instance_of OpenEHR::AM::Archetype::Assertion::ASSERTION, @assertion
-    assert_instance_of OpenEHR::AM::Archetype::Assertion::ASSERTION_VARIABLE, @assertion_variable
-    assert_instance_of OpenEHR::AM::Archetype::Assertion::OPERATOR_KIND, @operator_kind
-    assert_instance_of OpenEHR::AM::Archetype::Assertion::EXPR_ITEM, @expr_item
-    assert_instance_of OpenEHR::AM::Archetype::Assertion::EXPR_LEAF, @expr_leaf
-    assert_instance_of OpenEHR::AM::Archetype::Assertion::EXPR_OPERATOR, @expr_operator
-    assert_instance_of OpenEHR::AM::Archetype::Assertion::EXPR_UNARY_OPERATOR, @expr_unary_operator
-    assert_instance_of OpenEHR::AM::Archetype::Assertion::EXPR_BINARY_OPERATOR, @expr_binary_operator
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::ASSERTION, @assertion
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::ASSERTION_VARIABLE, @assertion_variable
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::OPERATOR_KIND, @operator_kind
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::EXPR_ITEM, @expr_item
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::EXPR_LEAF, @expr_leaf
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::EXPR_OPERATOR, @expr_operator
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::EXPR_UNARY_OPERATOR, @expr_unary_operator
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::EXPR_BINARY_OPERATOR, @expr_binary_operator
   end
 end
@@ -165,29 +165,29 @@
 class ArchetypeModelProfileTest < Test::Unit::TestCase
   def setup
-    @c_dv_state = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::C_DV_STATE.new
-    @state_machine = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::STATE_MACHINE.new
-    @state = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::STATE.new
-    @terminal_state = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::TERMINAL_STATE.new
-    @non_terminal_state = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::NON_TERMINAL_STATE.new
-    @transition = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::TRANSITION.new
+    @c_dv_state = OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::C_DV_STATE.new
+    @state_machine = OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::STATE_MACHINE.new
+    @state = OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::STATE.new
+    @terminal_state = OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::TERMINAL_STATE.new
+    @non_terminal_state = OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::NON_TERMINAL_STATE.new
+    @transition = OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::TRANSITION.new
 
-    @c_code_phase = OpenEHR::AM::OpenEHR_Profile::Data_Types::Text::C_CODE_PHASE.new
+    @c_code_phase = OpenEhr::AM::OpenEHR_Profile::DataTypes::Text::C_CODE_PHASE.new
 
-    @c_dv_quantity = OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_DV_QUANTITY.new
-    @c_dv_ordinal = OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_DV_ORDINAL.new
-    @c_quantity_item = OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_QUANTITY_ITEM.new
+    @c_dv_quantity = OpenEhr::AM::OpenEHR_Profile::DataTypes::Quantity::C_DV_QUANTITY.new
+    @c_dv_ordinal = OpenEhr::AM::OpenEHR_Profile::DataTypes::Quantity::C_DV_ORDINAL.new
+    @c_quantity_item = OpenEhr::AM::OpenEHR_Profile::DataTypes::Quantity::C_QUANTITY_ITEM.new
   end
 
   def test_init
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::C_DV_STATE, @c_dv_state
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::STATE_MACHINE, @state_machine
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::STATE, @state
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::TERMINAL_STATE, @terminal_state
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::NON_TERMINAL_STATE, @non_terminal_state
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::TRANSITION, @transition
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Text::C_CODE_PHASE, @c_code_phase
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_DV_QUANTITY, @c_dv_quantity
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_DV_ORDINAL, @c_dv_ordinal
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_QUANTITY_ITEM, @c_quantity_item
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::C_DV_STATE, @c_dv_state
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::STATE_MACHINE, @state_machine
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::STATE, @state
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::TERMINAL_STATE, @terminal_state
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::NON_TERMINAL_STATE, @non_terminal_state
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::TRANSITION, @transition
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Text::C_CODE_PHASE, @c_code_phase
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Quantity::C_DV_QUANTITY, @c_dv_quantity
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Quantity::C_DV_ORDINAL, @c_dv_ordinal
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Quantity::C_QUANTITY_ITEM, @c_quantity_item
   end
 end
Index: /ruby/branches/0.0/models/tests/test_assumed_library_types.rb
===================================================================
--- /ruby/branches/0.0/models/tests/test_assumed_library_types.rb	(revision 166)
+++ /ruby/branches/0.0/models/tests/test_assumed_library_types.rb	(revision 167)
@@ -4,8 +4,8 @@
 class Assumed_Library_Test < Test::Unit::TestCase
   def setup
-    @interval = OpenEHR::Assumed_Library_Types::Interval.new(1,2)
+    @interval = OpenEhr::AssumedLibraryTypes::Interval.new(1,2)
   end
   def test_initialize
-    assert_instance_of OpenEHR::Assumed_Library_Types::Interval, @interval
+    assert_instance_of OpenEhr::AssumedLibraryTypes::Interval, @interval
   end
   def test_limits_comparable
Index: /ruby/branches/0.0/models/tests/test_reference_model.rb
===================================================================
--- /ruby/branches/0.0/models/tests/test_reference_model.rb	(revision 166)
+++ /ruby/branches/0.0/models/tests/test_reference_model.rb	(revision 167)
@@ -5,36 +5,36 @@
 class ReferenceModelTest < Test::Unit::TestCase
   def setup
-    @authored_resource = OpenEHR::RM::Common::Resource::AUTHORED_RESOURCE.new(:original_language => "ja",
+    @authored_resource = OpenEhr::RM::Common::Resource::AUTHORED_RESOURCE.new(:original_language => "ja",
                                                                               :translations => "en",
                                                                               :description => "test")
-    @translation_details = OpenEHR::RM::Common::Resource::TRANSLATION_DETAILS.new(nil,nil,nil,nil,nil)
+    @translation_details = OpenEhr::RM::Common::Resource::TRANSLATION_DETAILS.new(nil,nil,nil,nil,nil)
 #    @openehr_definitions = OpenEHR::RM::Support::Definition::OpenEHR_Definitions.new
-    @dv_boolean = OpenEHR::RM::Data_Types::Basic::DV_Boolean.new("TRUE")
-    @dv_state = OpenEHR::RM::Data_Types::Basic::DV_State.new("code1",true)
-    @dv_identifier = OpenEHR::RM::Data_Types::Basic::DV_Identifier.new("Ruby Hospital","0123456-0", "Information office", "personal id")
-    @dv_uri = OpenEHR::RM::Data_Types::URI::DV_URI.new("http://www.openehr.jp/changeset/test?cmd=93#file0")
-    @dv_ehr_uri = OpenEHR::RM::Data_Types::URI::DV_EHR_URI.new("ehr://1234567/87284370-2D4B-4e3d-A3F3-F303D2F4F34B@2005-08-02T04:30:00")
-    @dv_text = OpenEHR::RM::Data_Types::Text::DV_Text.new("valid value")
-    @dv_coded_text = OpenEHR::RM::Data_Types::Text::DV_Coded_Text.new("valid value", "AT1000")
-    @dv_paragraph = OpenEHR::RM::Data_Types::Text::DV_Paragraph.new(Set.new(["test1", "test2"]))
+    @dv_boolean = OpenEhr::RM::DataTypes::Basic::DvBoolean.new("TRUE")
+    @dv_state = OpenEhr::RM::DataTypes::Basic::DvState.new("code1",true)
+    @dv_identifier = OpenEhr::RM::DataTypes::Basic::DvIdentifier.new("Ruby Hospital","0123456-0", "Information office", "personal id")
+    @dv_uri = OpenEhr::RM::DataTypes::Uri::DvUri.new("http://www.openehr.jp/changeset/test?cmd=93#file0")
+    @dv_ehr_uri = OpenEhr::RM::DataTypes::Uri::DvEhrUri.new("ehr://1234567/87284370-2D4B-4e3d-A3F3-F303D2F4F34B@2005-08-02T04:30:00")
+    @dv_text = OpenEhr::RM::DataTypes::Text::DvText.new("valid value")
+    @dv_coded_text = OpenEhr::RM::DataTypes::Text::DvCodedText.new("valid value", "AT1000")
+    @dv_paragraph = OpenEhr::RM::DataTypes::Text::DvParagraph.new(Set.new(["test1", "test2"]))
   end
   
   def test_init
-    assert_instance_of OpenEHR::RM::Common::Resource::AUTHORED_RESOURCE, @authored_resource
-    assert_instance_of OpenEHR::RM::Common::Resource::TRANSLATION_DETAILS, @translation_details
-    assert_instance_of OpenEHR::RM::Data_Types::Basic::DV_Boolean, @dv_boolean
-    assert_instance_of OpenEHR::RM::Data_Types::Basic::DV_State, @dv_state
-    assert_instance_of OpenEHR::RM::Data_Types::Basic::DV_Identifier, @dv_identifier
-    assert_instance_of OpenEHR::RM::Data_Types::URI::DV_URI, @dv_uri
-    assert_instance_of OpenEHR::RM::Data_Types::URI::DV_EHR_URI, @dv_ehr_uri
-    assert_instance_of OpenEHR::RM::Data_Types::Text::DV_Text, @dv_text
-    assert_instance_of OpenEHR::RM::Data_Types::Text::DV_Coded_Text, @dv_coded_text
+    assert_instance_of OpenEhr::RM::Common::Resource::AUTHORED_RESOURCE, @authored_resource
+    assert_instance_of OpenEhr::RM::Common::Resource::TRANSLATION_DETAILS, @translation_details
+    assert_instance_of OpenEhr::RM::DataTypes::Basic::DvBoolean, @dv_boolean
+    assert_instance_of OpenEhr::RM::DataTypes::Basic::DvState, @dv_state
+    assert_instance_of OpenEhr::RM::DataTypes::Basic::DvIdentifier, @dv_identifier
+    assert_instance_of OpenEhr::RM::DataTypes::Uri::DvUri, @dv_uri
+    assert_instance_of OpenEhr::RM::DataTypes::Uri::DvEhrUri, @dv_ehr_uri
+    assert_instance_of OpenEhr::RM::DataTypes::Text::DvText, @dv_text
+    assert_instance_of OpenEhr::RM::DataTypes::Text::DvCodedText, @dv_coded_text
   end
 
   def test_constant
-    assert_equal("\r", OpenEHR::RM::Support::Definition::OpenEHR_Definitions::CR)
-    assert_equal("\n", OpenEHR::RM::Support::Definition::OpenEHR_Definitions::LF)
-    assert_equal("\r", OpenEHR::RM::Data_Types::Basic::Data_Value::CR)
-    assert_equal("\n", OpenEHR::RM::Data_Types::Basic::Data_Value::LF)
+    assert_equal("\r", OpenEhr::RM::Support::Definition::OpenEHRDefinitions::CR)
+    assert_equal("\n", OpenEhr::RM::Support::Definition::OpenEHRDefinitions::LF)
+    assert_equal("\r", OpenEhr::RM::DataTypes::Basic::DataValue::CR)
+    assert_equal("\n", OpenEhr::RM::DataTypes::Basic::DataValue::LF)
   end
 
@@ -45,5 +45,5 @@
     # Constraints Value_exists
     assert_raise(ArgumentError){@dv_boolean.value=nil}
-    assert_raise(ArgumentError){OpenEHR::RM::Data_Types::Basic::DV_Boolean.new(nil)}
+    assert_raise(ArgumentError){OpenEhr::RM::DataTypes::Basic::DvBoolean.new(nil)}
   end
 
@@ -55,5 +55,5 @@
     @dv_state.terminal = false
     assert !@dv_state.is_terminal?
-    assert_raise(ArgumentError) {OpenEHR::RM::Data_Types::Basic::DV_State.new(nil,nil)}
+    assert_raise(ArgumentError) {OpenEhr::RM::DataTypes::Basic::DvState.new(nil,nil)}
   end
 
@@ -71,5 +71,5 @@
     @dv_identifier.type = "test id"
     assert_equal("test id", @dv_identifier.type)
-    assert_raise(ArgumentError) {OpenEHR::RM::Data_Types::Basic::DV_Identifier.new(nil, nil, nil, nil)}
+    assert_raise(ArgumentError) {OpenEhr::RM::DataTypes::Basic::DvIdentifier.new(nil, nil, nil, nil)}
   end
 
@@ -123,13 +123,13 @@
 class ReferenceModelSupportIdentificationTest < Test::Unit::TestCase
   def setup
-    @object_id = OpenEHR::RM::Support::Identification::OBJECT_ID.new
-    @terminology_id = OpenEHR::RM::Support::Identification::TERMINOLOGY_ID.new('terminology','version')
-    @archetype_id = OpenEHR::RM::Support::Identification::ARCHETYPE_ID.new
+    @object_id = OpenEhr::RM::Support::Identification::OBJECT_ID.new
+    @terminology_id = OpenEhr::RM::Support::Identification::TERMINOLOGY_ID.new('terminology','version')
+    @archetype_id = OpenEhr::RM::Support::Identification::ARCHETYPE_ID.new
   end
   
   def test_init
-    assert_instance_of OpenEHR::RM::Support::Identification::OBJECT_ID, @object_id
-    assert_instance_of OpenEHR::RM::Support::Identification::TERMINOLOGY_ID, @terminology_id
-    assert_instance_of OpenEHR::RM::Support::Identification::ARCHETYPE_ID, @archetype_id
+    assert_instance_of OpenEhr::RM::Support::Identification::OBJECT_ID, @object_id
+    assert_instance_of OpenEhr::RM::Support::Identification::TERMINOLOGY_ID, @terminology_id
+    assert_instance_of OpenEhr::RM::Support::Identification::ARCHETYPE_ID, @archetype_id
 
   end
Index: /ruby/branches/0.5.0/COPYING
===================================================================
--- /ruby/branches/0.5.0/COPYING	(revision 166)
+++ /ruby/branches/0.5.0/COPYING	(revision 167)
@@ -1,3 +1,10 @@
 openEHR Open Source Software License
 
-The openEHR Foundation uses the Mozilla Tri-license 1.1 on all software copyrighted to the Foundation. This licence essentially provides the user a choice of licence conditions under which to operate with any given piece of software, being: the Mozilla Public licence (MPL), and the Free Software Foundation GNU General Public Licence (GPL) and Lesser GNU Public Licence (LGPL). See the Mozilla relicensing FAQ for details of this license. This in no way constrains the way in which software created by other organisations is licenced. 
+The openEHR Foundation uses the Mozilla Tri-license 1.1 on all software
+copyrighted to the Foundation. This licence essentially provides the user
+a choice of licence conditions under which to operate with any given piece
+of software, being: the Mozilla Public licence (MPL), and the Free Software
+Foundation GNU General Public Licence (GPL) and Lesser GNU Public Licence
+(LGPL). See the Mozilla relicensing FAQ for details of this license.
+This in no way constrains the way in which software created by other
+organisations is licenced. 
Index: /ruby/branches/0.5.0/bin/adl_validator.rb
===================================================================
--- /ruby/branches/0.5.0/bin/adl_validator.rb	(revision 166)
+++ /ruby/branches/0.5.0/bin/adl_validator.rb	(revision 167)
@@ -6,5 +6,5 @@
 require 'net/http'
 
-module OpenEHR
+module OpenEhr
   module CommandLine
     class Arguments < Hash
@@ -39,5 +39,5 @@
             when /\A(http:\/\/.*)/
               name = $1
-              input = case response = Net::HTTP.get_response(URI.parse($1))
+              input = case response = Net::HTTP.get_response(Uri.parse($1))
                       when Net::HTTPSuccess   
                         response.body
@@ -73,6 +73,6 @@
 if __FILE__ == $0
   begin
-    arguments = OpenEHR::CommandLine::Arguments.new(ARGV)
-    validator = OpenEHR::CommandLine::ADLValidator.new(arguments)
+    arguments = OpenEhr::CommandLine::Arguments.new(ARGV)
+    validator = OpenEhr::CommandLine::ADLValidator.new(arguments)
     validator.run
   end
Index: /ruby/branches/0.5.0/doc/README_FOR_APP
===================================================================
--- /ruby/branches/0.5.0/doc/README_FOR_APP	(revision 167)
+++ /ruby/branches/0.5.0/doc/README_FOR_APP	(revision 167)
@@ -0,0 +1,2 @@
+Use this README file to introduce your application and point to useful places in the API for learning more.
+Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
Index: /ruby/branches/0.5.0/doc/api
===================================================================
--- /ruby/branches/0.5.0/doc/api	(revision 167)
+++ /ruby/branches/0.5.0/doc/api	(revision 167)
@@ -0,0 +1,1 @@
+link /usr/share/doc/rails/html
Index: /ruby/branches/0.5.0/doc/openehr_terminology.csv
===================================================================
--- /ruby/branches/0.5.0/doc/openehr_terminology.csv	(revision 167)
+++ /ruby/branches/0.5.0/doc/openehr_terminology.csv	(revision 167)
@@ -0,0 +1,192 @@
+1,0,openehr,en,subject relationship,self,The party is the subject of EHR ,HL7_RoleCode:: CEN: 
+2,3,openehr,en,subject relationship,foetus,The party is a foetus ,HL7: CEN: 
+3,6,openehr,en,subject relationship,donor,The party is a donor of organs or other body products to the EHR subject. ,HL7: CEN: 
+4,7,openehr,en,subject relationship,maternal grandmother,Relationship of maternal grandmother to subject of EHR ,HL7: CEN: 
+5,8,openehr,en,subject relationship,maternal grandfather,Relationship of maternal grandfather to subject of EHR ,HL7: CEN: 
+6,9,openehr,en,subject relationship,father,The party is the father of the subject of the EHR ,HL7: CEN: 
+7,10,openehr,en,subject relationship,mother,The party is the mother of the subject of EHR ,HL7: CEN: 
+8,22,openehr,en,subject relationship,partner/spouse,The husband or wife or life partner of the subject of EHR ,HL7: CEN: 
+9,23,openehr,en,subject relationship,brother,Relationship of brother to subject of EHR ,HL7: CEN: 
+10,24,openehr,en,subject relationship,sister,Relationship of sister to subject of EHR ,HL7: CEN: 
+11,25,openehr,en,subject relationship,step or half brother,Relationship of step or half brother to subject of EHR ,HL7: CEN: 
+12,26,openehr,en,subject relationship,step or half sister,Relationship of step or half sister to subject of EHR ,HL7: CEN: 
+13,27,openehr,en,subject relationship,sibling,Relationship of sibling to subject of EHR ,HL7: CEN: 
+14,28,openehr,en,subject relationship,child,Relationship of child to subject of EHR ,HL7: CEN: 
+15,29,openehr,en,subject relationship,daughter,Relationship of daughter to subject of EHR ,HL7: CEN: 
+16,31,openehr,en,subject relationship,son,Relationship of son to subject of EHR ,HL7: CEN: 
+17,36,openehr,en,subject relationship,paternal grandfather,Relationship of aternal grandfather to subject of EHR ,HL7: CEN: 
+18,37,openehr,en,subject relationship,paternal grandmother,Relationship of paternal grandmother to subject of EHR ,HL7: CEN: 
+19,38,openehr,en,subject relationship,maternal uncle,Relationship of maternal uncle to subject of EHR ,HL7: CEN: 
+20,39,openehr,en,subject relationship,maternal aunt,Relationship of maternal aunt to subject of EHR ,HL7: CEN: 
+21,40,openehr,en,subject relationship,paternal uncle,Relationship of paternal uncle to subject of EHR ,HL7: CEN: 
+22,41,openehr,en,subject relationship,paternal aunt,Relationship of paternal aunt to subject of EHR ,HL7: CEN: 
+23,45,openehr,en,event math function,minimum,Value of the interval-event is the minimum value of the discrete events which the interval-event summarises. ,
+24,121,openehr,en,property,Energy ,,
+25,122,openehr,en,property,Length ,,
+26,123,openehr,en,property,Loudness ,,
+27,124,openehr,en,property,Mass ,,
+28,125,openehr,en,property,Pressure ,,
+29,126,openehr,en,property,Flow rate  volume ,,
+30,127,openehr,en,property,Temperature ,,
+31,128,openehr,en,property,Time ,,
+32,129,openehr,en,property,Volume ,,
+33,130,openehr,en,property,Work ,,
+34,144,openehr,en,event math function,maximum,Value of the interval-event is the maximum value of the discrete events which the interval-event summarises. ,
+35,146,openehr,en,event math function,mean,Value of the interval-event is the average value of the discrete events which the interval-event summarises. ,
+36,147,openehr,en,event math function,change,Value of the interval-event is the net change over the period which the interval-event summarises. ,
+37,148,openehr,en,event math function,total,Value of the interval-event is the sum of the values of the discrete events which the interval-event summarises (typically differential flow measurements  e.g. blood loss). ,
+38,149,openehr,en,event math function,variation,Value of the interval-event is difference between the point maximum and point minimum over the period  in other words the value band into which all sample during a period fit. Useful for specifying a maximal allowed variation in a datum to still be considered the same (approximate) value. ,
+39,166,openehr,en,Instruction transitions,cancel,Cancel a planned Instruction  before it is booked or started. ,
+40,189,openehr,en,subject relationship,neonate,Relationship of neonate to subject of EHR ,HL7: CEN: 
+41,193,openehr,en,participation mode,not specified,Mode of participation is not specified; use only for legacy data. ,
+42,194,openehr,en,participation mode,asynchronous audiovisual; recorded video,Audio-visual communication that is not live ,
+43,195,openehr,en,participation mode,live audiovisual; videoconference; videophone,Any audio-visual communication in real time ,
+44,196,openehr,en,participation mode,recorded video,Recorded video or video mail ,
+45,197,openehr,en,participation mode,videophone,Live audio-visual communication ,
+46,198,openehr,en,participation mode,videoconferencing,Live audio-visual communication over videoconferencing or other similar equipment. ,HL7_ParticipationMode::16548 
+47,199,openehr,en,participation mode,asynchronous audio-only; dictated; voice mail,Audio-only communication that is not live. ,
+48,200,openehr,en,participation mode,dictated,Non-interactive audio-only information recorded on some medium  such as cassette tape. ,HL7_ParticipationMode::16547 
+49,201,openehr,en,participation mode,voice-mail,Audio messaging system ,
+50,202,openehr,en,participation mode,live audio-only; telephone; internet phone; teleconference,Any live audio-only communication. ,HL7_ParticipationMode::V16544 (includes live) 
+51,203,openehr,en,participation mode,teleconference,Live verbal communication over teleconference ,HL7_ParticipationMode::16546 
+52,204,openehr,en,participation mode,internet telephone,Live verbal communication over a the internet. ,HL7_ParticipationMode::16546 
+53,205,openehr,en,participation mode,telephone,Live verbal communication over a telephone. ,HL7_ParticipationMode::16546 
+54,206,openehr,en,participation mode,asynchronous text; email; fax; letter; handwritten note; SMS message,Any text-only communication including email  written text  SMS message etc. ,HL7_ParticipationMode::V16549 
+55,207,openehr,en,participation mode,email,Written communication by email. ,HL7_ParticipationMode::16553 [ inlcude HL7_ParticipationMode::16554 (electronic data)] 
+56,208,openehr,en,participation mode,facsimile/telefax,Non-interactive written communication using a fax machine. ,HL7_ParticipationMode::16552 
+57,209,openehr,en,participation mode,SMS message,Messages sent via mobile/cell phone ,
+58,210,openehr,en,participation mode,printed/typed letter,Written communication by typewritten document. ,HL7_ParticipationMode::16551 
+59,211,openehr,en,participation mode,handwritten note,Written communication by handwritten document. ,HL7_ParticipationMode::16550 
+60,212,openehr,en,participation mode,live text-only; internet chat; SMS chat; interactive written note,Any live text-only communication ,
+61,213,openehr,en,participation mode,internet chat,Live text-only communication over the internet ,
+62,214,openehr,en,participation mode,SMS chat,Live text-only chat over mobile/cell phone ,
+63,215,openehr,en,participation mode,interactive written note,Live text-only communication using written notes ,HL7_ParticipationMode::16550 
+64,216,openehr,en,participation mode,face-to-face communication,Face to face communications between parties in the same room. ,HL7_ParticipationMode::16545 
+65,217,openehr,en,participation mode,signing (face-toface),Live face-to-face communication using a recognised sign language. ,
+66,218,openehr,en,participation mode,signing over video,Live video communication using sign language. ,
+67,219,openehr,en,participation mode,physically present,Participation by actions  where the participant is physically present. ,HL7_ParticipationMode::16556 
+68,220,openehr,en,participation mode,physically remote,Participation by actions  where the participant is not physically present  and the actions are transmitted by electronic means. ,HL7_ParticipationMode::16557 
+69,221,openehr,en,participation mode,translated text,Non-interactive written communication requiring translation ,HL7_ParticipationMode::V16549 
+70,222,openehr,en,participation mode,interpreted audio-only,Any live audio-only communication using an interpreter. ,HL7_ParticipationMode::V16544 (includes live) 
+71,223,openehr,en,participation mode,interpreted face-toface communication,Face to face communications between parties in the same room with an interpreter ,HL7_ParticipationMode::16545 
+72,224,openehr,en,participation mode,interpreted video communication,Live audio-visual communication involving an interpreter ,
+73,240,openehr,en,attestation reason,signed,The attested information has been signed by its signatory. ,HL7_ParticipationSignature::10284 
+74,245,openehr,en,Instruction transitions,active,The instruction is currently being carried out ,
+75,249,openehr,en,audit change type,creation,Change type was creation. ,HL7_CDA: CEN: 
+76,250,openehr,en,audit change type,amendment,Change type was amendment i.e. correction of the previous version. ,HL7_CDA: CEN: 
+77,251,openehr,en,audit change type,modification,Change type was update of the previous version. ,HL7_CDA: CEN: 
+78,252,openehr,en,audit change type,synthesis,Change type was creation synthesis of data due to conversion process  typically a data importer. ,HL7_CDA: CEN: 
+79,253,openehr,en,null flavours,unknown,A possible value exists but is not provided. ,HL7_NullFlavor::V10612 
+80,254,openehr,en,subject relationship,parent,Relationship of parent to subject of EHR ,HL7: CEN: 
+81,255,openehr,en,subject relationship,biological mother,Relationship of biological mother to subject of EHR ,HL7: CEN: 
+82,256,openehr,en,subject relationship,biological father,Relationship of biological father to subject of EHR ,HL7: CEN: 
+83,257,openehr,en,subject relationship,cousin,Relationship of cousin to subject of EHR ,HL7: CEN: 
+84,258,openehr,en,subject relationship,adoptive mother,Relationship of adoptive mother to subject of EHR ,HL7: CEN: 
+85,259,openehr,en,subject relationship,adoptive father,Relationship of adoptive father to subject of EHR ,HL7: CEN: 
+86,260,openehr,en,subject relationship,adopted son,Relationship of adopted son to subject of EHR ,HL7: CEN: 
+87,261,openehr,en,subject relationship,adopted daughter,Relationship of adopted daughter to subject of EHR ,HL7: CEN: 
+88,262,openehr,en,subject relationship,step mother,Relationship of step mother to subject of EHR ,HL7: CEN: 
+89,263,openehr,en,subject relationship,step father,Relationship of step father to subject of EHR ,HL7: CEN: 
+90,264,openehr,en,subject relationship,guardian,Relationship of guardianto subject of EHR ,HL7: CEN: 
+91,265,openehr,en,subject relationship,cohabitee,Lives with the subject of EHR ,HL7: CEN: 
+92,267,openehr,en,event math function,mode,Value of the interval-event is the modal (most common) value of the discrete events which the interval-event summarises. ,
+93,268,openehr,en,event math function,median,Value of the interval-event is the median (centre value in sorted series) value of the discrete events which the interval-event summarises. ,
+94,271,openehr,en,null flavours,no information,No information provided; nothing can be inferred as to the reason why  including whether there might be a possible applicable value or not. ,HL7_NullFlavor::V10610 
+95,272,openehr,en,null flavours,masked,The value has not been provided due to privacy settings. ,HL7_NullFlavor::17932 
+96,273,openehr,en,null flavours,not applicable,No valid value exists for this data item. ,HL7_NullFlavor::10611 
+97,334,openehr,en,property,Electrical current ,,
+98,335,openehr,en,property,Area ,,
+99,336,openehr,en,property,Specific volume ,,
+100,337,openehr,en,property,Specific surface ,,
+101,338,openehr,en,property,Velocity ,,
+102,339,openehr,en,property,Acceleration ,,
+103,340,openehr,en,property,Momentum ,,
+104,341,openehr,en,property,Velocity  angular ,,
+105,342,openehr,en,property,Acceleration  angular ,,
+106,343,openehr,en,property,Momentum  angular ,,
+107,344,openehr,en,property,Moment inertia  area ,,
+108,345,openehr,en,property,Moment inertia  mass ,,
+109,346,openehr,en,property,Momentum  flow rate ,,
+110,347,openehr,en,property,Flow rate  mass ,,
+111,348,openehr,en,property,Flux  mass ,,
+112,349,openehr,en,property,Mass per area ,,
+113,350,openehr,en,property,Density ,,
+114,351,openehr,en,property,Flow rate  mass/volume ,,
+115,352,openehr,en,property,Flow rate  mass/force ,,
+116,355,openehr,en,property,Force ,,
+117,356,openehr,en,property,Surface tension ,,
+118,357,openehr,en,property,Force  body ,,
+119,360,openehr,en,property,Velocity  dynamic ,,
+120,361,openehr,en,property,Velocity  kinematic ,,
+121,362,openehr,en,property,Diffusion coefficient ,,
+122,365,openehr,en,property,Energy per area ,,
+123,366,openehr,en,property,Energy density ,,
+124,367,openehr,en,property,Power  linear ,,
+125,368,openehr,en,property,Power flux ,,
+126,369,openehr,en,property,Power density ,,
+127,370,openehr,en,property,Specific energy ,,
+128,371,openehr,en,property,Specific heat  gas content ,,
+129,373,openehr,en,property,Heat transfer coefficient ,,
+130,374,openehr,en,property,Voltage  electrical ,,
+131,375,openehr,en,property,Resistance ,,
+132,377,openehr,en,property,Electrical field strength ,,
+133,378,openehr,en,property,Magnetic flux ,,
+134,379,openehr,en,property,Inductance ,,
+135,380,openehr,en,property,Qualified real ,This is a number with an arithmetic qualification (which may be no units  103 etc) allowing integers to be expressed as reals raised to a nominated power  or for real numbers alone. ,
+136,381,openehr,en,property,Amount (Eq) ,,
+137,382,openehr,en,property,Frequency ,,
+138,384,openehr,en,property,Amount (mole) ,,
+139,385,openehr,en,property,Mass (IU) ,,
+140,431,openehr,en,composition category,persistent,This Composition contains information which remains valid for (more or less) the life of the EHR. Typical persistent Compositions include family history” problem list” current medications”  and vaccination history”. The usual change type when creating a new version of a persistent composition is modification”. ,
+141,433,openehr,en,composition category,event,This composition pertains to a point in time or brief episode. Change types may usually be modificationor  ,
+142,497,openehr,en,property,Angle  plane ,,
+143,498,openehr,en,property,Electrical charge ,,
+144,499,openehr,en,property,Light intensity ,,
+145,500,openehr,en,property,Angle  solid ,,
+146,501,openehr,en,property,Electrical capacitance ,,
+147,502,openehr,en,property,Electrical conductance ,,
+148,503,openehr,en,property,Magnetic flux density ,,
+149,504,openehr,en,property,Luminous flux ,,
+150,505,openehr,en,property,Illuminance ,,
+151,506,openehr,en,property,Radioactivity ,,
+152,507,openehr,en,property,Proportion ,,
+153,508,openehr,en,property,Energy dose ,,
+154,521,openehr,en,event math function,decrease,This is a change - as in 147 - except indicates that the value  while a positive number  is actually a negative change. Typically used for negative changes like weight loss: 5kgor blood pressure postural drop of 10 mm[Hg]”. ,
+155,522,openehr,en,event math function,increase,This is also a change  but is only a positive change and cannot be expressed as a negative. This can be used for positive changes like Weight gain: 2.5kg”. ,
+156,523,openehr,en,version lifecycle state,deleted,Item has been logically deleted. ,
+157,523,openehr,en,audit change type,deleted,Change type was logical deletion. ,HL7_CDA: CEN: 
+158,524,openehr,en,Instruction transitions,initial,The instruction is recorded but no state is determined ,
+159,526,openehr,en,Instruction transitions,planned,The instruction is planned ,
+160,527,openehr,en,Instruction transitions,postponed,The instruction has been posponed - it had not be commenced ,
+161,528,openehr,en,Instruction transitions,cancelled,The instruction has been cancelled - it had not been commenced and will not commence in the future ,
+162,529,openehr,en,Instruction transitions,scheduled,The instruction has been scheduled to be carried out at a particular time ,
+163,530,openehr,en,Instruction transitions,suspended,The instruction is suspended  it has been activated but is not active at present. It could be active again in the future. ,
+164,531,openehr,en,Instruction transitions,aborted,The instruction is aborted  it has been activated but ceased before it has been completed and will not be restarted in the future. ,
+165,532,openehr,en,version lifecycle state,complete,Item is complete at time of committal. ,
+166,532,openehr,en,Instruction transitions,completed,The instruction has been completed ,
+167,533,openehr,en,Instruction transitions,expired,The instruction has expired  timed out - and assumed to have either been cancelled  aborted or completed ,
+168,535,openehr,en,Instruction transitions,initiate,Initiate the planning of the Instruction. ,
+169,536,openehr,en,Instruction transitions,plan step,Any step in the planned state of the Instruction  e.g. signing  approving. ,
+170,537,openehr,en,Instruction transitions,postpone,Put a planned Instruction on hold  while still in the planning stage  i.e. before it has been booked or started. ,
+171,538,openehr,en,Instruction transitions,restore,Restore a previously postponed Instruction back to the planned state. ,
+172,539,openehr,en,Instruction transitions,schedule,Where booking is required  book the activities in the Instruction in a scheduling system. ,
+173,540,openehr,en,Instruction transitions,start,Start executing the activities in the Instruction  e.g. commence drug administration course. ,
+174,540,openehr,en,Instruction transitions,notify aborted,Occurs when notification of Instruction having been aborted is received after expiry. ,
+175,541,openehr,en,Instruction transitions,do,Do the activities in the Instruction in one go  taking the state machine directly from the planned to the completed state. Used for Instructions whose activities are instantaneous in the practical sense  e.g. a single vaccination  single tablet. ,
+176,542,openehr,en,Instruction transitions,postponed step,Any step in the postponed state of the Instruction. ,
+177,543,openehr,en,Instruction transitions,active step,Any step taken during the active phase of the Instruction  e.g. nurse’s observation  adjustment of dose. ,
+178,544,openehr,en,Instruction transitions,suspend,Suspend the activities from the active phase  with the possibility of later resumption. ,
+179,545,openehr,en,Instruction transitions,suspended step,Any step taken in the suspended state  e.g. nurse’s observation  pathology test to determine if the Instruction should be resumed  remain suspended or aborted. ,
+180,546,openehr,en,Instruction transitions,resume,Resume the Instruction from the suspended state. ,
+181,547,openehr,en,Instruction transitions,abort,Abort the Instruction  i.e. stop its execution permanently after it has started. ,
+182,548,openehr,en,Instruction transitions,finish,Finish performing the Instruction  taking it to the completed state. ,
+183,549,openehr,en,Instruction transitions,time out,Time out has occurred  taking the Instruction from some pervious state into the expired state. ,
+184,551,openehr,en,Instruction transitions,notify completed,Occurs when notification of Instruction having been completed is received after expiry. ,
+185,552,openehr,en,Instruction transitions,notify cancelled,Occurs when notification of Instruction having been cancelled is received after expiry. ,
+186,553,openehr,en,version lifecycle state,incomplete,Item is incomplete at time of committal  in the view of the author. Further editing or review needed before its status will be set to finished”. ,
+187,640,openehr,en,event math function,actual,Value of the datum was the value indicated during the entire time of the event  i.e. it is not an averaged or other computed value. ,
+188,648,openehr,en,attestation reason,witnessed,This attested information has been witnessed by the signatory. ,
+189,666,openehr,en,audit change type,attestation,Existing data were attested. ,HL7_CDA: CEN: 
+190,669,openehr,en,term mapping purpose,public health,Public health related term mapping. ,
+191,670,openehr,en,term mapping purpose,reimbursement,Reimbrusement / billing related term mapping. ,
+192,671,openehr,en,term mapping purpose,research study,Term mapping.for research study ,
Index: /ruby/branches/0.5.0/lib/adl_parser/lib/adl_parser.rb
===================================================================
--- /ruby/branches/0.5.0/lib/adl_parser/lib/adl_parser.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/adl_parser/lib/adl_parser.rb	(revision 167)
@@ -9,5 +9,5 @@
 require 'logger'
 
-module OpenEHR
+module OpenEhr
 
   if $DEBUG
Index: /ruby/branches/0.5.0/lib/adl_parser/lib/parser.rb
===================================================================
--- /ruby/branches/0.5.0/lib/adl_parser/lib/parser.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/adl_parser/lib/parser.rb	(revision 167)
@@ -20,5 +20,5 @@
 
 
-module OpenEHR
+module OpenEhr
   module ADL
     class Parser < Racc::Parser
Index: /ruby/branches/0.5.0/lib/adl_parser/lib/scanner.rb
===================================================================
--- /ruby/branches/0.5.0/lib/adl_parser/lib/scanner.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/adl_parser/lib/scanner.rb	(revision 167)
@@ -4,5 +4,5 @@
 
 
-module OpenEHR
+module OpenEhr
   module ADL
     module Scanner
@@ -13,5 +13,5 @@
             @parser = lambda do |input|
               Yaparc::Apply.new(Yaparc::Regex.new(/\A\[[a-zA-Z0-9()\._-]+::[a-zA-Z0-9\._-]+\]/)) do |match|
-                OpenEHR::LOG.debug("V_QUALIFIED_TERM_CODE_REF: #{match}")
+                OpenEhr::LOG.debug("V_QUALIFIED_TERM_CODE_REF: #{match}")
                 [:V_QUALIFIED_TERM_CODE_REF, match]
               end
@@ -25,5 +25,5 @@
             @parser = lambda do |input|
               Yaparc::Apply.new(Yaparc::Regex.new(/\A\[[a-zA-Z0-9][a-zA-Z0-9._\-]*\]/)) do |match|
-                OpenEHR::LOG.debug("V_TERM_CODE_REF: #{match}")
+                OpenEhr::LOG.debug("V_TERM_CODE_REF: #{match}")
                 [:V_LOCAL_TERM_CODE_REF, match]
               end
@@ -37,5 +37,5 @@
             @parser = lambda do |input|
               Yaparc::Apply.new(Yaparc::Regex.new(/\A\[[a-zA-Z0-9._\- ]+::[a-zA-Z0-9._\- ]+\]/)) do |match|
-                OpenEHR::LOG.debug("ERR_V_QUALIFIED_TERM_CODE_REF: #{match}")
+                OpenEhr::LOG.debug("ERR_V_QUALIFIED_TERM_CODE_REF: #{match}")
                 [:ERR_V_QUALIFIED_TERM_CODE_REF, match]
               end
@@ -49,5 +49,5 @@
             @parser = lambda do |input|
               Yaparc::Apply.new(Yaparc::Regex.new(/\A[A-Z][a-zA-Z0-9_]*/)) do |match|
-                OpenEHR::LOG.debug("V_TYPE_IDENTIFIER: #{match}")
+                OpenEhr::LOG.debug("V_TYPE_IDENTIFIER: #{match}")
                 [:V_TYPE_IDENTIFIER, match]
               end
@@ -61,5 +61,5 @@
             @parser = lambda do |input|
               Yaparc::Apply.new(Yaparc::Regex.new(/\A[A-Z][a-zA-Z0-9_]*<[a-zA-Z0-9,_<>]+>/)) do |match|
-                OpenEHR::LOG.debug("V_GENERIC_TYPE_IDENTIFIER: #{match}")
+                OpenEhr::LOG.debug("V_GENERIC_TYPE_IDENTIFIER: #{match}")
                 [:V_GENERIC_TYPE_IDENTIFIER, match]
               end
@@ -74,5 +74,5 @@
             @parser = lambda do |input|
               Yaparc::Apply.new(Yaparc::Regex.new(/\Aa[ct][0-9.]+/)) do |match|
-                OpenEHR::LOG.debug("V_LOCAL_CODE: #{match}")
+                OpenEhr::LOG.debug("V_LOCAL_CODE: #{match}")
                 [:V_LOCAL_CODE, match]
               end
@@ -86,5 +86,5 @@
             @parser = lambda do |input|
               Yaparc::Apply.new(Yaparc::Regex.new(/\A"([^"]*)"/m)) do |match|
-                OpenEHR::LOG.debug("V_STRING: #{match}")
+                OpenEhr::LOG.debug("V_STRING: #{match}")
                 [:V_STRING, match]
               end
@@ -98,5 +98,5 @@
             @parser = lambda do |input|
               Yaparc::Apply.new(Yaparc::Regex.new(/\A[0-9]+\.[0-9]+|[0-9]+\.[0-9]+[eE][+-]?[0-9]+/)) do |match|
-                OpenEHR::LOG.debug("V_REAL: #{match}")
+                OpenEhr::LOG.debug("V_REAL: #{match}")
                 [:V_REAL, match]
               end
@@ -113,5 +113,5 @@
                                 Yaparc::Alt.new(Yaparc::Regex.new(/\AP([0-9]+|[yY])?([0-9]+|[mM])?([0-9]+|[wW])?([0-9]+|[dD])?T([0-9]+|[hH])?([0-9]+|[mM])?([0-9]+|[sS])?/),
                                                 Yaparc::Regex.new(/\AP([0-9]+|[yY])?([0-9]+|[mM])?([0-9]+|[wW])?([0-9]+|[dD])?/))) do |match|
-                OpenEHR::LOG.debug("V_ISO8601_DURATION: #{match}")
+                OpenEhr::LOG.debug("V_ISO8601_DURATION: #{match}")
                 [:V_ISO8601_DURATION, match]
               end
@@ -135,13 +135,13 @@
             @parser = lambda do |input|
               Yaparc::Alt.new(Reserved.new,
-                              OpenEHR::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF.new,
-                              OpenEHR::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF.new,
-                              OpenEHR::ADL::Scanner::Common::ERR_V_QUALIFIED_TERM_CODE_REF.new,
-                              OpenEHR::ADL::Scanner::Common::V_TYPE_IDENTIFIER.new,
-                              OpenEHR::ADL::Scanner::Common::V_GENERIC_TYPE_IDENTIFIER.new,
-                              OpenEHR::ADL::Scanner::Common::V_STRING.new,
-                              OpenEHR::ADL::Scanner::Common::V_LOCAL_CODE.new,
-                              OpenEHR::ADL::Scanner::Common::V_REAL.new,
-                              OpenEHR::ADL::Scanner::Common::V_ISO8601_DURATION.new
+                              OpenEhr::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF.new,
+                              OpenEhr::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF.new,
+                              OpenEhr::ADL::Scanner::Common::ERR_V_QUALIFIED_TERM_CODE_REF.new,
+                              OpenEhr::ADL::Scanner::Common::V_TYPE_IDENTIFIER.new,
+                              OpenEhr::ADL::Scanner::Common::V_GENERIC_TYPE_IDENTIFIER.new,
+                              OpenEhr::ADL::Scanner::Common::V_STRING.new,
+                              OpenEhr::ADL::Scanner::Common::V_LOCAL_CODE.new,
+                              OpenEhr::ADL::Scanner::Common::V_REAL.new,
+                              OpenEhr::ADL::Scanner::Common::V_ISO8601_DURATION.new
                               )
             end
@@ -155,5 +155,5 @@
           def initialize
             @parser = lambda do |input|
-              reserved_parsers = OpenEHR::ADL::Scanner::DADL::RESERVED.map do |keyword| 
+              reserved_parsers = OpenEhr::ADL::Scanner::DADL::RESERVED.map do |keyword|
                 Yaparc::Tokenize.new(
                                      Yaparc::Literal.new(keyword[0],false)
@@ -161,9 +161,9 @@
               end
               Yaparc::Alt.new(Yaparc::Apply.new(Yaparc::Alt.new(*reserved_parsers)) do |match|
-                                OpenEHR::LOG.debug("Reserved: #{match}")
-                                [OpenEHR::ADL::Scanner::DADL::RESERVED[match], OpenEHR::ADL::Scanner::DADL::RESERVED[match]]
+                                OpenEhr::LOG.debug("Reserved: #{match}")
+                                [OpenEhr::ADL::Scanner::DADL::RESERVED[match], OpenEhr::ADL::Scanner::DADL::RESERVED[match]]
                               end,
                               Yaparc::Apply.new(Yaparc::Regex.new(/\A[a-z][a-zA-Z0-9_]*/)) do |match|
-                                OpenEHR::LOG.debug("V_ATTRIBUTE_IDENTIFIER: #{match}")
+                                OpenEhr::LOG.debug("V_ATTRIBUTE_IDENTIFIER: #{match}")
                                 [:V_ATTRIBUTE_IDENTIFIER, match]
                               end)
@@ -213,5 +213,5 @@
             @parser = lambda do |input|
               Yaparc::Apply.new(Yaparc::Regex.new(/\A[yY][yY][yY][yY]-[mM?X][mM?X]-[dD?X][dD?X][T\t][hH?X][hH?X]:[mM?X][mM?X]:[sS?X][sS?X]/)) do |match|
-                OpenEHR::LOG.debug("V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN: #{match}")
+                OpenEhr::LOG.debug("V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN: #{match}")
                 [:V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN, match]
               end
@@ -226,5 +226,5 @@
             @parser = lambda do |input|
               Yaparc::Apply.new(Yaparc::Regex.new(/\A[yY][yY][yY][yY]-[mM?X][mM?X]-[dD?X][dD?X]/)) do |match|
-                OpenEHR::LOG.debug("V_ISO8601_DATE_CONSTRAINT_PATTERN: #{match}")
+                OpenEhr::LOG.debug("V_ISO8601_DATE_CONSTRAINT_PATTERN: #{match}")
                 [:V_ISO8601_DATE_CONSTRAINT_PATTERN, match]
               end
@@ -239,5 +239,5 @@
             @parser = lambda do |input|
               Yaparc::Apply.new(Yaparc::Regex.new(/\A[hH][hH]:[mM?X][mM?X]:[sS?X][sS?X]/)) do |match|
-                OpenEHR::LOG.debug("V_ISO8601_TIME_CONSTRAINT_PATTERN: #{match}")
+                OpenEhr::LOG.debug("V_ISO8601_TIME_CONSTRAINT_PATTERN: #{match}")
                 [:V_ISO8601_TIME_CONSTRAINT_PATTERN, match]
               end
@@ -253,5 +253,5 @@
               Yaparc::Apply.new(Yaparc::Alt.new(Yaparc::Regex.new(/\AP[yY]?[mM]?[wW]?[dD]?T[hH]?[mM]?[sS]?/),
                                                 Yaparc::Regex.new(/\AP[yY]?[mM]?[wW]?[dD]?/))) do |match|
-                OpenEHR::LOG.debug("V_ISO8601_DURATION_CONSTRAINT_PATTERN: #{match}")
+                OpenEhr::LOG.debug("V_ISO8601_DURATION_CONSTRAINT_PATTERN: #{match}")
                 [:V_ISO8601_DURATION_CONSTRAINT_PATTERN, match]
               end
@@ -266,5 +266,5 @@
             @parser = lambda do |input|
               Yaparc::Apply.new(Yaparc::Regex.new(/\A[A-Z][a-zA-Z0-9_]*[ \n]*\</)) do |match|
-                OpenEHR::LOG.debug("V_C_DOMAIN_TYPE: #{match}")
+                OpenEhr::LOG.debug("V_C_DOMAIN_TYPE: #{match}")
                 [:START_V_C_DOMAIN_TYPE_BLOCK, match]
               end
@@ -280,17 +280,17 @@
                               V_ISO8601_DATE_CONSTRAINT_PATTERN.new,
                               V_ISO8601_TIME_CONSTRAINT_PATTERN.new,
-                              OpenEHR::ADL::Scanner::Common::V_ISO8601_DURATION.new,
+                              OpenEhr::ADL::Scanner::Common::V_ISO8601_DURATION.new,
                               V_C_DOMAIN_TYPE.new,
                               V_ISO8601_DURATION_CONSTRAINT_PATTERN.new,
                               Reserved.new,
-                              OpenEHR::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF.new,
-                              OpenEHR::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF.new,
-                              OpenEHR::ADL::Scanner::Common::ERR_V_QUALIFIED_TERM_CODE_REF.new,
-                              OpenEHR::ADL::Scanner::Common::V_TYPE_IDENTIFIER.new,
-                              OpenEHR::ADL::Scanner::Common::V_GENERIC_TYPE_IDENTIFIER.new,
-                              OpenEHR::ADL::Scanner::Common::V_STRING.new,
-                              OpenEHR::ADL::Scanner::Common::V_LOCAL_CODE.new,
-                              OpenEHR::ADL::Scanner::Common::V_REAL.new,
-                              OpenEHR::ADL::Scanner::Common::V_ISO8601_DURATION.new
+                              OpenEhr::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF.new,
+                              OpenEhr::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF.new,
+                              OpenEhr::ADL::Scanner::Common::ERR_V_QUALIFIED_TERM_CODE_REF.new,
+                              OpenEhr::ADL::Scanner::Common::V_TYPE_IDENTIFIER.new,
+                              OpenEhr::ADL::Scanner::Common::V_GENERIC_TYPE_IDENTIFIER.new,
+                              OpenEhr::ADL::Scanner::Common::V_STRING.new,
+                              OpenEhr::ADL::Scanner::Common::V_LOCAL_CODE.new,
+                              OpenEhr::ADL::Scanner::Common::V_REAL.new,
+                              OpenEhr::ADL::Scanner::Common::V_ISO8601_DURATION.new
                               )
             end
@@ -310,9 +310,9 @@
               end
               Yaparc::Alt.new(Yaparc::Apply.new(Yaparc::Alt.new(*reserved_parsers)) do |match|
-                                OpenEHR::LOG.debug("Reserved: #{match}")
-                                [OpenEHR::ADL::Scanner::CADL::RESERVED[match], OpenEHR::ADL::Scanner::CADL::RESERVED[match]]
+                                OpenEhr::LOG.debug("Reserved: #{match}")
+                                [OpenEhr::ADL::Scanner::CADL::RESERVED[match], OpenEhr::ADL::Scanner::CADL::RESERVED[match]]
                               end,
                               Yaparc::Apply.new(Yaparc::Regex.new(/\A[a-z][a-zA-Z0-9_]*/)) do |match|
-                                OpenEHR::LOG.debug("V_ATTRIBUTE_IDENTIFIER: #{match}")
+                                OpenEhr::LOG.debug("V_ATTRIBUTE_IDENTIFIER: #{match}")
                                 [:V_ATTRIBUTE_IDENTIFIER, match]
                               end)
Index: /ruby/branches/0.5.0/lib/adl_parser/lib/shell.rb
===================================================================
--- /ruby/branches/0.5.0/lib/adl_parser/lib/shell.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/adl_parser/lib/shell.rb	(revision 167)
@@ -3,5 +3,5 @@
 require 'stringio'
 
-module OpenEHR
+module OpenEhr
   module Application
     class Shell
Index: /ruby/branches/0.5.0/lib/adl_parser/lib/validator.rb
===================================================================
--- /ruby/branches/0.5.0/lib/adl_parser/lib/validator.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/adl_parser/lib/validator.rb	(revision 167)
@@ -3,5 +3,5 @@
 
 
-module OpenEHR
+module OpenEhr
   module ADL
 
Index: /ruby/branches/0.5.0/lib/adl_parser/test/parser_test.rb
===================================================================
--- /ruby/branches/0.5.0/lib/adl_parser/test/parser_test.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/adl_parser/test/parser_test.rb	(revision 167)
@@ -16,7 +16,7 @@
     assert_nothing_raised do
       result = @parser.parse(laboratory_request, 'openEHR-EHR-ITEM_TREE.Laboratory_request.v1.adl')
-      assert_instance_of OpenEHR::AM::Archetype::ARCHETYPE, result
-      assert_instance_of OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION, result.description
-      assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, result.definition
+      assert_instance_of OpenEhr::AM::Archetype::ARCHETYPE, result
+      assert_instance_of OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION, result.description
+      assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, result.definition
 #      assert_equal '', result.definition
     end
@@ -25,7 +25,7 @@
     assert_nothing_raised do
       result = @parser.parse(apgar, 'openEHR-EHR-OBSERVATION.apgar.v1.adl')
-      assert_instance_of OpenEHR::AM::Archetype::ARCHETYPE, result
-      assert_instance_of OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION, result.description
-      assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, result.definition
+      assert_instance_of OpenEhr::AM::Archetype::ARCHETYPE, result
+      assert_instance_of OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION, result.description
+      assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, result.definition
     end
 
Index: /ruby/branches/0.5.0/lib/adl_parser/test/scanner_test.rb
===================================================================
--- /ruby/branches/0.5.0/lib/adl_parser/test/scanner_test.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/adl_parser/test/scanner_test.rb	(revision 167)
@@ -5,12 +5,12 @@
 class YaparcParserTest < Test::Unit::TestCase
   def test_RootScanner
-    parser = OpenEHR::ADL::Scanner::DADL::RootScanner.new
-    assert_instance_of OpenEHR::ADL::Scanner::DADL::RootScanner,parser
+    parser = OpenEhr::ADL::Scanner::DADL::RootScanner.new
+    assert_instance_of OpenEhr::ADL::Scanner::DADL::RootScanner,parser
     result = parser.parse('')
   end
 
   def test_V_LOCAL_TERM_CODE_REF
-    parser = OpenEHR::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF.new
-    assert_instance_of OpenEHR::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF,parser
+    parser = OpenEhr::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF.new
+    assert_instance_of OpenEhr::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF,parser
     result = parser.parse('[en-us]')
     assert_instance_of Yaparc::Result::OK, result
@@ -18,6 +18,6 @@
 
   def test_V_QUALIFIED_TERM_CODE_REF
-    parser = OpenEHR::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF.new
-    assert_instance_of OpenEHR::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF,parser
+    parser = OpenEhr::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF.new
+    assert_instance_of OpenEhr::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF,parser
     result = parser.parse('[ISO_639::en]')
     assert_instance_of Yaparc::Result::OK, result
@@ -27,6 +27,6 @@
 
   def test_V_STRING
-    parser = OpenEHR::ADL::Scanner::Common::V_STRING.new
-    assert_instance_of OpenEHR::ADL::Scanner::Common::V_STRING,parser
+    parser = OpenEhr::ADL::Scanner::Common::V_STRING.new
+    assert_instance_of OpenEhr::ADL::Scanner::Common::V_STRING,parser
     result = parser.parse('"this is a string"')
     assert_instance_of Yaparc::Result::OK, result
@@ -36,6 +36,6 @@
 
   def test_V_REAL
-    parser = OpenEHR::ADL::Scanner::Common::V_REAL.new
-    assert_instance_of OpenEHR::ADL::Scanner::Common::V_REAL,parser
+    parser = OpenEhr::ADL::Scanner::Common::V_REAL.new
+    assert_instance_of OpenEhr::ADL::Scanner::Common::V_REAL,parser
     result = parser.parse('0.1')
     assert_instance_of Yaparc::Result::OK, result
@@ -47,6 +47,6 @@
 
   def test_V_ISO8601_DURATION
-    parser = OpenEHR::ADL::Scanner::Common::V_ISO8601_DURATION.new
-    assert_instance_of OpenEHR::ADL::Scanner::Common::V_ISO8601_DURATION,parser
+    parser = OpenEhr::ADL::Scanner::Common::V_ISO8601_DURATION.new
+    assert_instance_of OpenEhr::ADL::Scanner::Common::V_ISO8601_DURATION,parser
     result = parser.parse('PT1M')
     assert_instance_of Yaparc::Result::OK, result
@@ -57,6 +57,6 @@
 
   def test_V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN
-    parser = OpenEHR::ADL::Scanner::CADL::V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN.new
-    assert_instance_of OpenEHR::ADL::Scanner::CADL::V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN,parser
+    parser = OpenEhr::ADL::Scanner::CADL::V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN.new
+    assert_instance_of OpenEhr::ADL::Scanner::CADL::V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN,parser
     result = parser.parse('yyyy-??-??T??:??:??')
     assert_instance_of Yaparc::Result::OK, result
@@ -64,6 +64,6 @@
 
   def test_V_ISO8601_DATE_CONSTRAINT_PATTERN
-    parser = OpenEHR::ADL::Scanner::CADL::V_ISO8601_DATE_CONSTRAINT_PATTERN.new
-    assert_instance_of OpenEHR::ADL::Scanner::CADL::V_ISO8601_DATE_CONSTRAINT_PATTERN,parser
+    parser = OpenEhr::ADL::Scanner::CADL::V_ISO8601_DATE_CONSTRAINT_PATTERN.new
+    assert_instance_of OpenEhr::ADL::Scanner::CADL::V_ISO8601_DATE_CONSTRAINT_PATTERN,parser
     result = parser.parse('yyyy-mm-XX-dd')
     assert_instance_of Yaparc::Result::OK, result
@@ -71,6 +71,6 @@
 
   def test_V_ISO8601_TIME_CONSTRAINT_PATTERN
-    parser = OpenEHR::ADL::Scanner::CADL::V_ISO8601_TIME_CONSTRAINT_PATTERN.new
-    assert_instance_of OpenEHR::ADL::Scanner::CADL::V_ISO8601_TIME_CONSTRAINT_PATTERN,parser
+    parser = OpenEhr::ADL::Scanner::CADL::V_ISO8601_TIME_CONSTRAINT_PATTERN.new
+    assert_instance_of OpenEhr::ADL::Scanner::CADL::V_ISO8601_TIME_CONSTRAINT_PATTERN,parser
     result = parser.parse('hh:mm:ss:??')
     assert_instance_of Yaparc::Result::OK, result
@@ -78,5 +78,5 @@
 
   def test_dadl_reserved
-    parser = OpenEHR::ADL::Scanner::DADL::RootScanner.new
+    parser = OpenEhr::ADL::Scanner::DADL::RootScanner.new
     result = parser.parse('then')
     assert_instance_of Yaparc::Result::OK, result
@@ -87,6 +87,6 @@
 
   def test_cadl
-    parser = OpenEHR::ADL::Scanner::CADL::RootScanner.new
-    assert_instance_of OpenEHR::ADL::Scanner::CADL::RootScanner,parser
+    parser = OpenEhr::ADL::Scanner::CADL::RootScanner.new
+    assert_instance_of OpenEhr::ADL::Scanner::CADL::RootScanner,parser
     result = parser.parse('PT1M')
     assert_instance_of Yaparc::Result::OK, result
@@ -98,5 +98,5 @@
 
   def test_cadl_reserved
-    parser = OpenEHR::ADL::Scanner::CADL::RootScanner.new
+    parser = OpenEhr::ADL::Scanner::CADL::RootScanner.new
     result = parser.parse('then')
     assert_instance_of Yaparc::Result::OK, result
Index: /ruby/branches/0.5.0/lib/models/tests/rm/quantity/ts_date_time.rb
===================================================================
--- /ruby/branches/0.5.0/lib/models/tests/rm/quantity/ts_date_time.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/models/tests/rm/quantity/ts_date_time.rb	(revision 167)
@@ -1,26 +1,26 @@
 require 'test/unit'
 require 'rm'
-include OpenEHR::RM::Data_Types::Quantity::Date_Time
+include OpenEhr::RM::DataTypes::Quantity::DateTime
 
 class DateTimeTest < Test::Unit::TestCase
   def setup
     assert_nothing_raised(Exception){
-      @dv_temporal = DV_Temporal.new('2008')}
+      @dv_temporal = DvTemporal.new('2008')}
     assert_nothing_raised(Exception){
-      @dv_date = DV_Date.new('2009-06-29')}
+      @dv_date = DvDate.new('2009-06-29')}
     assert_nothing_raised(Exception){
-      @dv_time = DV_Time.new('12:34:56.78')}
+      @dv_time = DvTime.new('12:34:56.78')}
     assert_nothing_raised(Exception){
-      @dv_date_time = DV_Date_Time.new('2009-06-29T12:34:56.78')}
+      @dv_date_time = DvDateTime.new('2009-06-29T12:34:56.78')}
     assert_nothing_raised(Exception){
-      @dv_duration = DV_Duration.new('P1Y2M3W4DT5H6M7.8S')}
+      @dv_duration = DvDuration.new('P1Y2M3W4DT5H6M7.8S')}
   end
 
   def test_init
-    assert_instance_of DV_Temporal, @dv_temporal
-    assert_instance_of DV_Date, @dv_date
-    assert_instance_of DV_Time, @dv_time
-    assert_instance_of DV_Date_Time, @dv_date_time
-    assert_instance_of DV_Duration, @dv_duration
+    assert_instance_of DvTemporal, @dv_temporal
+    assert_instance_of DvDate, @dv_date
+    assert_instance_of DvTime, @dv_time
+    assert_instance_of DvDateTime, @dv_date_time
+    assert_instance_of DvDuration, @dv_duration
   end
 
@@ -36,13 +36,13 @@
     assert_equal 29, @dv_date.day
     assert_equal 733954, @dv_date.magnitude
-    date2 = DV_Date.new('2009-07-08')
+    date2 = DvDate.new('2009-07-08')
     assert_equal 'P0Y0M1W9D',@dv_date.diff(date2).value
-    date2 = DV_Date.new('2004-02-28')
-    date3 = DV_Date.new('2004-03-01')
+    date2 = DvDate.new('2004-02-28')
+    date3 = DvDate.new('2004-03-01')
     assert_equal 'P0Y0M0W2D', date2.diff(date3).value
-    date4 = DV_Date.new('2003-12-31')
+    date4 = DvDate.new('2003-12-31')
     assert_equal 'P0Y1M4W28D', date2.diff(date4).value
-    birthday = DV_Date.new('1970-04-19')
-    assert_equal 'P39Y2M1W11D', birthday.diff(DV_Date.new('2009-06-30')).value
+    birthday = DvDate.new('1970-04-19')
+    assert_equal 'P39Y2M1W11D', birthday.diff(DvDate.new('2009-06-30')).value
   end
 
@@ -54,5 +54,5 @@
     assert_equal 0.78, @dv_time.fractional_second
     assert_equal((12*60*60 + 34 * 60 + 56 + 0.78), @dv_time.magnitude)
-    dv_time2 = DV_Time.new('15:36:48.05')
+    dv_time2 = DvTime.new('15:36:48.05')
     assert_equal 'P0Y0M0W0DT3H1M51.27S', @dv_time.diff(dv_time2).value
   end
@@ -67,5 +67,5 @@
     assert_equal 56, @dv_date_time.second
     assert_equal 0.78, @dv_date_time.fractional_second
-    dv_date_time2 = DV_Date_Time.new('1970-04-19T13:55:30.12')
+    dv_date_time2 = DvDateTime.new('1970-04-19T13:55:30.12')
     assert_equal 'P39Y2M1W9DT22H39M26.66S', @dv_date_time.diff(dv_date_time2).value
   end
Index: /ruby/branches/0.5.0/lib/models/tests/rm/test_common.rb
===================================================================
--- /ruby/branches/0.5.0/lib/models/tests/rm/test_common.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/models/tests/rm/test_common.rb	(revision 167)
@@ -3,23 +3,23 @@
 require 'rm'
 
-include OpenEHR::RM::Data_Types::Text
-include OpenEHR::RM::Common::Resource
-include OpenEHR::RM::Common::Archetyped
-include OpenEHR::RM::Common::Generic
-include OpenEHR::RM::Common::Change_Control
-include OpenEHR::RM::Common::Directory
-include OpenEHR::RM::Support::Identification
-include OpenEHR::RM::Data_Types::Basic
-include OpenEHR::RM::Data_Types::Quantity
-include OpenEHR::RM::Data_Types::URI
+include OpenEhr::RM::DataTypes::Text
+include OpenEhr::RM::Common::Resource
+include OpenEhr::RM::Common::Archetyped
+include OpenEhr::RM::Common::Generic
+include OpenEhr::RM::Common::ChangeControl
+include OpenEhr::RM::Common::Directory
+include OpenEhr::RM::Support::Identification
+include OpenEhr::RM::DataTypes::Basic
+include OpenEhr::RM::DataTypes::Quantity
+include OpenEhr::RM::DataTypes::Uri
 
 class RM_Common_Resource_Test < Test::Unit::TestCase
   def setup
-    terminology_id = Terminology_ID.new('openehr')
-    code_phrase = Code_Phrase.new('ja', terminology_id)    
-    @translation_details = OpenEHR::RM::Common::Resource::Translation_Details.new(:language => code_phrase, :author => {'KOBAYASHI, Shinji', 'Ehime Univ'},
+    terminology_id = TerminologyId.new('openehr')
+    code_phrase = CodePhrase.new('ja', terminology_id)
+    @translation_details = OpenEhr::RM::Common::Resource::TranslationDetails.new(:language => code_phrase, :author => {'KOBAYASHI, Shinji', 'Ehime Univ'},
   :accreditation => 'jp', :other_details => {'ruby', 'test'})
-    @authored_resource = OpenEHR::RM::Common::Resource::Authored_Resource.new(:original_language => code_phrase, :translations => {'ja', @translation_details}, :description => "test")
-    @resource_description_item = OpenEHR::RM::Common::Resource::Resource_Description_Item.new(:language => code_phrase,
+    @authored_resource = OpenEhr::RM::Common::Resource::AuthoredResource.new(:original_language => code_phrase, :translations => {'ja', @translation_details}, :description => "test")
+    @resource_description_item = OpenEhr::RM::Common::Resource::ResourceDescriptionItem.new(:language => code_phrase,
               :purpose => 'test',
               :keywords => %w[test ruby],
@@ -29,5 +29,5 @@
               :original_resource_uri => {'issuer', 'http://openehr.jp/'},
               :other_details => {'samos', 'icicth7'})
-    @resource_description = OpenEHR::RM::Common::Resource::Resource_Description.new(:original_author => {'KOBAYASHI, Shinji' => 'Ehime University'},
+    @resource_description = OpenEhr::RM::Common::Resource::ResourceDescription.new(:original_author => {'KOBAYASHI, Shinji' => 'Ehime University'},
     :lifecycle_state => 'experimental',
     :details => {'ja', @resource_description_item},
@@ -36,12 +36,12 @@
     :other_details => {'ja', 'shikoku'},
     :parent_resource => @authored_resource)
-    @authored_resource = OpenEHR::RM::Common::Resource::Authored_Resource.new(:original_language => code_phrase, :translations => {'ja', @translation_details}, :description => @resource_description)
+    @authored_resource = OpenEhr::RM::Common::Resource::AuthoredResource.new(:original_language => code_phrase, :translations => {'ja', @translation_details}, :description => @resource_description)
   end
 
   def test_init
-    assert_instance_of OpenEHR::RM::Common::Resource::Authored_Resource, @authored_resource
-    assert_instance_of OpenEHR::RM::Common::Resource::Translation_Details, @translation_details
-    assert_instance_of OpenEHR::RM::Common::Resource::Resource_Description_Item, @resource_description_item
-    assert_instance_of OpenEHR::RM::Common::Resource::Resource_Description, @resource_description
+    assert_instance_of OpenEhr::RM::Common::Resource::AuthoredResource, @authored_resource
+    assert_instance_of OpenEhr::RM::Common::Resource::TranslationDetails, @translation_details
+    assert_instance_of OpenEhr::RM::Common::Resource::ResourceDescriptionItem, @resource_description_item
+    assert_instance_of OpenEhr::RM::Common::Resource::ResourceDescription, @resource_description
   end
 
@@ -86,13 +86,13 @@
 class RM_Common_Archetyped_Test < Test::Unit::TestCase
   def setup
-    @dv_text = OpenEHR::RM::Data_Types::Text::DV_Text.new('Test')
-    @uid_based_id = OpenEHR::RM::Support::Identification::UID_Based_ID.new('rrip::0.0.5')
-    @archetype_id = OpenEHR::RM::Support::Identification::Archetype_ID.new("0.0.5", "biochemistry result_cholesterol", "entry", "ehr_rm", "openehr","cholesterol","0.0.3")
-    @template_id = OpenEHR::RM::Support::Identification::Template_ID.new('1.0.1')
-    assert_nothing_raised(Exception){@archetyped = OpenEHR::RM::Common::Archetyped::Archetyped.new(@archetype_id, '1.0.1')}
-    assert_nothing_raised(Exception){@link = OpenEHR::RM::Common::Archetyped::Link.new(OpenEHR::RM::Data_Types::Text::DV_Text.new("generic"), OpenEHR::RM::Data_Types::URI::DV_EHR_URI.new("ehr://test/"),OpenEHR::RM::Data_Types::Text::DV_Text.new("problem"))}
-    assert_nothing_raised(Exception){
-      @pathable = OpenEHR::RM::Common::Archetyped::Pathable.new }
-    name = OpenEHR::RM::Data_Types::Text::DV_Text.new('blood')
+    @dv_text = OpenEhr::RM::DataTypes::Text::DvText.new('Test')
+    @uid_based_id = OpenEhr::RM::Support::Identification::UidBasedId.new('rrip::0.0.5')
+    @archetype_id = OpenEhr::RM::Support::Identification::ArchetypeId.new("0.0.5", "biochemistry result_cholesterol", "entry", "ehr_rm", "openehr","cholesterol","0.0.3")
+    @template_id = OpenEhr::RM::Support::Identification::TemplateId.new('1.0.1')
+    assert_nothing_raised(Exception){@archetyped = OpenEhr::RM::Common::Archetyped::Archetyped.new(@archetype_id, '1.0.1')}
+    assert_nothing_raised(Exception){@link = OpenEhr::RM::Common::Archetyped::Link.new(OpenEhr::RM::DataTypes::Text::DvText.new("generic"), OpenEhr::RM::DataTypes::Uri::DvEhrUri.new("ehr://test/"),OpenEhr::RM::DataTypes::Text::DvText.new("problem"))}
+    assert_nothing_raised(Exception){
+      @pathable = OpenEhr::RM::Common::Archetyped::Pathable.new }
+    name = OpenEhr::RM::DataTypes::Text::DvText.new('blood')
     links = Set.new([@uid_based_id])
     assert_nothing_raised(Exception){
@@ -100,25 +100,25 @@
                                  :name => name,
                                  :links => links)}
-    provider = Party_Identified.new(:name => 'NERV')
-    location = Party_Identified.new(:name => 'GEOFRONT')
-    object_version_id = Object_Version_ID.new('ABC::DEF::1.3.4')
-    party_ref = Party_Ref.new('local', 'ORGANISATION', object_id)
-    assert_nothing_raised(Exception){
-      @feeder_audit_details = Feeder_Audit_Details.new(:system_id => 'MAGI',
+    provider = PartyIdentified.new(:name => 'NERV')
+    location = PartyIdentified.new(:name => 'GEOFRONT')
+    object_version_id = ObjectVersionId.new('ABC::DEF::1.3.4')
+    party_ref = PartyRef.new('local', 'ORGANISATION', object_id)
+    assert_nothing_raised(Exception){
+      @feeder_audit_details = FeederAuditDetails.new(:system_id => 'MAGI',
                                                        :provider => provider,
                                                        :location => location,
-                                                       :time => DV_Date_Time.new('2009-07-03T12:16:31'),
-                                                       :subject => Party_Proxy.new(:external_ref => party_ref),
+                                                       :time => DvDateTime.new('2009-07-03T12:16:31'),
+                                                       :subject => PartyProxy.new(:external_ref => party_ref),
                                                        :version_id => '0.0.4')}
-    feeder_audit_details = Feeder_Audit_Details.new(:system_id => 'AKAGI')
-    dv_identifier = DV_Identifier.new('NERV', 'MELCHIOR', 'RITSUKO', 'COMPUTER')
-    feeder_audit_details2 = Feeder_Audit_Details.new(:system_id => 'KATSURAGI')
-    dv_identifier2 = DV_Identifier.new('NERV', 'SHOGOUKI', 'MISATO', 'EVANGELION')
-    charset = OpenEHR::RM::Data_Types::Text::Code_Phrase.new('UTF-8','character-sets')
-    language = OpenEHR::RM::Data_Types::Text::Code_Phrase.new('ja', 'languages')
-
-    dv_encapsulated = OpenEHR::RM::Data_Types::Encapsulated::DV_Encapsulated.new(charset, language, 10)
-    assert_nothing_raised(Exception){
-      @feeder_audit = Feeder_Audit.new(:originating_system_audit => feeder_audit_details,
+    feeder_audit_details = FeederAuditDetails.new(:system_id => 'AKAGI')
+    dv_identifier = DvIdentifier.new('NERV', 'MELCHIOR', 'RITSUKO', 'COMPUTER')
+    feeder_audit_details2 = FeederAuditDetails.new(:system_id => 'KATSURAGI')
+    dv_identifier2 = DvIdentifier.new('NERV', 'SHOGOUKI', 'MISATO', 'EVANGELION')
+    charset = OpenEhr::RM::DataTypes::Text::CodePhrase.new('UTF-8','character-sets')
+    language = OpenEhr::RM::DataTypes::Text::CodePhrase.new('ja', 'languages')
+
+    dv_encapsulated = OpenEhr::RM::DataTypes::Encapsulated::DvEncapsulated.new(charset, language, 10)
+    assert_nothing_raised(Exception){
+      @feeder_audit = FeederAudit.new(:originating_system_audit => feeder_audit_details,
                                        :originating_system_item_ids => [dv_identifier],
                                        :feeder_system_audit => feeder_audit_details2,
@@ -128,10 +128,10 @@
 
   def test_init
-    assert_instance_of OpenEHR::RM::Common::Archetyped::Archetyped, @archetyped
-    assert_instance_of OpenEHR::RM::Common::Archetyped::Link, @link
-    assert_instance_of OpenEHR::RM::Common::Archetyped::Pathable, @pathable
-    assert_instance_of OpenEHR::RM::Common::Archetyped::Locatable, @locatable
-    assert_instance_of Feeder_Audit_Details, @feeder_audit_details
-    assert_instance_of Feeder_Audit, @feeder_audit
+    assert_instance_of OpenEhr::RM::Common::Archetyped::Archetyped, @archetyped
+    assert_instance_of OpenEhr::RM::Common::Archetyped::Link, @link
+    assert_instance_of OpenEhr::RM::Common::Archetyped::Pathable, @pathable
+    assert_instance_of OpenEhr::RM::Common::Archetyped::Locatable, @locatable
+    assert_instance_of FeederAuditDetails, @feeder_audit_details
+    assert_instance_of FeederAudit, @feeder_audit
   end
 
@@ -144,5 +144,5 @@
     assert_nothing_raised(Exception){@archetyped.template_id = @template_id}
     assert_equal @template_id, @archetyped.template_id
-    archetype_id2 = OpenEHR::RM::Support::Identification::Archetype_ID.new("1.0.2", "biochemistry result_cholesterol", "entry", "ehr_rm", "openehr","cholesterol","0.0.3")
+    archetype_id2 = OpenEhr::RM::Support::Identification::ArchetypeId.new("1.0.2", "biochemistry result_cholesterol", "entry", "ehr_rm", "openehr","cholesterol","0.0.3")
     assert_nothing_raised(ArgumentError){@archetyped.archetype_id = archetype_id2}
     assert_equal archetype_id2, @archetyped.archetype_id
@@ -157,13 +157,13 @@
     assert_equal 'problem', @link.type.value
     # test meaning
-    assert_nothing_raised(Exception){@link.meaning = OpenEHR::RM::Data_Types::Text::DV_Text.new('clinical')}
+    assert_nothing_raised(Exception){@link.meaning = OpenEhr::RM::DataTypes::Text::DvText.new('clinical')}
     assert_equal 'clinical', @link.meaning.value
     assert_raise(ArgumentError){@link.meaning = nil}
     # test target
-    assert_nothing_raised(Exception){@link.target = OpenEHR::RM::Data_Types::URI::DV_EHR_URI.new("ehr://try/")}
+    assert_nothing_raised(Exception){@link.target = OpenEhr::RM::DataTypes::Uri::DvEhrUri.new("ehr://try/")}
     assert_equal 'ehr://try/', @link.target.value
     assert_raise(ArgumentError){@link.target = nil}
     # test type
-    assert_nothing_raised(Exception){@link.type = OpenEHR::RM::Data_Types::Text::DV_Text.new("issue")}
+    assert_nothing_raised(Exception){@link.type = OpenEhr::RM::DataTypes::Text::DvText.new("issue")}
     assert_equal 'issue', @link.type.value
     assert_raise(ArgumentError){@link.type = nil}
@@ -190,35 +190,35 @@
 class RM_Common_Generic_Test < Test::Unit::TestCase
   def setup
-    assert_nothing_raised(Exception){party_proxy = Party_Proxy.new}
-    object_id = Object_ID.new('0.0.4')
-    party_ref = Party_Ref.new('unknown', 'ORGANISATION', object_id)
-    assert_nothing_raised(Exception){
-      @party_proxy = Party_Proxy.new(:external_ref => party_ref)}
-    assert_nothing_raised(Exception){party_self = Party_Self.new}
-    assert_nothing_raised(Exception){
-      @party_self = Party_Self.new(:external_ref => party_ref)}
+    assert_nothing_raised(Exception){party_proxy = PartyProxy.new}
+    object_id = ObjectId.new('0.0.4')
+    party_ref = PartyRef.new('unknown', 'ORGANISATION', object_id)
+    assert_nothing_raised(Exception){
+      @party_proxy = PartyProxy.new(:external_ref => party_ref)}
+    assert_nothing_raised(Exception){party_self = PartySelf.new}
+    assert_nothing_raised(Exception){
+      @party_self = PartySelf.new(:external_ref => party_ref)}
     assert_raise(ArgumentError){
-      party_identified = Party_Identified.new}
+      party_identified = PartyIdentified.new}
 
     identifiers = []
-    identifiers << DV_Identifier.new('NERV', 'MELCHIOR', 'GENDO', 'COMPUTER')
-    identifiers << DV_Identifier.new('NERV', 'CASPER', 'GENDO', 'COMPUTER')
-    identifiers << DV_Identifier.new('NERV', 'BALTHAZAR', 'GENDO', 'COMPUTER')
-    assert_nothing_raised(Exception){
-      @party_identified = Party_Identified.new(:name => 'NERV',
+    identifiers << DvIdentifier.new('NERV', 'MELCHIOR', 'GENDO', 'COMPUTER')
+    identifiers << DvIdentifier.new('NERV', 'CASPER', 'GENDO', 'COMPUTER')
+    identifiers << DvIdentifier.new('NERV', 'BALTHAZAR', 'GENDO', 'COMPUTER')
+    assert_nothing_raised(Exception){
+      @party_identified = PartyIdentified.new(:name => 'NERV',
                                                :external_ref => party_ref,
                                                :identifier => identifiers)}
 
-    terminology_id = Terminology_ID.new('test(0.04)')
-    code_phrase = Code_Phrase.new('self', terminology_id)
-    dv_coded_text = DV_Coded_Text.new('Seele',code_phrase)
-    assert_nothing_raised(Exception){
-      @party_related = Party_Related.new(:name => 'GEHIRN',
+    terminology_id = TerminologyId.new('test(0.04)')
+    code_phrase = CodePhrase.new('self', terminology_id)
+    dv_coded_text = DvCodedText.new('Seele',code_phrase)
+    assert_nothing_raised(Exception){
+      @party_related = PartyRelated.new(:name => 'GEHIRN',
                                          :relationship => dv_coded_text)}
-    dv_text = DV_Text.new('commiter')
-    dv_coded_text = DV_Coded_Text.new('present',terminology_id)
-    dv_date_time1 = DV_Date_Time.new('2009-07-04T16:30:00')
-    dv_date_time2 = DV_Date_Time.new('2009-07-14T00:00:00')
-    dv_interval = DV_Interval.new(dv_date_time1, dv_date_time2)
+    dv_text = DvText.new('commiter')
+    dv_coded_text = DvCodedText.new('present',terminology_id)
+    dv_date_time1 = DvDateTime.new('2009-07-04T16:30:00')
+    dv_date_time2 = DvDateTime.new('2009-07-14T00:00:00')
+    dv_interval = DvInterval.new(dv_date_time1, dv_date_time2)
     assert_nothing_raised(Exception){
       @participation = Participation.new(:performer => @party_proxy,
@@ -226,17 +226,17 @@
                                          :mode => dv_coded_text,
                                          :time => dv_interval)}
-    dv_date_time = DV_Date_Time.new('2009-07-04T18:56:00')
-    terminology_id = Terminology_ID.new('openehr(1.0.2)')
-    code_phrase = Code_Phrase.new('249', terminology_id)
-    dv_coded_text = DV_Coded_Text.new('creation', code_phrase)
-    dv_text = DV_Text.new('test environment')
-    assert_nothing_raised(Exception){
-      @audit_details = Audit_Details.new(:system_id => 'MAGI',
+    dv_date_time = DvDateTime.new('2009-07-04T18:56:00')
+    terminology_id = TerminologyId.new('openehr(1.0.2)')
+    code_phrase = CodePhrase.new('249', terminology_id)
+    dv_coded_text = DvCodedText.new('creation', code_phrase)
+    dv_text = DvText.new('test environment')
+    assert_nothing_raised(Exception){
+      @audit_details = AuditDetails.new(:system_id => 'MAGI',
                                          :committer => @party_proxy,
                                          :time_committed => dv_date_time,
                                          :change_type => dv_coded_text,
                                          :description => dv_text)}
-    dv_text = DV_Text.new('authorisation')
-    dv_ehr_uri = DV_EHR_URI.new('ehr://test/')
+    dv_text = DvText.new('authorisation')
+    dv_ehr_uri = DvEhrUri.new('ehr://test/')
     assert_nothing_raised(Exception){
       @attestation = Attestation.new(:system_id => 'NERV',
@@ -248,38 +248,38 @@
                                      :proof => 'hashedstring',
                                      :items => Set[dv_ehr_uri])}
-    object_version_id = Object_Version_ID.new('SHOGOUKI::NERV::1.1.1')
-    audit_details2 = Audit_Details.new(:system_id => 'MAGI',
+    object_version_id = ObjectVersionId.new('SHOGOUKI::NERV::1.1.1')
+    audit_details2 = AuditDetails.new(:system_id => 'MAGI',
                                        :committer => @party_proxy,
                                        :time_committed => dv_date_time2,
                                        :change_type => dv_coded_text)
     assert_nothing_raised(Exception){
-      @revision_history_item = Revision_History_Item.new(:audits => [@audit_details, audit_details2],
+      @revision_history_item = RevisionHistoryItem.new(:audits => [@audit_details, audit_details2],
                                                          :version_id => object_version_id)}
-    dv_date_time3 = DV_Date_Time.new('2009-07-14T12:00:00')
-    dv_date_time4 = DV_Date_Time.new('2009-07-15T00:00:00')
-    audit_details3 = Audit_Details.new(:system_id => 'MAGI',
+    dv_date_time3 = DvDateTime.new('2009-07-14T12:00:00')
+    dv_date_time4 = DvDateTime.new('2009-07-15T00:00:00')
+    audit_details3 = AuditDetails.new(:system_id => 'MAGI',
                                      :committer => @party_proxy,
                                      :time_committed => dv_date_time3,
                                      :change_type => dv_coded_text)
-    audit_details4 = Audit_Details.new(:system_id => 'MAGI',
+    audit_details4 = AuditDetails.new(:system_id => 'MAGI',
                                      :committer => @party_proxy,
                                      :time_committed => dv_date_time4,
                                      :change_type => dv_coded_text)
-    object_version_id = Object_Version_ID.new('NIGOUKI::NERV::2.2.2')
-    revision_history_item2 = Revision_History_Item.new(:audits => [audit_details3, audit_details4],
+    object_version_id = ObjectVersionId.new('NIGOUKI::NERV::2.2.2')
+    revision_history_item2 = RevisionHistoryItem.new(:audits => [audit_details3, audit_details4],
                                                       :version_id => object_version_id)
     assert_nothing_raised(Exception){
-      @revision_history = Revision_History.new([@revision_history_item, revision_history_item2])}
+      @revision_history = RevisionHistory.new([@revision_history_item, revision_history_item2])}
   end
 
   def test_init
-    assert_instance_of Party_Proxy, @party_proxy
-    assert_instance_of Party_Self, @party_self
-    assert_instance_of Party_Identified, @party_identified
+    assert_instance_of PartyProxy, @party_proxy
+    assert_instance_of PartySelf, @party_self
+    assert_instance_of PartyIdentified, @party_identified
     assert_instance_of Participation, @participation
-    assert_instance_of Audit_Details, @audit_details
+    assert_instance_of AuditDetails, @audit_details
     assert_instance_of Attestation, @attestation
-    assert_instance_of Revision_History_Item, @revision_history_item
-    assert_instance_of Revision_History, @revision_history
+    assert_instance_of RevisionHistoryItem, @revision_history_item
+    assert_instance_of RevisionHistory, @revision_history
   end
 
@@ -347,7 +347,7 @@
   def setup
     archetype_node_id = 'at0001'
-    name = DV_Text.new('folder_test')
-    object_id = Object_ID.new('1.1.1')
-    object_ref = Object_Ref.new('local', 'PARTY', object_id)
+    name = DvText.new('folder_test')
+    object_id = ObjectId.new('1.1.1')
+    object_ref = ObjectRef.new('local', 'PARTY', object_id)
     assert_nothing_raised(Exception){
       @folder = Folder.new(:archetype_node_id => archetype_node_id,
@@ -359,5 +359,5 @@
   
   def test_init
-    assert_instance_of OpenEHR::RM::Common::Directory::Folder, @folder
+    assert_instance_of OpenEhr::RM::Common::Directory::Folder, @folder
   end
 
@@ -370,22 +370,22 @@
 class RM_Common_Change_Control_Test < Test::Unit::TestCase
   def setup
-    object_version_id1 = Object_Version_ID.new('ABC::DEF::2.2.3')
-    object_version_id2 = Object_Version_ID.new('GHI::JKL::4.5.6')
-    object_id = Object_ID.new('ehr://uniqueid1020')
-    dv_date_time = DV_Date_Time.new('2009-07-06T21:10:12')
-    party_ref = Party_Ref.new('unknown', 'ORGANISATION', object_id)
-    party_proxy = Party_Proxy.new(:external_ref => party_ref)
-    terminology_id = Terminology_ID.new('openehr(1.0.2)')
-    code_phrase = Code_Phrase.new('249', terminology_id)
-    dv_coded_text = DV_Coded_Text.new('creation', code_phrase)
-    audit_details = Audit_Details.new(:system_id => 'MAGI',
+    object_version_id1 = ObjectVersionId.new('ABC::DEF::2.2.3')
+    object_version_id2 = ObjectVersionId.new('GHI::JKL::4.5.6')
+    object_id = ObjectId.new('ehr://uniqueid1020')
+    dv_date_time = DvDateTime.new('2009-07-06T21:10:12')
+    party_ref = PartyRef.new('unknown', 'ORGANISATION', object_id)
+    party_proxy = PartyProxy.new(:external_ref => party_ref)
+    terminology_id = TerminologyId.new('openehr(1.0.2)')
+    code_phrase = CodePhrase.new('249', terminology_id)
+    dv_coded_text = DvCodedText.new('creation', code_phrase)
+    audit_details = AuditDetails.new(:system_id => 'MAGI',
                                       :committer => party_proxy,
                                       :time_committed => dv_date_time,
                                       :change_type => dv_coded_text)
-    code_phrase = Code_Phrase.new('532', terminology_id)
-    dv_coded_text = DV_Coded_Text.new('complete', code_phrase)
-    object_id = Object_ID.new('ehr://test_location')
-    object_ref = Object_Ref.new('local', 'PARTY', object_id)
-    hier_object_id = Hier_Object_ID.new('ABC')
+    code_phrase = CodePhrase.new('532', terminology_id)
+    dv_coded_text = DvCodedText.new('complete', code_phrase)
+    object_id = ObjectId.new('ehr://test_location')
+    object_ref = ObjectRef.new('local', 'PARTY', object_id)
+    hier_object_id = HierObjectId.new('ABC')
     assert_nothing_raised(Exception){
       @version = Version.new(:uid => object_version_id1,
@@ -396,20 +396,20 @@
                              :signature => 'test_version',
                              :data => 'data')}
-    object_version_id3 = Object_Version_ID.new('MNO::PQR::7.8.9')
-    object_version_id4 = Object_Version_ID.new('STU::VWX::1.2.3')
-    code_phrase = Code_Phrase.new('240', terminology_id)
-    dv_coded_text2 = DV_Coded_Text.new('signed', code_phrase)
+    object_version_id3 = ObjectVersionId.new('MNO::PQR::7.8.9')
+    object_version_id4 = ObjectVersionId.new('STU::VWX::1.2.3')
+    code_phrase = CodePhrase.new('240', terminology_id)
+    dv_coded_text2 = DvCodedText.new('signed', code_phrase)
     attestation = Attestation.new(:system_id => 'NERV',
                                   :committer => party_proxy,
                                   :time_committed => dv_date_time,
                                   :change_type => dv_coded_text,
-                                  :reason => DV_Text.new('signed'))
-    dv_date_time = DV_Date_Time.new('2009-07-07T21:10:12')
-    audit_details = Audit_Details.new(:system_id => 'MAGI',
+                                  :reason => DvText.new('signed'))
+    dv_date_time = DvDateTime.new('2009-07-07T21:10:12')
+    audit_details = AuditDetails.new(:system_id => 'MAGI',
                                       :committer => party_proxy,
                                       :time_committed => dv_date_time,
                                       :change_type => dv_coded_text)
     assert_nothing_raised(Exception){
-      @original_version = Original_Version.new(:uid => object_version_id3,
+      @original_version = OriginalVersion.new(:uid => object_version_id3,
                                                :preceding_version_uid => object_version_id4,
                                                :other_input_version_uids => Set[object_version_id1, object_version_id2],
@@ -419,13 +419,13 @@
                                                :data => 'data',
                                                :lifecycle_state => dv_coded_text)}
-    dv_date_time = DV_Date_Time.new('2009-07-08T21:10:12')
-    audit_details = Audit_Details.new(:system_id => 'CASPER',
+    dv_date_time = DvDateTime.new('2009-07-08T21:10:12')
+    audit_details = AuditDetails.new(:system_id => 'CASPER',
                                       :committer => party_proxy,
                                       :time_committed => dv_date_time,
                                       :change_type => dv_coded_text,
                                       :description => 'for contribution')
-    object_ref = Object_Ref.new('unknown', 'PARTY', object_id)
-    assert_nothing_raised(Exception){
-      @imported_version = Imported_Version.new(:item => @original_version,
+    object_ref = ObjectRef.new('unknown', 'PARTY', object_id)
+    assert_nothing_raised(Exception){
+      @imported_version = ImportedVersion.new(:item => @original_version,
                                                :commit_audit => audit_details,
                                                :contribution => object_ref,
@@ -435,6 +435,6 @@
                                        :versions => Set[object_ref],
                                        :audit => audit_details)}
-    dv_date_time = DV_Date_Time.new('2009-07-08T18:10:12')
-    audit_details = Audit_Details.new(:system_id => 'MAGI',
+    dv_date_time = DvDateTime.new('2009-07-08T18:10:12')
+    audit_details = AuditDetails.new(:system_id => 'MAGI',
                                       :committer => party_proxy,
                                       :time_committed => dv_date_time,
@@ -446,5 +446,5 @@
                                 :change_type => dv_coded_text)
     assert_nothing_raised(Exception){
-      @versioned_object = Versioned_Object.new(:uid => hier_object_id,
+      @versioned_object = VersionedObject.new(:uid => hier_object_id,
                                                :owner_id => object_ref,
                                                :time_created => dv_date_time,
@@ -453,9 +453,9 @@
 
   def test_init
-    assert_instance_of OpenEHR::RM::Common::Change_Control::Version, @version
-    assert_instance_of Original_Version, @original_version
-    assert_instance_of Imported_Version, @imported_version
-    assert_instance_of OpenEHR::RM::Common::Change_Control::Contribution, @contribution
-    assert_instance_of Versioned_Object, @versioned_object
+    assert_instance_of OpenEhr::RM::Common::ChangeControl::Version, @version
+    assert_instance_of OriginalVersion, @original_version
+    assert_instance_of ImportedVersion, @imported_version
+    assert_instance_of OpenEhr::RM::Common::ChangeControl::Contribution, @contribution
+    assert_instance_of VersionedObject, @versioned_object
   end
 
@@ -505,5 +505,5 @@
     assert !@versioned_object.is_original_version?(@version.uid)
     assert @versioned_object.is_original_version?(@original_version.uid)
-    assert @versioned_object.has_version_at_time?(DV_Date_Time.new('2009-07-06T21:10:12'))
+    assert @versioned_object.has_version_at_time?(DvDateTime.new('2009-07-06T21:10:12'))
     assert_equal @version, @versioned_object.version_with_id(@version.uid)
     assert_equal @version, @versioned_object.version_at_time(@version.commit_audit.time_committed)
@@ -538,10 +538,10 @@
                                                 :item => @imported_version.item)}
     assert_equal 7, @versioned_object.version_count
-    dv_date_time = DV_Date_Time.new('2009-07-07T22:11:31')
+    dv_date_time = DvDateTime.new('2009-07-07T22:11:31')
     attestation = Attestation.new(:system_id => 'NERV2',
                                   :committer => @version.contribution,
                                   :time_committed => dv_date_time,
                                   :change_type => @original_version.commit_audit.change_type,
-                                  :reason => DV_Text.new('signed'))
+                                  :reason => DvText.new('signed'))
     assert_nothing_raised(Exception){
       @versioned_object.commit_attestation(:attestation => attestation,
Index: /ruby/branches/0.5.0/lib/models/tests/rm/test_data_types.rb
===================================================================
--- /ruby/branches/0.5.0/lib/models/tests/rm/test_data_types.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/models/tests/rm/test_data_types.rb	(revision 167)
@@ -6,21 +6,21 @@
 class RM_Data_Types_Basic_Test < Test::Unit::TestCase
   def setup
-    assert_nothing_raised(Exception){@dv_boolean = OpenEHR::RM::Data_Types::Basic::DV_Boolean.new("TRUE")}
-    @terminology_id = OpenEHR::RM::Support::Identification::Terminology_ID.new('openEHR(1.0.2)')
-    @code_phrase = OpenEHR::RM::Data_Types::Text::Code_Phrase.new('PROPOSED', @terminology_id)
-    @dv_coded_text = OpenEHR::RM::Data_Types::Text::DV_Coded_Text.new("Blood examination", @code_phrase)
-    assert_nothing_raised(Exception){@dv_state = OpenEHR::RM::Data_Types::Basic::DV_State.new(@dv_coded_text, false)}
-    assert_nothing_raised(Exception){@dv_identifier = OpenEHR::RM::Data_Types::Basic::DV_Identifier.new("Ruby Hospital","0123456-0", "Information office", "personal id")}
+    assert_nothing_raised(Exception){@dv_boolean = OpenEhr::RM::DataTypes::Basic::DvBoolean.new("TRUE")}
+    @terminology_id = OpenEhr::RM::Support::Identification::TerminologyId.new('openEHR(1.0.2)')
+    @code_phrase = OpenEhr::RM::DataTypes::Text::CodePhrase.new('PROPOSED', @terminology_id)
+    @dv_coded_text = OpenEhr::RM::DataTypes::Text::DvCodedText.new("Blood examination", @code_phrase)
+    assert_nothing_raised(Exception){@dv_state = OpenEhr::RM::DataTypes::Basic::DvState.new(@dv_coded_text, false)}
+    assert_nothing_raised(Exception){@dv_identifier = OpenEhr::RM::DataTypes::Basic::DvIdentifier.new("Ruby Hospital","0123456-0", "Information office", "personal id")}
   end
 
   def test_init
-    assert_instance_of OpenEHR::RM::Data_Types::Basic::DV_Boolean, @dv_boolean
-    assert_instance_of OpenEHR::RM::Data_Types::Basic::DV_State, @dv_state
-    assert_instance_of OpenEHR::RM::Data_Types::Basic::DV_Identifier, @dv_identifier
+    assert_instance_of OpenEhr::RM::DataTypes::Basic::DvBoolean, @dv_boolean
+    assert_instance_of OpenEhr::RM::DataTypes::Basic::DvState, @dv_state
+    assert_instance_of OpenEhr::RM::DataTypes::Basic::DvIdentifier, @dv_identifier
   end
 
   def test_constant
-    assert_equal("\r", OpenEHR::RM::Data_Types::Basic::Data_Value::CR)
-    assert_equal("\n", OpenEHR::RM::Data_Types::Basic::Data_Value::LF)
+    assert_equal("\r", OpenEhr::RM::DataTypes::Basic::DataValue::CR)
+    assert_equal("\n", OpenEhr::RM::DataTypes::Basic::DataValue::LF)
   end
 
@@ -31,5 +31,5 @@
     # inv: Value_exists
     assert_raise(ArgumentError){@dv_boolean.value=nil}
-    assert_raise(ArgumentError){OpenEHR::RM::Data_Types::Basic::DV_Boolean.new(nil)}
+    assert_raise(ArgumentError){OpenEhr::RM::DataTypes::Basic::DvBoolean.new(nil)}
   end
 
@@ -44,5 +44,5 @@
     assert_equal 'COMPLETED', @dv_state.value.defining_code.code_string
     assert @dv_state.is_terminal?
-    assert_raise(ArgumentError) {OpenEHR::RM::Data_Types::Basic::DV_State.new(nil,nil)}
+    assert_raise(ArgumentError) {OpenEhr::RM::DataTypes::Basic::DvState.new(nil,nil)}
     assert_raise(ArgumentError) {@dv_state.value=nil}
     assert_raise(ArgumentError) {@dv_state.is_terminal=nil}
@@ -62,5 +62,5 @@
     @dv_identifier.type = "test id"
     assert_equal("test id", @dv_identifier.type)
-    assert_raise(ArgumentError) {OpenEHR::RM::Data_Types::Basic::DV_Identifier.new(nil, nil, nil, nil)}
+    assert_raise(ArgumentError) {OpenEhr::RM::DataTypes::Basic::DvIdentifier.new(nil, nil, nil, nil)}
   end
 end
@@ -69,11 +69,11 @@
 class RM_Data_Types_URI_Test < Test::Unit::TestCase
   def setup
-    @dv_uri = OpenEHR::RM::Data_Types::URI::DV_URI.new("http://www.openehr.jp/changeset/test?cmd=93#file0")
-    @dv_ehr_uri = OpenEHR::RM::Data_Types::URI::DV_EHR_URI.new("ehr://1234567/87284370-2D4B-4e3d-A3F3-F303D2F4F34B@2005-08-02T04:30:00")
+    @dv_uri = OpenEhr::RM::DataTypes::Uri::DvUri.new("http://www.openehr.jp/changeset/test?cmd=93#file0")
+    @dv_ehr_uri = OpenEhr::RM::DataTypes::Uri::DvEhrUri.new("ehr://1234567/87284370-2D4B-4e3d-A3F3-F303D2F4F34B@2005-08-02T04:30:00")
   end
 
   def test_init
-    assert_instance_of OpenEHR::RM::Data_Types::URI::DV_URI, @dv_uri
-    assert_instance_of OpenEHR::RM::Data_Types::URI::DV_EHR_URI, @dv_ehr_uri    
+    assert_instance_of OpenEhr::RM::DataTypes::Uri::DvUri, @dv_uri
+    assert_instance_of OpenEhr::RM::DataTypes::Uri::DvEhrUri, @dv_ehr_uri
   end
 
@@ -98,18 +98,18 @@
 class RM_Data_Types_Text_Test < Test::Unit::TestCase
   def setup
-    assert_nothing_raised(Exception){@dv_text = OpenEHR::RM::Data_Types::Text::DV_Text.new("valid value")}
-    @terminology_id = OpenEHR::RM::Support::Identification::Terminology_ID.new('ICD10')
+    assert_nothing_raised(Exception){@dv_text = OpenEhr::RM::DataTypes::Text::DvText.new("valid value")}
+    @terminology_id = OpenEhr::RM::Support::Identification::TerminologyId.new('ICD10')
     
-    assert_nothing_raised(Exception){@code_phrase = OpenEHR::RM::Data_Types::Text::Code_Phrase.new('C92.0', @terminology_id)}
-    assert_nothing_raised(Exception){@dv_coded_text = OpenEHR::RM::Data_Types::Text::DV_Coded_Text.new("Acute Myeloid Leukemia", @code_phrase)}
-    @dv_paragraph = OpenEHR::RM::Data_Types::Text::DV_Paragraph.new(Set.new(["test1", "test2"]))
-    @term_mapping = OpenEHR::RM::Data_Types::Text::Term_Mapping.new('=',@dv_coded_text,"TEST")
+    assert_nothing_raised(Exception){@code_phrase = OpenEhr::RM::DataTypes::Text::CodePhrase.new('C92.0', @terminology_id)}
+    assert_nothing_raised(Exception){@dv_coded_text = OpenEhr::RM::DataTypes::Text::DvCodedText.new("Acute Myeloid Leukemia", @code_phrase)}
+    @dv_paragraph = OpenEhr::RM::DataTypes::Text::DvParagraph.new(Set.new(["test1", "test2"]))
+    @term_mapping = OpenEhr::RM::DataTypes::Text::TermMapping.new('=',@dv_coded_text,"TEST")
   end
 
   def test_init
-    assert_instance_of OpenEHR::RM::Data_Types::Text::DV_Text, @dv_text
-    assert_instance_of OpenEHR::RM::Data_Types::Text::Code_Phrase, @code_phrase
-    assert_instance_of OpenEHR::RM::Data_Types::Text::DV_Coded_Text, @dv_coded_text
-    assert_instance_of OpenEHR::RM::Data_Types::Text::Term_Mapping, @term_mapping
+    assert_instance_of OpenEhr::RM::DataTypes::Text::DvText, @dv_text
+    assert_instance_of OpenEhr::RM::DataTypes::Text::CodePhrase, @code_phrase
+    assert_instance_of OpenEhr::RM::DataTypes::Text::DvCodedText, @dv_coded_text
+    assert_instance_of OpenEhr::RM::DataTypes::Text::TermMapping, @term_mapping
   end
 
@@ -147,15 +147,15 @@
   def test_term_mapping
     assert_equal '=', @term_mapping.match
-    assert OpenEHR::RM::Data_Types::Text::Term_Mapping.is_valid_mach_code?('>')
-    assert OpenEHR::RM::Data_Types::Text::Term_Mapping.is_valid_mach_code?('=')
-    assert OpenEHR::RM::Data_Types::Text::Term_Mapping.is_valid_mach_code?('<')
-    assert OpenEHR::RM::Data_Types::Text::Term_Mapping.is_valid_mach_code?('?')
-    assert !OpenEHR::RM::Data_Types::Text::Term_Mapping.is_valid_mach_code?('!')
+    assert OpenEhr::RM::DataTypes::Text::TermMapping.is_valid_mach_code?('>')
+    assert OpenEhr::RM::DataTypes::Text::TermMapping.is_valid_mach_code?('=')
+    assert OpenEhr::RM::DataTypes::Text::TermMapping.is_valid_mach_code?('<')
+    assert OpenEhr::RM::DataTypes::Text::TermMapping.is_valid_mach_code?('?')
+    assert !OpenEhr::RM::DataTypes::Text::TermMapping.is_valid_mach_code?('!')
     assert_equal @dv_coded_text, @term_mapping.purpose
     assert_equal "TEST", @term_mapping.target
-    assert_raise(ArgumentError){OpenEHR::RM::Data_Types::Text::Term_Mapping.new}
-    assert_raise(ArgumentError){OpenEHR::RM::Data_Types::Text::Term_Mapping.new('!',@dv_coded_text, "invalid case")}
-    assert_raise(ArgumentError){OpenEHR::RM::Data_Types::Text::Term_Mapping.new('=',nil , "invalid case")}
-    assert_raise(ArgumentError){OpenEHR::RM::Data_Types::Text::Term_Mapping.new('=',@dv_coded_text, nil)}
+    assert_raise(ArgumentError){OpenEhr::RM::DataTypes::Text::TermMapping.new}
+    assert_raise(ArgumentError){OpenEhr::RM::DataTypes::Text::TermMapping.new('!',@dv_coded_text, "invalid case")}
+    assert_raise(ArgumentError){OpenEhr::RM::DataTypes::Text::TermMapping.new('=',nil , "invalid case")}
+    assert_raise(ArgumentError){OpenEhr::RM::DataTypes::Text::TermMapping.new('=',@dv_coded_text, nil)}
   end
 end
@@ -164,45 +164,45 @@
   def setup
     assert_nothing_raised(Exception){
-      @dv_ordered = OpenEHR::RM::Data_Types::Quantity::DV_Ordered.new }
-    assert_nothing_raised(Exception){
-      terminology = OpenEHR::RM::Support::Identification::Terminology_ID.new('urine')
-      code_phrase = OpenEHR::RM::Data_Types::Text::Code_Phrase.new('protein',terminology)
-      urinary_protein = OpenEHR::RM::Data_Types::Text::DV_Coded_Text.new('+', code_phrase)
-      @dv_ordinal1 = OpenEHR::RM::Data_Types::Quantity::DV_Ordinal.new(1, urinary_protein)
-      code_phrase = OpenEHR::RM::Data_Types::Text::Code_Phrase.new('protein',terminology)
-      urinary_protein = OpenEHR::RM::Data_Types::Text::DV_Coded_Text.new('+++', code_phrase)
-      @dv_ordinal2 = OpenEHR::RM::Data_Types::Quantity::DV_Ordinal.new(3, urinary_protein)}
-    assert_nothing_raised(Exception){
-      @dv_interval = OpenEHR::RM::Data_Types::Quantity::DV_Interval.new(@dv_ordinal1, @dv_ordinal2)}
-    meaning = OpenEHR::RM::Data_Types::Text::DV_Text.new('normal')
-    assert_nothing_raised(Exception){
-      @reference_range = OpenEHR::RM::Data_Types::Quantity::Reference_Range.new(meaning, @dv_interval)}
-    assert_nothing_raised(Exception){
-      @dv_quantified = OpenEHR::RM::Data_Types::Quantity::DV_Quantified.new(1,'=')}
-    assert_nothing_raised(Exception){
-      @dv_amount = OpenEHR::RM::Data_Types::Quantity::DV_Amount.new(2,'<')}
-    assert_nothing_raised(Exception){
-      @dv_quantity = OpenEHR::RM::Data_Types::Quantity::DV_Quantity.new(3, 'mg', '~')}
-    assert_nothing_raised(Exception){
-      @dv_count = OpenEHR::RM::Data_Types::Quantity::DV_Count.new(1)}
-    assert_nothing_raised(Exception){
-      @dv_proportion = OpenEHR::RM::Data_Types::Quantity::DV_Proportion.new(2,3,0)}
-    assert_nothing_raised(Exception){
-      @dv_absolute_quantity = OpenEHR::RM::Data_Types::Quantity::DV_Absolute_Quantity.new(7,'=')}
+      @dv_ordered = OpenEhr::RM::DataTypes::Quantity::DvOrdered.new }
+    assert_nothing_raised(Exception){
+      terminology = OpenEhr::RM::Support::Identification::TerminologyId.new('urine')
+      code_phrase = OpenEhr::RM::DataTypes::Text::CodePhrase.new('protein',terminology)
+      urinary_protein = OpenEhr::RM::DataTypes::Text::DvCodedText.new('+', code_phrase)
+      @dv_ordinal1 = OpenEhr::RM::DataTypes::Quantity::DvOrdinal.new(1, urinary_protein)
+      code_phrase = OpenEhr::RM::DataTypes::Text::CodePhrase.new('protein',terminology)
+      urinary_protein = OpenEhr::RM::DataTypes::Text::DvCodedText.new('+++', code_phrase)
+      @dv_ordinal2 = OpenEhr::RM::DataTypes::Quantity::DvOrdinal.new(3, urinary_protein)}
+    assert_nothing_raised(Exception){
+      @dv_interval = OpenEhr::RM::DataTypes::Quantity::DvInterval.new(@dv_ordinal1, @dv_ordinal2)}
+    meaning = OpenEhr::RM::DataTypes::Text::DvText.new('normal')
+    assert_nothing_raised(Exception){
+      @reference_range = OpenEhr::RM::DataTypes::Quantity::ReferenceRange.new(meaning, @dv_interval)}
+    assert_nothing_raised(Exception){
+      @dv_quantified = OpenEhr::RM::DataTypes::Quantity::DvQuantified.new(1,'=')}
+    assert_nothing_raised(Exception){
+      @dv_amount = OpenEhr::RM::DataTypes::Quantity::DvAmount.new(2,'<')}
+    assert_nothing_raised(Exception){
+      @dv_quantity = OpenEhr::RM::DataTypes::Quantity::DvQuantity.new(3, 'mg', '~')}
+    assert_nothing_raised(Exception){
+      @dv_count = OpenEhr::RM::DataTypes::Quantity::DvCount.new(1)}
+    assert_nothing_raised(Exception){
+      @dv_proportion = OpenEhr::RM::DataTypes::Quantity::DvProportion.new(2,3,0)}
+    assert_nothing_raised(Exception){
+      @dv_absolute_quantity = OpenEhr::RM::DataTypes::Quantity::DvAbsoluteQuantity.new(7,'=')}
    end
 
    def test_init
-     assert_instance_of OpenEHR::RM::Data_Types::Quantity::DV_Ordered, @dv_ordered
-     assert_instance_of OpenEHR::RM::Data_Types::Quantity::DV_Quantified, @dv_quantified
-     assert_instance_of OpenEHR::RM::Data_Types::Quantity::DV_Interval, @dv_interval
-     assert_instance_of OpenEHR::RM::Data_Types::Quantity::Reference_Range, @reference_range
-     assert_instance_of OpenEHR::RM::Data_Types::Quantity::DV_Ordinal, @dv_ordinal1
-     assert_instance_of OpenEHR::RM::Data_Types::Quantity::DV_Ordinal, @dv_ordinal2
-     assert_instance_of OpenEHR::RM::Data_Types::Quantity::DV_Quantified, @dv_quantified
-     assert_instance_of OpenEHR::RM::Data_Types::Quantity::DV_Amount, @dv_amount
-     assert_instance_of OpenEHR::RM::Data_Types::Quantity::DV_Quantity, @dv_quantity
-     assert_instance_of OpenEHR::RM::Data_Types::Quantity::DV_Count, @dv_count
-     assert_instance_of OpenEHR::RM::Data_Types::Quantity::DV_Proportion, @dv_proportion
-     assert_instance_of OpenEHR::RM::Data_Types::Quantity::DV_Absolute_Quantity, @dv_absolute_quantity
+     assert_instance_of OpenEhr::RM::DataTypes::Quantity::DvOrdered, @dv_ordered
+     assert_instance_of OpenEhr::RM::DataTypes::Quantity::DvQuantified, @dv_quantified
+     assert_instance_of OpenEhr::RM::DataTypes::Quantity::DvInterval, @dv_interval
+     assert_instance_of OpenEhr::RM::DataTypes::Quantity::ReferenceRange, @reference_range
+     assert_instance_of OpenEhr::RM::DataTypes::Quantity::DvOrdinal, @dv_ordinal1
+     assert_instance_of OpenEhr::RM::DataTypes::Quantity::DvOrdinal, @dv_ordinal2
+     assert_instance_of OpenEhr::RM::DataTypes::Quantity::DvQuantified, @dv_quantified
+     assert_instance_of OpenEhr::RM::DataTypes::Quantity::DvAmount, @dv_amount
+     assert_instance_of OpenEhr::RM::DataTypes::Quantity::DvQuantity, @dv_quantity
+     assert_instance_of OpenEhr::RM::DataTypes::Quantity::DvCount, @dv_count
+     assert_instance_of OpenEhr::RM::DataTypes::Quantity::DvProportion, @dv_proportion
+     assert_instance_of OpenEhr::RM::DataTypes::Quantity::DvAbsoluteQuantity, @dv_absolute_quantity
   end
 
@@ -214,11 +214,11 @@
     assert @dv_ordered.is_simple?
     assert_raise(NotImplementedError){@dv_ordered<=>1}
-    openehr_terminology_id = OpenEHR::RM::Support::Identification::Terminology_ID.new('openEHR')
-    normal_code = OpenEHR::RM::Data_Types::Text::Code_Phrase.new('N', openehr_terminology_id)
+    openehr_terminology_id = OpenEhr::RM::Support::Identification::TerminologyId.new('openEHR')
+    normal_code = OpenEhr::RM::DataTypes::Text::CodePhrase.new('N', openehr_terminology_id)
     assert_equal 'N', normal_code.code_string
     assert_nothing_raised(Exception){
       @dv_ordered.normal_status = normal_code }
     assert @dv_ordered.is_normal?
-    other = OpenEHR::RM::Data_Types::Quantity::DV_Ordered.new
+    other = OpenEhr::RM::DataTypes::Quantity::DvOrdered.new
     assert_raise(NotImplementedError){
       @dv_ordered.is_strictly_comparable_to?(other)}
@@ -232,8 +232,8 @@
     assert_equal 'normal', @reference_range.meaning.value
     assert_equal 1, @reference_range.range.lower.value
-    terminology = OpenEHR::RM::Support::Identification::Terminology_ID.new('urine')
-    code_phrase = OpenEHR::RM::Data_Types::Text::Code_Phrase.new('protein',terminology)
-    urinary_protein = OpenEHR::RM::Data_Types::Text::DV_Coded_Text.new('++', code_phrase)
-    dv_ordinal = OpenEHR::RM::Data_Types::Quantity::DV_Ordinal.new(2, urinary_protein)
+    terminology = OpenEhr::RM::Support::Identification::TerminologyId.new('urine')
+    code_phrase = OpenEhr::RM::DataTypes::Text::CodePhrase.new('protein',terminology)
+    urinary_protein = OpenEhr::RM::DataTypes::Text::DvCodedText.new('++', code_phrase)
+    dv_ordinal = OpenEhr::RM::DataTypes::Quantity::DvOrdinal.new(2, urinary_protein)
     assert @reference_range.is_in_range?(dv_ordinal)
     dv_ordinal.value = 6
@@ -244,10 +244,10 @@
     assert_equal 1, @dv_quantified.magnitude
     assert_equal '=', @dv_quantified.magnitude_status
-    assert !OpenEHR::RM::Data_Types::Quantity::DV_Quantified.valid_magnitude_status?('*')
-    assert OpenEHR::RM::Data_Types::Quantity::DV_Quantified.valid_magnitude_status?('>')
-    assert OpenEHR::RM::Data_Types::Quantity::DV_Quantified.valid_magnitude_status?('<')
-    assert OpenEHR::RM::Data_Types::Quantity::DV_Quantified.valid_magnitude_status?('>=')
-    assert OpenEHR::RM::Data_Types::Quantity::DV_Quantified.valid_magnitude_status?('<=')
-    assert OpenEHR::RM::Data_Types::Quantity::DV_Quantified.valid_magnitude_status?('~')
+    assert !OpenEhr::RM::DataTypes::Quantity::DvQuantified.valid_magnitude_status?('*')
+    assert OpenEhr::RM::DataTypes::Quantity::DvQuantified.valid_magnitude_status?('>')
+    assert OpenEhr::RM::DataTypes::Quantity::DvQuantified.valid_magnitude_status?('<')
+    assert OpenEhr::RM::DataTypes::Quantity::DvQuantified.valid_magnitude_status?('>=')
+    assert OpenEhr::RM::DataTypes::Quantity::DvQuantified.valid_magnitude_status?('<=')
+    assert OpenEhr::RM::DataTypes::Quantity::DvQuantified.valid_magnitude_status?('~')
     assert_nothing_raised(Exception){@dv_quantified.magnitude = 0}
     assert_equal 0, @dv_quantified.magnitude
@@ -289,6 +289,6 @@
     assert @dv_ordinal1 > @dv_ordinal2
     assert_raise(ArgumentError){@dv_ordinal1.limits = @reference_range}
-    meaning = OpenEHR::RM::Data_Types::Text::DV_Text.new('limits')
-    limit_reference_range = OpenEHR::RM::Data_Types::Quantity::Reference_Range.new(meaning, @dv_interval)
+    meaning = OpenEhr::RM::DataTypes::Text::DvText.new('limits')
+    limit_reference_range = OpenEhr::RM::DataTypes::Quantity::ReferenceRange.new(meaning, @dv_interval)
     assert_nothing_raised(Exception){@dv_ordinal1.limits = limit_reference_range}
     assert_equal 'limits', @dv_ordinal1.limits.meaning.value
@@ -299,5 +299,5 @@
     assert_equal 'mg', @dv_quantity.units
     assert_equal '~', @dv_quantity.magnitude_status
-    dv_quantity2 = OpenEHR::RM::Data_Types::Quantity::DV_Quantity.new(4, 'mg', '~')
+    dv_quantity2 = OpenEhr::RM::DataTypes::Quantity::DvQuantity.new(4, 'mg', '~')
     assert_equal 'mg', dv_quantity2.units
     assert @dv_quantity.is_strictly_comparable_to?(dv_quantity2)
@@ -318,5 +318,5 @@
   def test_dv_count
     assert_equal 1, @dv_count.magnitude
-    dv_count2 = OpenEHR::RM::Data_Types::Quantity::DV_Count.new(2)
+    dv_count2 = OpenEhr::RM::DataTypes::Quantity::DvCount.new(2)
     dv_count3 = @dv_count + dv_count2
     assert 3, dv_count3.magnitude
@@ -326,13 +326,13 @@
 
   def test_proportion_kind
-    assert_equal 0, OpenEHR::RM::Data_Types::Quantity::Proportion_Kind::PK_RATIO
-    assert_equal 1, OpenEHR::RM::Data_Types::Quantity::Proportion_Kind::PK_UNITARY
-    assert_equal 2, OpenEHR::RM::Data_Types::Quantity::Proportion_Kind::PK_PERCENT
-    assert_equal 3, OpenEHR::RM::Data_Types::Quantity::Proportion_Kind::PK_FRACTION
-    assert_equal 4, OpenEHR::RM::Data_Types::Quantity::Proportion_Kind::PK_INTEGER_FRACTION
-    assert OpenEHR::RM::Data_Types::Quantity::Proportion_Kind.valid_proportion_kind?(0)
-    assert OpenEHR::RM::Data_Types::Quantity::Proportion_Kind.valid_proportion_kind?(4)
-    assert !OpenEHR::RM::Data_Types::Quantity::Proportion_Kind.valid_proportion_kind?(-1)
-    assert !OpenEHR::RM::Data_Types::Quantity::Proportion_Kind.valid_proportion_kind?(5)
+    assert_equal 0, OpenEhr::RM::DataTypes::Quantity::ProportionKind::PK_RATIO
+    assert_equal 1, OpenEhr::RM::DataTypes::Quantity::ProportionKind::PK_UNITARY
+    assert_equal 2, OpenEhr::RM::DataTypes::Quantity::ProportionKind::PK_PERCENT
+    assert_equal 3, OpenEhr::RM::DataTypes::Quantity::ProportionKind::PK_FRACTION
+    assert_equal 4, OpenEhr::RM::DataTypes::Quantity::ProportionKind::PK_INTEGER_FRACTION
+    assert OpenEhr::RM::DataTypes::Quantity::ProportionKind.valid_proportion_kind?(0)
+    assert OpenEhr::RM::DataTypes::Quantity::ProportionKind.valid_proportion_kind?(4)
+    assert !OpenEhr::RM::DataTypes::Quantity::ProportionKind.valid_proportion_kind?(-1)
+    assert !OpenEhr::RM::DataTypes::Quantity::ProportionKind.valid_proportion_kind?(5)
   end
 
@@ -343,18 +343,18 @@
     assert_equal 2.0/3.0, @dv_proportion.magnitude
     assert @dv_proportion.is_integral?
-    dv_proportion2 = OpenEHR::RM::Data_Types::Quantity::DV_Proportion.new(1,3,0)
+    dv_proportion2 = OpenEhr::RM::DataTypes::Quantity::DvProportion.new(1,3,0)
     assert @dv_proportion.is_strictly_comparable_to?(dv_proportion2)
-    dv_proportion2 = OpenEHR::RM::Data_Types::Quantity::DV_Proportion.new(1,3,4)
+    dv_proportion2 = OpenEhr::RM::DataTypes::Quantity::DvProportion.new(1,3,4)
     assert !@dv_proportion.is_strictly_comparable_to?(dv_proportion2)
     assert_raise(ArgumentError){
-      dv_proportion2 = OpenEHR::RM::Data_Types::Quantity::DV_Proportion.new(1.5,2.3,3)}
-    assert_raise(ArgumentError){
-      dv_proportion2 = OpenEHR::RM::Data_Types::Quantity::DV_Proportion.new(10,10,1)}
-    assert_nothing_raised(Exception){
-      dv_proportion2 = OpenEHR::RM::Data_Types::Quantity::DV_Proportion.new(10,1,1)}
-    assert_raise(ArgumentError){
-      dv_proportion2 = OpenEHR::RM::Data_Types::Quantity::DV_Proportion.new(10,10,2)}
-    assert_nothing_raised(Exception){
-      dv_proportion2 = OpenEHR::RM::Data_Types::Quantity::DV_Proportion.new(10,100,2)}
+      dv_proportion2 = OpenEhr::RM::DataTypes::Quantity::DvProportion.new(1.5,2.3,3)}
+    assert_raise(ArgumentError){
+      dv_proportion2 = OpenEhr::RM::DataTypes::Quantity::DvProportion.new(10,10,1)}
+    assert_nothing_raised(Exception){
+      dv_proportion2 = OpenEhr::RM::DataTypes::Quantity::DvProportion.new(10,1,1)}
+    assert_raise(ArgumentError){
+      dv_proportion2 = OpenEhr::RM::DataTypes::Quantity::DvProportion.new(10,10,2)}
+    assert_nothing_raised(Exception){
+      dv_proportion2 = OpenEhr::RM::DataTypes::Quantity::DvProportion.new(10,100,2)}
   end
 
@@ -363,20 +363,20 @@
 class EncapsulatedTest < Test::Unit::TestCase
   def setup
-    charset = OpenEHR::RM::Data_Types::Text::Code_Phrase.new('UTF-8','character-sets')
-    language = OpenEHR::RM::Data_Types::Text::Code_Phrase.new('ja', 'languages')
-    assert_nothing_raised(Exception){
-      @dv_encapsulated = OpenEHR::RM::Data_Types::Encapsulated::DV_Encapsulated.new(charset, language, 10)}
-    assert_nothing_raised(Exception){
-      @dv_parsable = OpenEHR::RM::Data_Types::Encapsulated::DV_Parsable.new(charset, language, 10, 'XML','<TEST>test</TEST>')}
-    media_type = OpenEHR::RM::Data_Types::Text::Code_Phrase.new('text/html', 'media-types')
-    uri = OpenEHR::RM::Data_Types::URI::DV_URI.new("http://www.openehr.jp/changeset/test?cmd=93#file0")
-    assert_nothing_raised(Exception){
-      @dv_multimedia = OpenEHR::RM::Data_Types::Encapsulated::DV_Multimedia.new(charset, language, 10, media_type, uri)}
+    charset = OpenEhr::RM::DataTypes::Text::CodePhrase.new('UTF-8','character-sets')
+    language = OpenEhr::RM::DataTypes::Text::CodePhrase.new('ja', 'languages')
+    assert_nothing_raised(Exception){
+      @dv_encapsulated = OpenEhr::RM::DataTypes::Encapsulated::DvEncapsulated.new(charset, language, 10)}
+    assert_nothing_raised(Exception){
+      @dv_parsable = OpenEhr::RM::DataTypes::Encapsulated::DvParsable.new(charset, language, 10, 'XML','<TEST>test</TEST>')}
+    media_type = OpenEhr::RM::DataTypes::Text::CodePhrase.new('text/html', 'media-types')
+    uri = OpenEhr::RM::DataTypes::Uri::DvUri.new("http://www.openehr.jp/changeset/test?cmd=93#file0")
+    assert_nothing_raised(Exception){
+      @dv_multimedia = OpenEhr::RM::DataTypes::Encapsulated::DvMultimedia.new(charset, language, 10, media_type, uri)}
   end
 
   def test_init
-    assert_instance_of OpenEHR::RM::Data_Types::Encapsulated::DV_Encapsulated, @dv_encapsulated
-    assert_instance_of OpenEHR::RM::Data_Types::Encapsulated::DV_Parsable, @dv_parsable
-    assert_instance_of OpenEHR::RM::Data_Types::Encapsulated::DV_Multimedia, @dv_multimedia
+    assert_instance_of OpenEhr::RM::DataTypes::Encapsulated::DvEncapsulated, @dv_encapsulated
+    assert_instance_of OpenEhr::RM::DataTypes::Encapsulated::DvParsable, @dv_parsable
+    assert_instance_of OpenEhr::RM::DataTypes::Encapsulated::DvMultimedia, @dv_multimedia
   end
 
@@ -385,12 +385,12 @@
     assert_equal 'ja', @dv_encapsulated.language.code_string
     assert_equal 10, @dv_encapsulated.size
-    wrong_charset = OpenEHR::RM::Data_Types::Text::Code_Phrase.new('USO8000', 'character-sets')
+    wrong_charset = OpenEhr::RM::DataTypes::Text::CodePhrase.new('USO8000', 'character-sets')
     assert_raise(ArgumentError){@dv_encapsulated.charset = wrong_charset}
-    charset = OpenEHR::RM::Data_Types::Text::Code_Phrase.new('EUC-JP', 'character-sets')
+    charset = OpenEhr::RM::DataTypes::Text::CodePhrase.new('EUC-JP', 'character-sets')
     assert_nothing_raised(Exception){@dv_encapsulated.charset = charset}
     assert_equal 'EUC-JP', @dv_encapsulated.charset.code_string
-    wrong_language = OpenEHR::RM::Data_Types::Text::Code_Phrase.new('jpg', 'language')
+    wrong_language = OpenEhr::RM::DataTypes::Text::CodePhrase.new('jpg', 'language')
     assert_raise(ArgumentError){@dv_encapsulated.language = wrong_language}
-    language = OpenEHR::RM::Data_Types::Text::Code_Phrase.new('eng', 'language')
+    language = OpenEhr::RM::DataTypes::Text::CodePhrase.new('eng', 'language')
     assert_nothing_raised(Exception){@dv_encapsulated.language = language}
     assert_equal 'eng', @dv_encapsulated.language.code_string
@@ -429,12 +429,12 @@
 
 class TestDvTimeSpecification < Test::Unit::TestCase
-  include OpenEHR::RM::Data_Types::Time_Specification
-  include OpenEHR::RM::Data_Types::Encapsulated
-  def setup
-    charset = OpenEHR::RM::Data_Types::Text::Code_Phrase.new('UTF-8','character-sets')
-    language = OpenEHR::RM::Data_Types::Text::Code_Phrase.new('ja', 'languages')
-    assert_nothing_raised(Exception){
-      dv_parsable = DV_Parsable.new(charset, language, 10, 'XML','<TEST>test</TEST>')
-      @dv_time_specification = DV_Time_Specification.new(dv_parsable)}
+  include OpenEhr::RM::DataTypes::TimeSpecification
+  include OpenEhr::RM::DataTypes::Encapsulated
+  def setup
+    charset = OpenEhr::RM::DataTypes::Text::CodePhrase.new('UTF-8','character-sets')
+    language = OpenEhr::RM::DataTypes::Text::CodePhrase.new('ja', 'languages')
+    assert_nothing_raised(Exception){
+      dv_parsable = DvParsable.new(charset, language, 10, 'XML','<TEST>test</TEST>')
+      @dv_time_specification = DvTimeSpecification.new(dv_parsable)}
 #    assert_nothing_raised(Exception){
 #      @dv_periodic_time_specification = DV_Periodic_Time_Specification.new('[200004181100;200004181110]/(7d)@DWIST', charset, language, 10, 'HL7:PIVL')}
@@ -442,5 +442,5 @@
 
   def test_init
-    assert_instance_of DV_Time_Specification, @dv_time_specification
+    assert_instance_of DvTimeSpecification, @dv_time_specification
   end
 
Index: /ruby/branches/0.5.0/lib/models/tests/rm/test_security.rb
===================================================================
--- /ruby/branches/0.5.0/lib/models/tests/rm/test_security.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/models/tests/rm/test_security.rb	(revision 167)
@@ -5,9 +5,9 @@
   def setup
     assert_nothing_raised(Exception){
-      @access_control_setting = OpenEHR::RM::Security::Access_Control_Settings.new}
+      @access_control_setting = OpenEhr::RM::Security::AccessControlSettings.new}
   end
 
   def test_init
-    assert_instance_of OpenEHR::RM::Security::Access_Control_Settings, @access_control_setting
+    assert_instance_of OpenEhr::RM::Security::AccessControlSettings, @access_control_setting
   end
 end
Index: /ruby/branches/0.5.0/lib/models/tests/rm/test_support.rb
===================================================================
--- /ruby/branches/0.5.0/lib/models/tests/rm/test_support.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/models/tests/rm/test_support.rb	(revision 167)
@@ -5,6 +5,6 @@
 class RM_Support_Definition_Test < Test::Unit::TestCase
     def test_constant
-    assert_equal("\r", OpenEHR::RM::Support::Definition::OpenEHR_Definitions::CR)
-    assert_equal("\n", OpenEHR::RM::Support::Definition::OpenEHR_Definitions::LF)
+    assert_equal("\r", OpenEhr::RM::Support::Definition::OpenEHRDefinitions::CR)
+    assert_equal("\n", OpenEhr::RM::Support::Definition::OpenEHRDefinitions::LF)
   end
 end
@@ -13,32 +13,32 @@
 class RM_Support_Identification_Test < Test::Unit::TestCase
   def setup
-    assert_nothing_raised(Exception){@object_id = OpenEHR::RM::Support::Identification::Object_ID.new("0.0.3")}
-    assert_nothing_raised(Exception){@object_ref = OpenEHR::RM::Support::Identification::Object_Ref.new('local', 'ANY', @object_id)}
-    assert_nothing_raised(Exception){@archetype_id = OpenEHR::RM::Support::Identification::Archetype_ID.new("0.0.5", "biochemistry result_cholesterol", "entry", "ehr_rm", "openehr","cholesterol","0.0.3")}
-    assert_nothing_raised(Exception){@terminology_id = OpenEHR::RM::Support::Identification::Terminology_ID.new('ICD10(2003)')}
-    assert_nothing_raised(Exception){@generic_id = OpenEHR::RM::Support::Identification::Generic_ID.new("0.0.3", "openehr")}
-    assert_nothing_raised(Exception){@uid_based_id = OpenEHR::RM::Support::Identification::UID_Based_ID.new('rrip::0.0.3')}
-    assert_nothing_raised(Exception){@hier_object_id = OpenEHR::RM::Support::Identification::Hier_Object_ID.new('0.0.4')}
-    assert_nothing_raised(Exception){@locatable_ref = OpenEHR::RM::Support::Identification::Locatable_Ref.new('unknown', 'PERSON', @uid_based_id, 'data/event[at0001, standing]')}
-    assert_nothing_raised(Exception){@party_ref = OpenEHR::RM::Support::Identification::Party_Ref.new('unknown', 'ORGANISATION', @object_id)}
-    assert_nothing_raised(Exception){@access_group_ref = OpenEHR::RM::Support::Identification::Access_Group_Ref.new('unknown', 'ACCESS_GROUP', @object_id)}
-    assert_nothing_raised(Exception){@version_tree_id = OpenEHR::RM::Support::Identification::Version_Tree_ID.new('1.2.3')}
-    assert_nothing_raised(Exception){@object_version_id = OpenEHR::RM::Support::Identification::Object_Version_ID.new('ABC::DEF::1.2.3')}
+    assert_nothing_raised(Exception){@object_id = OpenEhr::RM::Support::Identification::ObjectId.new("0.0.3")}
+    assert_nothing_raised(Exception){@object_ref = OpenEhr::RM::Support::Identification::ObjectRef.new('local', 'ANY', @object_id)}
+    assert_nothing_raised(Exception){@archetype_id = OpenEhr::RM::Support::Identification::ArchetypeId.new("0.0.5", "biochemistry result_cholesterol", "entry", "ehr_rm", "openehr","cholesterol","0.0.3")}
+    assert_nothing_raised(Exception){@terminology_id = OpenEhr::RM::Support::Identification::TerminologyId.new('ICD10(2003)')}
+    assert_nothing_raised(Exception){@generic_id = OpenEhr::RM::Support::Identification::GenericId.new("0.0.3", "openehr")}
+    assert_nothing_raised(Exception){@uid_based_id = OpenEhr::RM::Support::Identification::UidBasedId.new('rrip::0.0.3')}
+    assert_nothing_raised(Exception){@hier_object_id = OpenEhr::RM::Support::Identification::HierObjectId.new('0.0.4')}
+    assert_nothing_raised(Exception){@locatable_ref = OpenEhr::RM::Support::Identification::LocatableRef.new('unknown', 'PERSON', @uid_based_id, 'data/event[at0001, standing]')}
+    assert_nothing_raised(Exception){@party_ref = OpenEhr::RM::Support::Identification::PartyRef.new('unknown', 'ORGANISATION', @object_id)}
+    assert_nothing_raised(Exception){@access_group_ref = OpenEhr::RM::Support::Identification::AccessGroupRef.new('unknown', 'ACCESS_GROUP', @object_id)}
+    assert_nothing_raised(Exception){@version_tree_id = OpenEhr::RM::Support::Identification::VersionTreeId.new('1.2.3')}
+    assert_nothing_raised(Exception){@object_version_id = OpenEhr::RM::Support::Identification::ObjectVersionId.new('ABC::DEF::1.2.3')}
   end
   
   def test_init
-    assert_instance_of OpenEHR::RM::Support::Identification::Object_ID, @object_id
-    assert_instance_of OpenEHR::RM::Support::Identification::Object_Ref, @object_ref
-    assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, @archetype_id
-    assert_instance_of OpenEHR::RM::Support::Identification::Terminology_ID, @terminology_id
-    assert_instance_of OpenEHR::RM::Support::Identification::Object_ID, @object_id
-    assert_instance_of OpenEHR::RM::Support::Identification::Generic_ID, @generic_id
-    assert_instance_of OpenEHR::RM::Support::Identification::UID_Based_ID, @uid_based_id
-    assert_instance_of OpenEHR::RM::Support::Identification::Hier_Object_ID, @hier_object_id
-    assert_instance_of OpenEHR::RM::Support::Identification::Locatable_Ref, @locatable_ref
-    assert_instance_of OpenEHR::RM::Support::Identification::Party_Ref, @party_ref
-    assert_instance_of OpenEHR::RM::Support::Identification::Access_Group_Ref, @access_group_ref
-    assert_instance_of OpenEHR::RM::Support::Identification::Version_Tree_ID, @version_tree_id
-    assert_instance_of OpenEHR::RM::Support::Identification::Object_Version_ID, @object_version_id
+    assert_instance_of OpenEhr::RM::Support::Identification::ObjectId, @object_id
+    assert_instance_of OpenEhr::RM::Support::Identification::ObjectRef, @object_ref
+    assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeId, @archetype_id
+    assert_instance_of OpenEhr::RM::Support::Identification::TerminologyId, @terminology_id
+    assert_instance_of OpenEhr::RM::Support::Identification::ObjectId, @object_id
+    assert_instance_of OpenEhr::RM::Support::Identification::GenericId, @generic_id
+    assert_instance_of OpenEhr::RM::Support::Identification::UidBasedId, @uid_based_id
+    assert_instance_of OpenEhr::RM::Support::Identification::HierObjectId, @hier_object_id
+    assert_instance_of OpenEhr::RM::Support::Identification::LocatableRef, @locatable_ref
+    assert_instance_of OpenEhr::RM::Support::Identification::PartyRef, @party_ref
+    assert_instance_of OpenEhr::RM::Support::Identification::AccessGroupRef, @access_group_ref
+    assert_instance_of OpenEhr::RM::Support::Identification::VersionTreeId, @version_tree_id
+    assert_instance_of OpenEhr::RM::Support::Identification::ObjectVersionId, @object_version_id
   end
 
@@ -49,8 +49,8 @@
     assert_raise(ArgumentError){@object_id.value=nil}
     assert_raise(ArgumentError){@object_id.value=""}
-    assert_raise(ArgumentError){@object_id = OpenEHR::RM::Support::Identification::Object_ID.new}
-    assert_raise(ArgumentError){@object_id = OpenEHR::RM::Support::Identification::Object_ID.new(nil)}
-    assert_raise(ArgumentError){@object_id = OpenEHR::RM::Support::Identification::Object_ID.new("")}
-    assert_equal @object_id, OpenEHR::RM::Support::Identification::Object_ID.new("0.0.4")
+    assert_raise(ArgumentError){@object_id = OpenEhr::RM::Support::Identification::ObjectId.new}
+    assert_raise(ArgumentError){@object_id = OpenEhr::RM::Support::Identification::ObjectId.new(nil)}
+    assert_raise(ArgumentError){@object_id = OpenEhr::RM::Support::Identification::ObjectId.new("")}
+    assert_equal @object_id, OpenEhr::RM::Support::Identification::ObjectId.new("0.0.4")
   end
 
@@ -60,10 +60,10 @@
     assert_equal @object_id, @object_ref.id
 
-    assert_raise(ArgumentError){@object_ref = OpenEHR::RM::Support::Identification::Archetype_ID.new}
-    assert_raise(ArgumentError){@object_ref = OpenEHR::RM::Support::Identification::Archetype_ID.new(nil, 'ANY', @object_id)}
-    assert_raise(ArgumentError){@object_ref = OpenEHR::RM::Support::Identification::Archetype_ID.new('', 'ANY', @object_id)}
-    assert_raise(ArgumentError){@object_ref = OpenEHR::RM::Support::Identification::Archetype_ID.new('local', nil, @object_id)}
-    assert_raise(ArgumentError){@object_ref = OpenEHR::RM::Support::Identification::Archetype_ID.new('local', '', @object_id)}
-    assert_raise(ArgumentError){@object_ref = OpenEHR::RM::Support::Identification::Archetype_ID.new('local', 'ANY', nil)}
+    assert_raise(ArgumentError){@object_ref = OpenEhr::RM::Support::Identification::ArchetypeId.new}
+    assert_raise(ArgumentError){@object_ref = OpenEhr::RM::Support::Identification::ArchetypeId.new(nil, 'ANY', @object_id)}
+    assert_raise(ArgumentError){@object_ref = OpenEhr::RM::Support::Identification::ArchetypeId.new('', 'ANY', @object_id)}
+    assert_raise(ArgumentError){@object_ref = OpenEhr::RM::Support::Identification::ArchetypeId.new('local', nil, @object_id)}
+    assert_raise(ArgumentError){@object_ref = OpenEhr::RM::Support::Identification::ArchetypeId.new('local', '', @object_id)}
+    assert_raise(ArgumentError){@object_ref = OpenEhr::RM::Support::Identification::ArchetypeId.new('local', 'ANY', nil)}
 
     assert_nothing_raised(Exception){@object_ref.namespace = 'terminology'}
@@ -79,6 +79,6 @@
     assert_raise(ArgumentError){@object_ref.type = ''}
 
-    assert_nothing_raised(Exception){@object_ref.id = OpenEHR::RM::Support::Identification::Object_ID.new("0.0.5")}
-    assert_equal OpenEHR::RM::Support::Identification::Object_ID.new("0.0.5"), @object_ref.id
+    assert_nothing_raised(Exception){@object_ref.id = OpenEhr::RM::Support::Identification::ObjectId.new("0.0.5")}
+    assert_equal OpenEhr::RM::Support::Identification::ObjectId.new("0.0.5"), @object_ref.id
     assert_raise(ArgumentError){@object_ref.id = nil}
   end
@@ -90,19 +90,19 @@
     assert_raise(ArgumentError){@archetype_id.value=nil}
     assert_raise(ArgumentError){@archetype_id.value=""}
-    assert_raise(ArgumentError){@archetype_id = OpenEHR::RM::Support::Identification::Archetype_ID.new}
-    assert_raise(ArgumentError){@archetype_id = OpenEHR::RM::Support::Identification::Archetype_ID.new(nil, "biochemistry result_cholesterol", "entry", "ehr_rm", "openehr","cholesterol","0.0.3")}
-    assert_raise(ArgumentError){@object_id = OpenEHR::RM::Support::Identification::Archetype_ID.new("", "biochemistry result_cholesterol", "entry", "ehr_rm", "openehr","cholesterol","0.0.3")}
-    assert_raise(ArgumentError){@archetype_id = OpenEHR::RM::Support::Identification::Archetype_ID.new("0.0.5", nil, "entry", "ehr_rm", "openehr","cholesterol","0.0.3")}
-    assert_raise(ArgumentError){@archetype_id = OpenEHR::RM::Support::Identification::Archetype_ID.new("0.0.5", "", "entry", "ehr_rm", "openehr","cholesterol","0.0.3")}
-    assert_raise(ArgumentError){@archetype_id = OpenEHR::RM::Support::Identification::Archetype_ID.new("0.0.5", "biochemistry result_cholesterol", nil, "ehr_rm", "openehr","cholesterol","0.0.3")}
-    assert_raise(ArgumentError){@archetype_id = OpenEHR::RM::Support::Identification::Archetype_ID.new("0.0.5", "biochemistry result_cholesterol", "", "ehr_rm", "openehr","cholesterol","0.0.3")}
-    assert_raise(ArgumentError){@archetype_id = OpenEHR::RM::Support::Identification::Archetype_ID.new("0.0.5", "biochemistry result_cholesterol", "entry", nil, "openehr","cholesterol","0.0.3")}
-    assert_raise(ArgumentError){@archetype_id = OpenEHR::RM::Support::Identification::Archetype_ID.new("0.0.5", "biochemistry result_cholesterol", "entry", "", "openehr","cholesterol","0.0.3")}
-    assert_raise(ArgumentError){@archetype_id = OpenEHR::RM::Support::Identification::Archetype_ID.new("0.0.5", "biochemistry result_cholesterol", "entry", "ehr_rm", nil,"cholesterol","0.0.3")}
-    assert_raise(ArgumentError){@archetype_id = OpenEHR::RM::Support::Identification::Archetype_ID.new("0.0.5", "biochemistry result_cholesterol", "entry", "ehr_rm", "","cholesterol","0.0.3")}
-    assert_raise(ArgumentError){@archetype_id = OpenEHR::RM::Support::Identification::Archetype_ID.new("0.0.5", "biochemistry result_cholesterol", "entry", "ehr_rm", "openehr",nil ,"0.0.3")}
-    assert_raise(ArgumentError){@archetype_id = OpenEHR::RM::Support::Identification::Archetype_ID.new("0.0.5", "biochemistry result_cholesterol", "entry", "ehr_rm", "openehr","","0.0.3")}
-    assert_raise(ArgumentError){@archetype_id = OpenEHR::RM::Support::Identification::Archetype_ID.new("0.0.5", "biochemistry result_cholesterol", "entry", "ehr_rm", "openehr","cholesterol", nil)}
-    assert_raise(ArgumentError){@archetype_id = OpenEHR::RM::Support::Identification::Archetype_ID.new("0.0.5", "biochemistry result_cholesterol", "entry", "ehr_rm", "openehr","cholesterol","")}
+    assert_raise(ArgumentError){@archetype_id = OpenEhr::RM::Support::Identification::ArchetypeId.new}
+    assert_raise(ArgumentError){@archetype_id = OpenEhr::RM::Support::Identification::ArchetypeId.new(nil, "biochemistry result_cholesterol", "entry", "ehr_rm", "openehr","cholesterol","0.0.3")}
+    assert_raise(ArgumentError){@object_id = OpenEhr::RM::Support::Identification::ArchetypeId.new("", "biochemistry result_cholesterol", "entry", "ehr_rm", "openehr","cholesterol","0.0.3")}
+    assert_raise(ArgumentError){@archetype_id = OpenEhr::RM::Support::Identification::ArchetypeId.new("0.0.5", nil, "entry", "ehr_rm", "openehr","cholesterol","0.0.3")}
+    assert_raise(ArgumentError){@archetype_id = OpenEhr::RM::Support::Identification::ArchetypeId.new("0.0.5", "", "entry", "ehr_rm", "openehr","cholesterol","0.0.3")}
+    assert_raise(ArgumentError){@archetype_id = OpenEhr::RM::Support::Identification::ArchetypeId.new("0.0.5", "biochemistry result_cholesterol", nil, "ehr_rm", "openehr","cholesterol","0.0.3")}
+    assert_raise(ArgumentError){@archetype_id = OpenEhr::RM::Support::Identification::ArchetypeId.new("0.0.5", "biochemistry result_cholesterol", "", "ehr_rm", "openehr","cholesterol","0.0.3")}
+    assert_raise(ArgumentError){@archetype_id = OpenEhr::RM::Support::Identification::ArchetypeId.new("0.0.5", "biochemistry result_cholesterol", "entry", nil, "openehr","cholesterol","0.0.3")}
+    assert_raise(ArgumentError){@archetype_id = OpenEhr::RM::Support::Identification::ArchetypeId.new("0.0.5", "biochemistry result_cholesterol", "entry", "", "openehr","cholesterol","0.0.3")}
+    assert_raise(ArgumentError){@archetype_id = OpenEhr::RM::Support::Identification::ArchetypeId.new("0.0.5", "biochemistry result_cholesterol", "entry", "ehr_rm", nil,"cholesterol","0.0.3")}
+    assert_raise(ArgumentError){@archetype_id = OpenEhr::RM::Support::Identification::ArchetypeId.new("0.0.5", "biochemistry result_cholesterol", "entry", "ehr_rm", "","cholesterol","0.0.3")}
+    assert_raise(ArgumentError){@archetype_id = OpenEhr::RM::Support::Identification::ArchetypeId.new("0.0.5", "biochemistry result_cholesterol", "entry", "ehr_rm", "openehr",nil ,"0.0.3")}
+    assert_raise(ArgumentError){@archetype_id = OpenEhr::RM::Support::Identification::ArchetypeId.new("0.0.5", "biochemistry result_cholesterol", "entry", "ehr_rm", "openehr","","0.0.3")}
+    assert_raise(ArgumentError){@archetype_id = OpenEhr::RM::Support::Identification::ArchetypeId.new("0.0.5", "biochemistry result_cholesterol", "entry", "ehr_rm", "openehr","cholesterol", nil)}
+    assert_raise(ArgumentError){@archetype_id = OpenEhr::RM::Support::Identification::ArchetypeId.new("0.0.5", "biochemistry result_cholesterol", "entry", "ehr_rm", "openehr","cholesterol","")}
 
     assert_equal "biochemistry result_cholesterol", @archetype_id.domain_concept
@@ -151,9 +151,9 @@
     assert_raise(ArgumentError){@terminology_id.value = ""}
 
-    assert_raise(ArgumentError){@terminology_id = OpenEHR::RM::Support::Identification::Terminology_ID.new}
-    assert_raise(ArgumentError){@terminology_id = OpenEHR::RM::Support::Identification::Terminology_ID.new(nil,'2008')}
-    assert_raise(ArgumentError){@terminology_id = OpenEHR::RM::Support::Identification::Terminology_ID.new('','02008')}
-    assert_raise(ArgumentError){@terminology_id = OpenEHR::RM::Support::Identification::Terminology_ID.new("SNOMED", nil)}
-    assert_nothing_raised(Exception){@terminology_id = OpenEHR::RM::Support::Identification::Terminology_ID.new("SNOMED")}
+    assert_raise(ArgumentError){@terminology_id = OpenEhr::RM::Support::Identification::TerminologyId.new}
+    assert_raise(ArgumentError){@terminology_id = OpenEhr::RM::Support::Identification::TerminologyId.new(nil,'2008')}
+    assert_raise(ArgumentError){@terminology_id = OpenEhr::RM::Support::Identification::TerminologyId.new('','02008')}
+    assert_raise(ArgumentError){@terminology_id = OpenEhr::RM::Support::Identification::TerminologyId.new("SNOMED", nil)}
+    assert_nothing_raised(Exception){@terminology_id = OpenEhr::RM::Support::Identification::TerminologyId.new("SNOMED")}
 
     assert_equal "SNOMED", @terminology_id.name
@@ -175,8 +175,8 @@
     assert_equal "openehr", @generic_id.scheme
 
-    assert_raise(ArgumentError){@generic_id = OpenEHR::RM::Support::Identification::Generic_ID.new(nil, "openehr")}
-    assert_raise(ArgumentError){@generic_id = OpenEHR::RM::Support::Identification::Generic_ID.new("", "openehr")}
-    assert_raise(ArgumentError){@generic_id = OpenEHR::RM::Support::Identification::Generic_ID.new("0.0.3", nil)}
-    assert_raise(ArgumentError){@generic_id = OpenEHR::RM::Support::Identification::Generic_ID.new("0.0.3", "")}
+    assert_raise(ArgumentError){@generic_id = OpenEhr::RM::Support::Identification::GenericId.new(nil, "openehr")}
+    assert_raise(ArgumentError){@generic_id = OpenEhr::RM::Support::Identification::GenericId.new("", "openehr")}
+    assert_raise(ArgumentError){@generic_id = OpenEhr::RM::Support::Identification::GenericId.new("0.0.3", nil)}
+    assert_raise(ArgumentError){@generic_id = OpenEhr::RM::Support::Identification::GenericId.new("0.0.3", "")}
 
     assert_raise(ArgumentError){@generic_id.value = nil}
@@ -197,6 +197,6 @@
     assert @uid_based_id.has_extension?
 
-    assert_raise(ArgumentError){@uid_based_id = OpenEHR::RM::Support::Identification::UID_Based_ID.new(nil)}
-    assert_raise(ArgumentError){@uid_based_id = OpenEHR::RM::Support::Identification::UID_Based_ID.new('')}
+    assert_raise(ArgumentError){@uid_based_id = OpenEhr::RM::Support::Identification::UidBasedId.new(nil)}
+    assert_raise(ArgumentError){@uid_based_id = OpenEhr::RM::Support::Identification::UidBasedId.new('')}
     assert_raise(ArgumentError){@uid_based_id.value = nil}
     assert_raise(ArgumentError){@uid_based_id.value = ''}
Index: /ruby/branches/0.5.0/lib/models/tests/test_archetype_model.rb
===================================================================
--- /ruby/branches/0.5.0/lib/models/tests/test_archetype_model.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/models/tests/test_archetype_model.rb	(revision 167)
@@ -5,25 +5,25 @@
 class ArchetypeModelTest < Test::Unit::TestCase
   def setup
-    @archetype = OpenEHR::AM::Archetype::ARCHETYPE.new
-    @validity_kind = OpenEHR::AM::Archetype::VALIDITY_KIND.new
+    @archetype = OpenEhr::AM::Archetype::ARCHETYPE.new
+    @validity_kind = OpenEhr::AM::Archetype::VALIDITY_KIND.new
 
-    @archetype_description = OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION.new
-    @archetype_description_item = OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION_ITEM.new
+    @archetype_description = OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION.new
+    @archetype_description_item = OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION_ITEM.new
   end
   
   def test_init
-    assert_instance_of OpenEHR::AM::Archetype::ARCHETYPE, @archetype
-    assert_instance_of OpenEHR::AM::Archetype::VALIDITY_KIND, @validity_kind
-    assert_instance_of OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION, @archetype_description
-    assert_instance_of OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION_ITEM, @archetype_description_item
-    assert_instance_of OpenEHR::AM::Archetype::ARCHETYPE, @archetype
+    assert_instance_of OpenEhr::AM::Archetype::ARCHETYPE, @archetype
+    assert_instance_of OpenEhr::AM::Archetype::VALIDITY_KIND, @validity_kind
+    assert_instance_of OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION, @archetype_description
+    assert_instance_of OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION_ITEM, @archetype_description_item
+    assert_instance_of OpenEhr::AM::Archetype::ARCHETYPE, @archetype
   end
 
   def test_create
-    archetype_instance = OpenEHR::AM::Archetype::ARCHETYPE.create() do |archetype|
+    archetype_instance = OpenEhr::AM::Archetype::ARCHETYPE.create() do |archetype|
       archetype.adl_version = '1.4'
     end
 
-    assert_instance_of OpenEHR::AM::Archetype::ARCHETYPE, archetype_instance
+    assert_instance_of OpenEhr::AM::Archetype::ARCHETYPE, archetype_instance
   end
 end
@@ -31,49 +31,49 @@
 class ArchetypeModelConstraintTest < Test::Unit::TestCase
   def setup
-    @archetype_constraint = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT.new
-    @cardinality = OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY.new    
+    @archetype_constraint = OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT.new
+    @cardinality = OpenEhr::AM::Archetype::Constraint_Model::CARDINALITY.new
     
-    @archetype_constraint = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT.new
-    @c_object = OpenEHR::AM::Archetype::Constraint_Model::C_OBJECT.new
-    @c_defined_object = OpenEHR::AM::Archetype::Constraint_Model::C_DEFINED_OBJECT.new
-    @c_attribute = OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE.new
-    @c_single_attribute = OpenEHR::AM::Archetype::Constraint_Model::C_SINGLE_ATTRIBUTE.new
-    @c_multiple_attribute = OpenEHR::AM::Archetype::Constraint_Model::C_MULTIPLE_ATTRIBUTE.new(:rm_attribute_name => 'attribute_name', :cardinality => @cardinality)
-    @c_primitive_object = OpenEHR::AM::Archetype::Constraint_Model::C_PRIMITIVE_OBJECT.new
-    @c_reference_object =  OpenEHR::AM::Archetype::Constraint_Model::C_REFERENCE_OBJECT.new
-    @archetype_internal_ref =  OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_INTERNAL_REF.new
-    @archetype_slot = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_SLOT.new
-    @constraint_ref = OpenEHR::AM::Archetype::Constraint_Model::CONSTRAINT_REF.new
-    @c_domain_type = OpenEHR::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE.new
-    @c_complex_object = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.new(:attributes => [@c_single_attribute])
+    @archetype_constraint = OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT.new
+    @c_object = OpenEhr::AM::Archetype::Constraint_Model::C_OBJECT.new
+    @c_defined_object = OpenEhr::AM::Archetype::Constraint_Model::C_DEFINED_OBJECT.new
+    @c_attribute = OpenEhr::AM::Archetype::Constraint_Model::C_ATTRIBUTE.new
+    @c_single_attribute = OpenEhr::AM::Archetype::Constraint_Model::C_SINGLE_ATTRIBUTE.new
+    @c_multiple_attribute = OpenEhr::AM::Archetype::Constraint_Model::C_MULTIPLE_ATTRIBUTE.new(:rm_attribute_name => 'attribute_name', :cardinality => @cardinality)
+    @c_primitive_object = OpenEhr::AM::Archetype::Constraint_Model::C_PRIMITIVE_OBJECT.new
+    @c_reference_object =  OpenEhr::AM::Archetype::Constraint_Model::C_REFERENCE_OBJECT.new
+    @archetype_internal_ref =  OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_INTERNAL_REF.new
+    @archetype_slot = OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_SLOT.new
+    @constraint_ref = OpenEhr::AM::Archetype::Constraint_Model::CONSTRAINT_REF.new
+    @c_domain_type = OpenEhr::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE.new
+    @c_complex_object = OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.new(:attributes => [@c_single_attribute])
   end
 
   def test_init
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT, @archetype_constraint
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_OBJECT, @c_object
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_DEFINED_OBJECT, @c_defined_object
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE, @c_attribute
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_SINGLE_ATTRIBUTE, @c_single_attribute
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_MULTIPLE_ATTRIBUTE, @c_multiple_attribute
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT, @archetype_constraint
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_OBJECT, @c_object
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_DEFINED_OBJECT, @c_defined_object
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_ATTRIBUTE, @c_attribute
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_SINGLE_ATTRIBUTE, @c_single_attribute
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_MULTIPLE_ATTRIBUTE, @c_multiple_attribute
     assert_equal 'attribute_name', @c_multiple_attribute.rm_attribute_name
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY, @c_multiple_attribute.cardinality
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_PRIMITIVE_OBJECT, @c_primitive_object
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_REFERENCE_OBJECT, @c_reference_object
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_INTERNAL_REF, @archetype_internal_ref
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_SLOT, @archetype_slot
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::CONSTRAINT_REF, @constraint_ref
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE, @c_domain_type
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, @c_complex_object
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::CARDINALITY, @c_multiple_attribute.cardinality
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_PRIMITIVE_OBJECT, @c_primitive_object
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_REFERENCE_OBJECT, @c_reference_object
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_INTERNAL_REF, @archetype_internal_ref
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_SLOT, @archetype_slot
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::CONSTRAINT_REF, @constraint_ref
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE, @c_domain_type
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, @c_complex_object
     assert_instance_of Array, @c_complex_object.attributes
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT, @archetype_constraint
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY, @cardinality
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT, @archetype_constraint
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::CARDINALITY, @cardinality
   end
 
   def test_create
-    c_complex_object = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.create(:node_id => 'test_node',
+    c_complex_object = OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.create(:node_id => 'test_node',
                                                                                          :attributes => [1,2],
                                                                                          :assumed_value => Array
                                                                                          )
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, c_complex_object
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, c_complex_object
     assert_equal 'test_node', c_complex_object.node_id
   end
@@ -83,26 +83,26 @@
   def setup
     #@c_primitive = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_PRIMITIVE.new
-    @c_boolean = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true,
+    @c_boolean = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true,
                                                                                     :false_valid => true,
                                                                                     :assumed_value => true)
-    @c_string = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_STRING.new
-    @c_integer = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_INTEGER.new
-    @c_real = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_REAL.new
-    @c_time = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_TIME.new
-    @c_date = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE.new
-    @c_date_time = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME.new
-    @c_duration = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DURATION.new
+    @c_string = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_STRING.new
+    @c_integer = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_INTEGER.new
+    @c_real = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_REAL.new
+    @c_time = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_TIME.new
+    @c_date = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DATE.new
+    @c_date_time = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME.new
+    @c_duration = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DURATION.new
   end
 
   def test_init
     #assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_PRIMITIVE, @c_primitive
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN, @c_boolean
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_STRING, @c_string
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_INTEGER, @c_integer
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_REAL, @c_real
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_TIME, @c_time
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE, @c_date
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME, @c_date_time
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DURATION, @c_duration
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN, @c_boolean
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_STRING, @c_string
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_INTEGER, @c_integer
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_REAL, @c_real
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_TIME, @c_time
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DATE, @c_date
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME, @c_date_time
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DURATION, @c_duration
   end
 
@@ -119,5 +119,5 @@
     end
     assert_raise(ArgumentError) do 
-      OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid =>false,
+      OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid =>false,
                                                                          :false_valid => false,
                                                                          :assumed_value => false)
@@ -129,11 +129,11 @@
 class ArchetypeModelOntologyTest < Test::Unit::TestCase
   def setup
-    @archetype_ontology = OpenEHR::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY.new
-    @archetype_term = OpenEHR::AM::Archetype::Ontology::ARCHETYPE_TERM.new(:code => '', :items => '')
+    @archetype_ontology = OpenEhr::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY.new
+    @archetype_term = OpenEhr::AM::Archetype::Ontology::ARCHETYPE_TERM.new(:code => '', :items => '')
   end
 
   def test_init
-    assert_instance_of OpenEHR::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY, @archetype_ontology
-    assert_instance_of OpenEHR::AM::Archetype::Ontology::ARCHETYPE_TERM, @archetype_term
+    assert_instance_of OpenEhr::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY, @archetype_ontology
+    assert_instance_of OpenEhr::AM::Archetype::Ontology::ARCHETYPE_TERM, @archetype_term
   end
 end
@@ -141,23 +141,23 @@
 class ArchetypeModelAssertionTest < Test::Unit::TestCase
   def setup
-    @assertion = OpenEHR::AM::Archetype::Assertion::ASSERTION.new
-    @assertion_variable = OpenEHR::AM::Archetype::Assertion::ASSERTION_VARIABLE.new
-    @operator_kind = OpenEHR::AM::Archetype::Assertion::OPERATOR_KIND.new
-    @expr_item = OpenEHR::AM::Archetype::Assertion::EXPR_ITEM.new
-    @expr_leaf = OpenEHR::AM::Archetype::Assertion::EXPR_LEAF.new
-    @expr_operator = OpenEHR::AM::Archetype::Assertion::EXPR_OPERATOR.new
-    @expr_unary_operator = OpenEHR::AM::Archetype::Assertion::EXPR_UNARY_OPERATOR.new
-    @expr_binary_operator = OpenEHR::AM::Archetype::Assertion::EXPR_BINARY_OPERATOR.new
+    @assertion = OpenEhr::AM::Archetype::Assertion::ASSERTION.new
+    @assertion_variable = OpenEhr::AM::Archetype::Assertion::ASSERTION_VARIABLE.new
+    @operator_kind = OpenEhr::AM::Archetype::Assertion::OPERATOR_KIND.new
+    @expr_item = OpenEhr::AM::Archetype::Assertion::EXPR_ITEM.new
+    @expr_leaf = OpenEhr::AM::Archetype::Assertion::EXPR_LEAF.new
+    @expr_operator = OpenEhr::AM::Archetype::Assertion::EXPR_OPERATOR.new
+    @expr_unary_operator = OpenEhr::AM::Archetype::Assertion::EXPR_UNARY_OPERATOR.new
+    @expr_binary_operator = OpenEhr::AM::Archetype::Assertion::EXPR_BINARY_OPERATOR.new
   end
 
   def test_init
-    assert_instance_of OpenEHR::AM::Archetype::Assertion::ASSERTION, @assertion
-    assert_instance_of OpenEHR::AM::Archetype::Assertion::ASSERTION_VARIABLE, @assertion_variable
-    assert_instance_of OpenEHR::AM::Archetype::Assertion::OPERATOR_KIND, @operator_kind
-    assert_instance_of OpenEHR::AM::Archetype::Assertion::EXPR_ITEM, @expr_item
-    assert_instance_of OpenEHR::AM::Archetype::Assertion::EXPR_LEAF, @expr_leaf
-    assert_instance_of OpenEHR::AM::Archetype::Assertion::EXPR_OPERATOR, @expr_operator
-    assert_instance_of OpenEHR::AM::Archetype::Assertion::EXPR_UNARY_OPERATOR, @expr_unary_operator
-    assert_instance_of OpenEHR::AM::Archetype::Assertion::EXPR_BINARY_OPERATOR, @expr_binary_operator
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::ASSERTION, @assertion
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::ASSERTION_VARIABLE, @assertion_variable
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::OPERATOR_KIND, @operator_kind
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::EXPR_ITEM, @expr_item
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::EXPR_LEAF, @expr_leaf
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::EXPR_OPERATOR, @expr_operator
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::EXPR_UNARY_OPERATOR, @expr_unary_operator
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::EXPR_BINARY_OPERATOR, @expr_binary_operator
   end
 end
@@ -165,29 +165,29 @@
 class ArchetypeModelProfileTest < Test::Unit::TestCase
   def setup
-    @c_dv_state = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::C_DV_STATE.new
-    @state_machine = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::STATE_MACHINE.new
-    @state = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::STATE.new
-    @terminal_state = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::TERMINAL_STATE.new
-    @non_terminal_state = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::NON_TERMINAL_STATE.new
-    @transition = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::TRANSITION.new
+    @c_dv_state = OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::C_DV_STATE.new
+    @state_machine = OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::STATE_MACHINE.new
+    @state = OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::STATE.new
+    @terminal_state = OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::TERMINAL_STATE.new
+    @non_terminal_state = OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::NON_TERMINAL_STATE.new
+    @transition = OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::TRANSITION.new
 
-    @c_code_phase = OpenEHR::AM::OpenEHR_Profile::Data_Types::Text::C_CODE_PHASE.new
+    @c_code_phase = OpenEhr::AM::OpenEHR_Profile::DataTypes::Text::C_CODE_PHASE.new
 
-    @c_dv_quantity = OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_DV_QUANTITY.new
-    @c_dv_ordinal = OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_DV_ORDINAL.new
-    @c_quantity_item = OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_QUANTITY_ITEM.new
+    @c_dv_quantity = OpenEhr::AM::OpenEHR_Profile::DataTypes::Quantity::C_DV_QUANTITY.new
+    @c_dv_ordinal = OpenEhr::AM::OpenEHR_Profile::DataTypes::Quantity::C_DV_ORDINAL.new
+    @c_quantity_item = OpenEhr::AM::OpenEHR_Profile::DataTypes::Quantity::C_QUANTITY_ITEM.new
   end
 
   def test_init
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::C_DV_STATE, @c_dv_state
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::STATE_MACHINE, @state_machine
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::STATE, @state
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::TERMINAL_STATE, @terminal_state
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::NON_TERMINAL_STATE, @non_terminal_state
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::TRANSITION, @transition
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Text::C_CODE_PHASE, @c_code_phase
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_DV_QUANTITY, @c_dv_quantity
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_DV_ORDINAL, @c_dv_ordinal
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_QUANTITY_ITEM, @c_quantity_item
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::C_DV_STATE, @c_dv_state
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::STATE_MACHINE, @state_machine
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::STATE, @state
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::TERMINAL_STATE, @terminal_state
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::NON_TERMINAL_STATE, @non_terminal_state
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::TRANSITION, @transition
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Text::C_CODE_PHASE, @c_code_phase
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Quantity::C_DV_QUANTITY, @c_dv_quantity
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Quantity::C_DV_ORDINAL, @c_dv_ordinal
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Quantity::C_QUANTITY_ITEM, @c_quantity_item
   end
 end
Index: /ruby/branches/0.5.0/lib/models/tests/test_assumed_library_types.rb
===================================================================
--- /ruby/branches/0.5.0/lib/models/tests/test_assumed_library_types.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/models/tests/test_assumed_library_types.rb	(revision 167)
@@ -2,23 +2,23 @@
 require 'assumed_library_types.rb'
 
-include OpenEHR::Assumed_Library_Types
+include OpenEhr::AssumedLibraryTypes
 
 class Assumed_Library_Test < Test::Unit::TestCase
   def setup
-    assert_nothing_raised(Exception){@interval = OpenEHR::Assumed_Library_Types::Interval.new(1,2)}
-    assert_nothing_raised(Exception){@iso8601_date = OpenEHR::Assumed_Library_Types::ISO8601_DATE.new('2009-04-27')}
-    assert_nothing_raised(Exception){@iso8601_time = OpenEHR::Assumed_Library_Types::ISO8601_TIME.new('15:55:37.32+0900')}
-    assert_nothing_raised(Exception){@iso8601_date_time = OpenEHR::Assumed_Library_Types::ISO8601_DATE_TIME.new('2009-04-27T15:55:37.32+0900')}
-    assert_nothing_raised(Exception){@iso8601_duration = OpenEHR::Assumed_Library_Types::ISO8601_DURATION.new('P1Y2M3W4DT5H6M7.8S')}
-    assert_nothing_raised(Exception){@iso8601_timezone = OpenEHR::Assumed_Library_Types::ISO8601_TIMEZONE.new}
+    assert_nothing_raised(Exception){@interval = OpenEhr::AssumedLibraryTypes::Interval.new(1,2)}
+    assert_nothing_raised(Exception){@iso8601_date = OpenEhr::AssumedLibraryTypes::ISO8601_DATE.new('2009-04-27')}
+    assert_nothing_raised(Exception){@iso8601_time = OpenEhr::AssumedLibraryTypes::ISO8601_TIME.new('15:55:37.32+0900')}
+    assert_nothing_raised(Exception){@iso8601_date_time = OpenEhr::AssumedLibraryTypes::ISO8601_DATE_TIME.new('2009-04-27T15:55:37.32+0900')}
+    assert_nothing_raised(Exception){@iso8601_duration = OpenEhr::AssumedLibraryTypes::ISO8601_DURATION.new('P1Y2M3W4DT5H6M7.8S')}
+    assert_nothing_raised(Exception){@iso8601_timezone = OpenEhr::AssumedLibraryTypes::ISO8601_TIMEZONE.new}
   end
 
   def test_initialize
-    assert_instance_of OpenEHR::Assumed_Library_Types::Interval, @interval
-    assert_instance_of OpenEHR::Assumed_Library_Types::ISO8601_DATE, @iso8601_date
-    assert_instance_of OpenEHR::Assumed_Library_Types::ISO8601_TIME, @iso8601_time
-    assert_instance_of OpenEHR::Assumed_Library_Types::ISO8601_DATE_TIME, @iso8601_date_time
-    assert_instance_of OpenEHR::Assumed_Library_Types::ISO8601_DURATION, @iso8601_duration
-    assert_instance_of OpenEHR::Assumed_Library_Types::ISO8601_TIMEZONE, @iso8601_timezone
+    assert_instance_of OpenEhr::AssumedLibraryTypes::Interval, @interval
+    assert_instance_of OpenEhr::AssumedLibraryTypes::ISO8601_DATE, @iso8601_date
+    assert_instance_of OpenEhr::AssumedLibraryTypes::ISO8601_TIME, @iso8601_time
+    assert_instance_of OpenEhr::AssumedLibraryTypes::ISO8601_DATE_TIME, @iso8601_date_time
+    assert_instance_of OpenEhr::AssumedLibraryTypes::ISO8601_DURATION, @iso8601_duration
+    assert_instance_of OpenEhr::AssumedLibraryTypes::ISO8601_TIMEZONE, @iso8601_timezone
   end
 
@@ -58,114 +58,114 @@
 
   def test_time_definitions
-    assert_equal OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS::DAYS_IN_LEAP_YEAR, 366
-    assert_equal OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS::DAYS_IN_WEEK, 7
-    assert_equal OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS::DAYS_IN_YEAR, 365
-    assert_equal OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS::HOURS_IN_DAY, 24
-    assert_equal OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS::MAX_DAYS_IN_MONTH, 31
-    assert_equal OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS::MAX_DAYS_IN_YEAR, 366
-    assert_equal OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS::MINUTES_IN_HOUR, 60
-    assert_equal OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS::MONTH_IN_YEAR, 12
-    assert_equal OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS::NOMINAL_DAYS_IN_MONTH, 30.42
-    assert_equal OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS::NOMINAL_DAYS_IN_YEAR, 365.24
-    assert_equal OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS::SECONDS_IN_MINUTE, 60
+    assert_equal OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS::DAYS_IN_LEAP_YEAR, 366
+    assert_equal OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS::DAYS_IN_WEEK, 7
+    assert_equal OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS::DAYS_IN_YEAR, 365
+    assert_equal OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS::HOURS_IN_DAY, 24
+    assert_equal OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS::MAX_DAYS_IN_MONTH, 31
+    assert_equal OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS::MAX_DAYS_IN_YEAR, 366
+    assert_equal OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS::MINUTES_IN_HOUR, 60
+    assert_equal OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS::MONTH_IN_YEAR, 12
+    assert_equal OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS::NOMINAL_DAYS_IN_MONTH, 30.42
+    assert_equal OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS::NOMINAL_DAYS_IN_YEAR, 365.24
+    assert_equal OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS::SECONDS_IN_MINUTE, 60
   end
 
   def test_time_definition_validity
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_year?(2008)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_year?(-20)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_year?(0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_year?(2008)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_year?(-20)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_year?(0)
 # today
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,6,19)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,6,19)
 # test valid_day lower limit
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(0,0,0)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(0,1,1)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(-1,1,1)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(0,1,0)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(0,0,0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(0,1,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(-1,1,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(0,1,0)
 # test valid_day upper and lowerlimit of each month
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(0,0,1)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,1,1)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,1,0)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,0,1)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,1,31)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,1,32)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,2,1)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,2,0)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,2,31)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,3,1)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,3,0)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,3,31)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,3,32)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,4,1)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,4,0)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,4,30)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,4,31)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,5,1)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,5,0)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,5,31)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,5,32)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,6,1)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,6,0)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,6,30)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,6,31)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,7,1)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,7,0)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,7,31)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,7,32)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,8,1)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,8,0)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,8,31)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,8,32)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,9,1)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,9,0)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,9,30)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,9,31)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,10,1)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,10,0)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,10,31)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,10,32)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,11,1)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,11,0)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,11,30)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,11,31)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,12,1)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,12,0)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,12,31)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,12,32)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(0,0,1)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,1,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,1,0)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,0,1)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,1,31)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,1,32)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,2,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,2,0)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,2,31)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,3,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,3,0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,3,31)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,3,32)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,4,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,4,0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,4,30)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,4,31)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,5,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,5,0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,5,31)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,5,32)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,6,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,6,0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,6,30)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,6,31)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,7,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,7,0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,7,31)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,7,32)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,8,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,8,0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,8,31)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,8,32)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,9,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,9,0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,9,30)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,9,31)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,10,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,10,0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,10,31)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,10,32)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,11,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,11,0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,11,30)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,11,31)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,12,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,12,0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,12,31)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,12,32)
 # test valid_day leap year
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(1900,2,28)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(1900,2,29)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2000,2,29)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_day?(2008,2,29)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(1900,2,28)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(1900,2,29)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2000,2,29)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,2,29)
 # test valid_hour lower limit
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_hour?(0,0,0)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_hour?(-1,0,0)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_hour?(0,-1,0)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_hour?(0,0,-1)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_hour?(0,0,0)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_hour?(-1,0,0)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_hour?(0,-1,0)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_hour?(0,0,-1)
 # test valid_hour upper limit
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_hour?(0,59,0)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_hour?(0,60,0)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_hour?(0,0,59)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_hour?(0,0,60)
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_hour?(24,0,0)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_hour?(24,0,1)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_hour?(24,1,0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_hour?(0,59,0)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_hour?(0,60,0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_hour?(0,0,59)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_hour?(0,0,60)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_hour?(24,0,0)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_hour?(24,0,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_hour?(24,1,0)
 # test valid_minute method lower limit
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_minute?(0)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_minute?(-1)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_minute?(0)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_minute?(-1)
 # test valid_minute method upper limit
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_minute?(59)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_minute?(60)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_minute?(59)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_minute?(60)
 # test valid_second method lower limit
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_second?(0)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_second?(-1)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_second?(0)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_second?(-1)
 # test valid_second method upper limit
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_second?(59)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_second?(60)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_second?(59)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_second?(60)
 # test valid_month method lower limit
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_month?(1)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_month?(0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_month?(1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_month?(0)
 # test valid_month method upper limit
-    assert OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_month?(12)
-    assert !OpenEHR::Assumed_Library_Types::TIME_DEFINITIONS.valid_month?(13)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_month?(12)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_month?(13)
   end
   def test_iso8601_date
@@ -173,5 +173,5 @@
     assert_equal 4,@iso8601_date.month
     assert_equal 27,@iso8601_date.day
-    assert_nothing_raised(Exception){@iso8601_date = OpenEHR::Assumed_Library_Types::ISO8601_DATE.new('2008')}
+    assert_nothing_raised(Exception){@iso8601_date = OpenEhr::AssumedLibraryTypes::ISO8601_DATE.new('2008')}
     assert @iso8601_date.day_unknown?
     assert @iso8601_date.month_unknown?
@@ -194,6 +194,6 @@
     assert !@iso8601_date.is_partial?
     assert_equal "2008-06-14", @iso8601_date.as_string
-    assert OpenEHR::Assumed_Library_Types::ISO8601_DATE.valid_iso8601_date?("2006-06-14")
-    assert !OpenEHR::Assumed_Library_Types::ISO8601_DATE.valid_iso8601_date?("ABCDEFG")
+    assert OpenEhr::AssumedLibraryTypes::ISO8601_DATE.valid_iso8601_date?("2006-06-14")
+    assert !OpenEhr::AssumedLibraryTypes::ISO8601_DATE.valid_iso8601_date?("ABCDEFG")
   end
 
@@ -207,5 +207,5 @@
 #    assert_nothing_raised(Exception){@iso8601_time = OpenEHR::Assumed_Library_Types::ISO8601_TIME.new('15:55:37.32+0900')}
 
-    assert_nothing_raised(Exception){@iso8601_time = OpenEHR::Assumed_Library_Types::ISO8601_TIME.new('01')}
+    assert_nothing_raised(Exception){@iso8601_time = OpenEhr::AssumedLibraryTypes::ISO8601_TIME.new('01')}
     assert_equal 1, @iso8601_time.hour
     assert @iso8601_time.is_partial?
@@ -253,11 +253,11 @@
     assert @iso8601_time.is_extended?
     assert !@iso8601_time.is_decimal_sign_comma?
-    assert OpenEHR::Assumed_Library_Types::ISO8601_TIME.valid_iso8601_time?("012345Z")
-    assert OpenEHR::Assumed_Library_Types::ISO8601_TIME.valid_iso8601_time?("012345.67+0900")
-    assert !OpenEHR::Assumed_Library_Types::ISO8601_TIME.valid_iso8601_time?("242345.67+0900")
-    assert !OpenEHR::Assumed_Library_Types::ISO8601_TIME.valid_iso8601_time?("242345.67+0900")
-    assert OpenEHR::Assumed_Library_Types::ISO8601_TIME.valid_iso8601_time?("240000")
-    assert OpenEHR::Assumed_Library_Types::ISO8601_TIME.valid_iso8601_time?("240000Z")
-    assert !OpenEHR::Assumed_Library_Types::ISO8601_TIME.valid_iso8601_time?("240000.011Z")
+    assert OpenEhr::AssumedLibraryTypes::ISO8601_TIME.valid_iso8601_time?("012345Z")
+    assert OpenEhr::AssumedLibraryTypes::ISO8601_TIME.valid_iso8601_time?("012345.67+0900")
+    assert !OpenEhr::AssumedLibraryTypes::ISO8601_TIME.valid_iso8601_time?("242345.67+0900")
+    assert !OpenEhr::AssumedLibraryTypes::ISO8601_TIME.valid_iso8601_time?("242345.67+0900")
+    assert OpenEhr::AssumedLibraryTypes::ISO8601_TIME.valid_iso8601_time?("240000")
+    assert OpenEhr::AssumedLibraryTypes::ISO8601_TIME.valid_iso8601_time?("240000Z")
+    assert !OpenEhr::AssumedLibraryTypes::ISO8601_TIME.valid_iso8601_time?("240000.011Z")
   end
 
Index: /ruby/branches/0.5.0/lib/open_ehr/am.rb
===================================================================
--- /ruby/branches/0.5.0/lib/open_ehr/am.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/open_ehr/am.rb	(revision 167)
@@ -14,5 +14,5 @@
 require 'rm/common/resource.rb'
 #require 'rm/support/terminology/openehr_code_set_identifier.rb'
-module OpenEHR
+module OpenEhr
   module AM
     module Archetype
@@ -38,5 +38,5 @@
 
     module OpenEHR_Profile
-      module Data_Types
+      module DataTypes
         module Basic
           autoload :C_DV_STATE, "am/openehr_profile/data_types/basic.rb"
Index: /ruby/branches/0.5.0/lib/open_ehr/am/archetype/archetype.rb
===================================================================
--- /ruby/branches/0.5.0/lib/open_ehr/am/archetype/archetype.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/open_ehr/am/archetype/archetype.rb	(revision 167)
@@ -1,14 +1,14 @@
 require 'rm/support/terminology.rb'
 
-module OpenEHR
+module OpenEhr
   module AM
     module Archetype
       module ADL_Definition
 #        include OpenEHR::RM::Support::Terminology::OpenEHR_Code_Set_Identifier
-        include OpenEHR::RM::Support::Terminology
+        include OpenEhr::RM::Support::Terminology
         CURRENT_ADL_VERSION = "1.4"
       end
 
-      class ARCHETYPE < OpenEHR::RM::Common::Resource::Authored_Resource
+      class ARCHETYPE < OpenEhr::RM::Common::Resource::AuthoredResource
         include ADL_Definition
         attr_accessor :archetype_id, :concept_code, :is_controlled, :original_language, :parent_archtype_id, :uid
Index: /ruby/branches/0.5.0/lib/open_ehr/am/archetype/archetype_description/archetype_description.rb
===================================================================
--- /ruby/branches/0.5.0/lib/open_ehr/am/archetype/archetype_description/archetype_description.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/open_ehr/am/archetype/archetype_description/archetype_description.rb	(revision 167)
@@ -1,4 +1,4 @@
 
-module OpenEHR
+module OpenEhr
   module AM
     module Archetype
Index: /ruby/branches/0.5.0/lib/open_ehr/am/archetype/constraint_model/archetype_constraint.rb
===================================================================
--- /ruby/branches/0.5.0/lib/open_ehr/am/archetype/constraint_model/archetype_constraint.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/open_ehr/am/archetype/constraint_model/archetype_constraint.rb	(revision 167)
@@ -1,4 +1,4 @@
 
-module OpenEHR
+module OpenEhr
   module AM
     module Archetype
Index: /ruby/branches/0.5.0/lib/open_ehr/am/archetype/constraint_model/assertion.rb
===================================================================
--- /ruby/branches/0.5.0/lib/open_ehr/am/archetype/constraint_model/assertion.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/open_ehr/am/archetype/constraint_model/assertion.rb	(revision 167)
@@ -1,3 +1,3 @@
-module OpenEHR
+module OpenEhr
   module AM
     module Archetype
Index: /ruby/branches/0.5.0/lib/open_ehr/am/archetype/constraint_model/primitive.rb
===================================================================
--- /ruby/branches/0.5.0/lib/open_ehr/am/archetype/constraint_model/primitive.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/open_ehr/am/archetype/constraint_model/primitive.rb	(revision 167)
@@ -1,3 +1,3 @@
-module OpenEHR
+module OpenEhr
   module AM
     module Archetype
Index: /ruby/branches/0.5.0/lib/open_ehr/am/archetype/ontology.rb
===================================================================
--- /ruby/branches/0.5.0/lib/open_ehr/am/archetype/ontology.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/open_ehr/am/archetype/ontology.rb	(revision 167)
@@ -1,3 +1,3 @@
-module OpenEHR
+module OpenEhr
   module AM
     module Archetype
Index: /ruby/branches/0.5.0/lib/open_ehr/am/archetype/validity_kind.rb
===================================================================
--- /ruby/branches/0.5.0/lib/open_ehr/am/archetype/validity_kind.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/open_ehr/am/archetype/validity_kind.rb	(revision 167)
@@ -1,3 +1,3 @@
-module OpenEHR
+module OpenEhr
   module AM
     module Archetype
Index: /ruby/branches/0.5.0/lib/open_ehr/assumed_library_types.rb
===================================================================
--- /ruby/branches/0.5.0/lib/open_ehr/assumed_library_types.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/open_ehr/assumed_library_types.rb	(revision 167)
@@ -3,6 +3,6 @@
 require 'time'
 
-module OpenEHR
-  module Assumed_Library_Types
+module OpenEhr
+  module AssumedLibraryTypes
     class Any < Object
       
Index: /ruby/branches/0.5.0/lib/open_ehr/rm.rb
===================================================================
--- /ruby/branches/0.5.0/lib/open_ehr/rm.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/open_ehr/rm.rb	(revision 167)
@@ -9,5 +9,5 @@
 
 # OpenEHR::RM
-module OpenEHR
+module OpenEhr
 
   autoload :Assumed_Library_Types, "assumed_library_types.rb"
@@ -31,5 +31,5 @@
     end
 
-    module Data_Types
+    module DataTypes
       autoload :Basic, "rm/data_types/basic.rb"
       autoload :Text, "rm/data_types/text.rb"
@@ -40,5 +40,5 @@
     end
 
-    module Data_Structures
+    module DataStructures
       autoload :Data_Structure, "rm/data_structure.rb"
       autoload :History, 'rm/data_structures/history.rb'
Index: /ruby/branches/0.5.0/lib/open_ehr/rm/common/archetyped.rb
===================================================================
--- /ruby/branches/0.5.0/lib/open_ehr/rm/common/archetyped.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/open_ehr/rm/common/archetyped.rb	(revision 167)
@@ -2,9 +2,9 @@
 # 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
       module Archetyped
-        module Locater_Constants
+        module LocaterConstants
           CURRENT_TRANSACTION_ID = "current"
           FRAGMENT_SEPARATOR = "#"
@@ -43,5 +43,5 @@
 
         class Locatable < Pathable
-          include Locater_Constants
+          include LocaterConstants
           attr_reader :archetype_node_id, :name, :links
           attr_accessor :uid, :archetype_details, :feeder_audit
@@ -138,5 +138,5 @@
         end # of Link
 
-        class Feeder_Audit
+        class FeederAudit
           attr_reader :originating_system_audit
           attr_accessor :originating_system_item_ids, :feeder_system_audit,
@@ -157,7 +157,7 @@
             @originating_system_audit = originating_system_audit
           end
-        end # of Feeder_Audit
+        end # of FeederAudit
 
-        class Feeder_Audit_Details
+        class FeederAuditDetails
           attr_reader :system_id
           attr_accessor :provider, :location, :time, :subject, :version_id
@@ -176,5 +176,5 @@
             @system_id = system_id
           end
-        end # of Feeder_Audit_Details
+        end # of FeederAudit_Details
       end # of Archetyped
     end # of Common
Index: /ruby/branches/0.5.0/lib/open_ehr/rm/common/change_control.rb
===================================================================
--- /ruby/branches/0.5.0/lib/open_ehr/rm/common/change_control.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/open_ehr/rm/common/change_control.rb	(revision 167)
@@ -3,8 +3,8 @@
 # Ticket refs #64
 
-module OpenEHR
+module OpenEhr
   module RM
     module Common
-      module Change_Control
+      module ChangeControl
         class Contribution
           attr_reader :uid, :versions, :audit
@@ -93,5 +93,5 @@
 
           def owner_id
-            return Hier_Object_ID.new(@uid.object_id.value)
+            return HierObjectId.new(@uid.object_id.value)
           end
 
@@ -105,5 +105,5 @@
         end
 
-        class Imported_Version < Version
+        class ImportedVersion < Version
           attr_reader :item
 
@@ -126,5 +126,5 @@
         end
 
-        class Original_Version < Version
+        class OriginalVersion < Version
           attr_reader :attestations, :other_input_version_uids
 
@@ -155,5 +155,5 @@
         end
 
-        class Versioned_Object
+        class VersionedObject
           attr_reader :uid, :owner_id, :time_created, :all_versions
 
@@ -208,5 +208,5 @@
               raise ArgumentError, 'invalid a_ver_id'
             end
-            return @all_versions[self.all_version_ids.index(a_ver_id)].instance_of? Original_Version
+            return @all_versions[self.all_version_ids.index(a_ver_id)].instance_of? OriginalVersion
           end
 
@@ -267,17 +267,17 @@
             @all_versions.each do |ver|
               audits = [ ]
-              if ver.instance_of? Original_Version
+              if ver.instance_of? OriginalVersion
                 audits << ver.attestations
               end
               audits << ver.commit_audit
-              revision_history_items << Revision_History_Item.new(
+              revision_history_items << RevisionHistoryItem.new(
                                           :audits => audits,
                                           :version_id => ver.uid)
             end
-            return Revision_History.new(revision_history_items)
+            return RevisionHistory.new(revision_history_items)
           end
 
           def commit_original_version(args={ })
-            @all_versions << Original_Version.new(:uid => args[:uid],
+            @all_versions << OriginalVersion.new(:uid => args[:uid],
                                                   :preceding_version_uid => args[:preceding_version_uid],
                                                   :contribution => args[:contribution],
@@ -290,5 +290,5 @@
 
           def commit_original_merged_version(args = { })
-            @all_versions << Original_Version.new(:uid => args[:uid],
+            @all_versions << OriginalVersion.new(:uid => args[:uid],
                                                   :contribution => args[:contribution],
                                               :preceding_version_uid => args[:preceding_version_uid],
@@ -302,5 +302,5 @@
 
           def commit_imported_version(args = { })
-            @all_versions << Imported_Version.new(:item => args[:item],
+            @all_versions << ImportedVersion.new(:item => args[:item],
                                                   :contribution => args[:contribution],
                                                   :commit_audit => args[:commit_audit])
@@ -319,5 +319,5 @@
           end
         end
-      end # of Change_Control
+      end # of ChangeControl
     end # of Common
   end # of RM
Index: /ruby/branches/0.5.0/lib/open_ehr/rm/common/directory.rb
===================================================================
--- /ruby/branches/0.5.0/lib/open_ehr/rm/common/directory.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/open_ehr/rm/common/directory.rb	(revision 167)
@@ -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::Data_Types::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 Versioned_Folder < OpenEHR::RM::Common::Change_Control::Versioned_Object
+        class VersionedFolder < OpenEhr::RM::Common::ChangeControl::VersionedObject
         end
       end # of Directory
Index: /ruby/branches/0.5.0/lib/open_ehr/rm/common/generic.rb
===================================================================
--- /ruby/branches/0.5.0/lib/open_ehr/rm/common/generic.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/open_ehr/rm/common/generic.rb	(revision 167)
@@ -2,11 +2,11 @@
 # 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::Data_Types::Basic
-module OpenEHR
+include OpenEhr::RM::Support::Identification
+include OpenEhr::RM::DataTypes::Basic
+module OpenEhr
   module RM
     module Common
       module Generic
-        class Audit_Details
+        class AuditDetails
           attr_reader :system_id, :committer, :time_committed, :change_type
           attr_accessor :description
@@ -45,5 +45,5 @@
         end
 
-        class Revision_History
+        class RevisionHistory
           attr_reader :items
 
@@ -66,7 +66,7 @@
             return @items.last.audits.first.time_committed.value
           end
-        end # of Revision_History
+        end # of RevisionHistory
 
-        class Revision_History_Item
+        class RevisionHistoryItem
           attr_reader :version_id, :audits
 
@@ -87,7 +87,7 @@
             @version_id = version_id
           end
-        end # of Revision_History_Item
+        end # of RevisionHistory_Item
 
-        class Party_Proxy
+        class PartyProxy
           attr_accessor :external_ref
 
@@ -97,9 +97,9 @@
         end
 
-        class Party_Self < Party_Proxy
+        class PartySelf < PartyProxy
 
         end
 
-        class Party_Identified < Party_Proxy
+        class PartyIdentified < PartyProxy
           attr_reader :name, :identifier
           def initialize(args = { })
@@ -132,5 +132,5 @@
         end
 
-        class Party_Related < Party_Identified
+        class PartyRelated < PartyIdentified
           attr_reader :relationship
           def initialize(args = { })
@@ -174,5 +174,5 @@
         end
 
-        class Attestation < Audit_Details
+        class Attestation < AuditDetails
           attr_reader :reason
           attr_accessor :proof, :items
Index: /ruby/branches/0.5.0/lib/open_ehr/rm/common/resource.rb
===================================================================
--- /ruby/branches/0.5.0/lib/open_ehr/rm/common/resource.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/open_ehr/rm/common/resource.rb	(revision 167)
@@ -1,8 +1,8 @@
 require 'set'
-module OpenEHR
+module OpenEhr
   module RM
     module Common
       module Resource
-        class Authored_Resource
+        class AuthoredResource
           attr_reader  :original_language, :translations
           attr_accessor :description, :revision_history
@@ -42,5 +42,5 @@
         end
 
-        class Translation_Details
+        class TranslationDetails
           attr_reader :language, :author
           attr_accessor :accreditation, :other_details
@@ -64,5 +64,5 @@
         end
 
-        class Resource_Description
+        class ResourceDescription
           attr_reader :original_author, :lifecycle_state, :details
           attr_accessor :other_contributors, :resource_package_uri,
@@ -101,5 +101,5 @@
         end
 
-        class Resource_Description_Item
+        class ResourceDescriptionItem
           attr_reader :language, :purpose, :use, :misuse, :copyright
           attr_accessor :keywords, :original_resource_uri, :other_details
Index: /ruby/branches/0.5.0/lib/open_ehr/rm/composition/content/entry.rb
===================================================================
--- /ruby/branches/0.5.0/lib/open_ehr/rm/composition/content/entry.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/open_ehr/rm/composition/content/entry.rb	(revision 167)
@@ -1,3 +1,3 @@
-module OpenEHR
+module OpenEhr
   module RM
     module Content
@@ -5,7 +5,7 @@
         class Entry < Content_Item
         end
-        class Care_Entry < Entry
+        class CareEntry < Entry
         end
-        class Action < Care_Entry
+        class Action < CareEntry
           attr_accessor :description, :time
           attr_accessor :ism_transition, :instruction_details
Index: /ruby/branches/0.5.0/lib/open_ehr/rm/data_structure.rb
===================================================================
--- /ruby/branches/0.5.0/lib/open_ehr/rm/data_structure.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/open_ehr/rm/data_structure.rb	(revision 167)
@@ -4,8 +4,8 @@
 # refs #59
 
-module OpenEHR
+module OpenEhr
   module RM
-    module Data_Structures
-      class Data_Structure < OpenEHR::RM::Common::Archetyped::Locatable        
+    module DataStructures
+      class DataStructure < OpenEhr::RM::Common::Archetyped::Locatable
         def initialize(args = { })
           super(args)
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 166)
+++ /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 166)
+++ /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 166)
+++ /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 166)
+++ /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 166)
+++ /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 166)
+++ /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 166)
+++ /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
Index: /ruby/branches/0.5.0/lib/open_ehr/rm/demographic.rb
===================================================================
--- /ruby/branches/0.5.0/lib/open_ehr/rm/demographic.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/open_ehr/rm/demographic.rb	(revision 167)
@@ -75,10 +75,10 @@
       end
 
-      class Party_Identity < OpenEHR::RM::Common::Archetyped::Locatable
+      class PartyIdentity < OpenEHR::RM::Common::Archetyped::Locatable
         attr_reader :details
 
       end
 
-      class Party_Relationship < OpenEHR::RM::Common::Archetyped::Locatable
+      class PartyRelationship < OpenEHR::RM::Common::Archetyped::Locatable
 
       end
Index: /ruby/branches/0.5.0/lib/open_ehr/rm/security.rb
===================================================================
--- /ruby/branches/0.5.0/lib/open_ehr/rm/security.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/open_ehr/rm/security.rb	(revision 167)
@@ -2,8 +2,8 @@
 # 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
-      class Access_Control_Settings
+      class AccessControlSettings
         
       end
Index: /ruby/branches/0.5.0/lib/open_ehr/rm/support/assumed_types.rb
===================================================================
--- /ruby/branches/0.5.0/lib/open_ehr/rm/support/assumed_types.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/open_ehr/rm/support/assumed_types.rb	(revision 167)
@@ -2,8 +2,8 @@
 # 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
-      module Assumed_Types
+      module AssumedTypes
         class Interval
           attr_accessor :lower, :upper
Index: /ruby/branches/0.5.0/lib/open_ehr/rm/support/definition.rb
===================================================================
--- /ruby/branches/0.5.0/lib/open_ehr/rm/support/definition.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/open_ehr/rm/support/definition.rb	(revision 167)
@@ -1,12 +1,12 @@
-module OpenEHR
+module OpenEhr
   module RM
     module Support
       module Definition
-        module Basic_Definition
+        module BasicDefinition
           CR = "\015"
           LF = "\012"
         end
-        class OpenEHR_Definitions
-          include Basic_Definition          
+        class OpenEHRDefinitions
+          include BasicDefinition
         end
       end
Index: /ruby/branches/0.5.0/lib/open_ehr/rm/support/identification.rb
===================================================================
--- /ruby/branches/0.5.0/lib/open_ehr/rm/support/identification.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/open_ehr/rm/support/identification.rb	(revision 167)
@@ -2,10 +2,9 @@
 # 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
       module Identification
-
-        class Object_ID
+        class ObjectId
           attr_reader :value
 
@@ -23,5 +22,5 @@
         end # of ObjectID
 
-        class Object_Ref
+        class ObjectRef
           attr_reader :namespace, :type, :id
 
@@ -48,5 +47,5 @@
         end
 
-        class Archetype_ID < Object_ID
+        class ArchetypeId < ObjectId
           attr_reader :domain_concept, :rm_name, :rm_entity, :rm_originator, :specialisation, :version_id
 
@@ -91,5 +90,5 @@
         end
 
-        class Terminology_ID < Object_ID
+        class TerminologyId < ObjectId
           attr_reader :name, :version_id
 
@@ -130,5 +129,5 @@
         end # of Terminology_ID
 
-        class Generic_ID < Object_ID
+        class GenericId < ObjectId
           attr_reader :scheme
 
@@ -144,9 +143,9 @@
         end # of Generic_ID
 
-        class Template_ID < Object_ID
-
-        end
-
-        class UID_Based_ID < Object_ID
+        class TemplateId < ObjectId
+
+        end
+
+        class UidBasedId < ObjectId
           def initialize(value)
             super(value)
@@ -174,5 +173,5 @@
         end
 
-        class Object_Version_ID < UID_Based_ID
+        class ObjectVersionId < UidBasedId
           attr_reader :object_id, :creating_system_id, :version_tree_id
 
@@ -184,7 +183,7 @@
             super(value)
             if /^(\w+)::(\w+)::((\d|\.)+)$/ =~ value
-              self.object_id = UID.new($1)
-              self.creating_system_id = UID.new($2)
-              self.version_tree_id = Version_Tree_ID.new($3)
+              self.object_id = Uid.new($1)
+              self.creating_system_id = Uid.new($2)
+              self.version_tree_id = VersionTreeId.new($3)
             else
               raise ArgumentError, 'invalid format'
@@ -216,5 +215,5 @@
         end
 
-        class Locatable_Ref < Object_Ref
+        class LocatableRef < ObjectRef
           attr_reader :namespace, :type, :id, :path
 
@@ -234,5 +233,5 @@
         end
 
-        class Party_Ref < Object_Ref
+        class PartyRef < ObjectRef
 
           def type=(type)
@@ -243,5 +242,5 @@
         end
 
-        class Access_Group_Ref < Object_Ref
+        class AccessGroupRef < ObjectRef
           def type=(type)
             raise ArgumentError, 'type invalid' unless type == 'ACCESS_GROUP'
@@ -250,9 +249,9 @@
         end
 
-        class Hier_Object_ID < UID_Based_ID
-
-        end
-
-        class Version_Tree_ID
+        class HierObjectId < UidBasedId
+
+        end
+
+        class VersionTreeId
           attr_reader :value, :trunk_version, :branch_number, :branch_version
 
@@ -303,5 +302,5 @@
         end
 
-        class UID
+        class Uid
           attr_reader :value
 
@@ -316,13 +315,13 @@
         end
 
-        class UUID < UID
-
-        end
-
-        class Internet_ID <UID
+        class Uuid < Uid
+
+        end
+
+        class InternetId <Uid
           
         end
 
-        class ISO_OID <UID
+        class IsoOid <Uid
 
         end        
Index: /ruby/branches/0.5.0/lib/open_ehr/rm/support/measurement.rb
===================================================================
--- /ruby/branches/0.5.0/lib/open_ehr/rm/support/measurement.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/open_ehr/rm/support/measurement.rb	(revision 167)
@@ -1,9 +1,9 @@
-module OpenEHR
+module OpenEhr
   module RM
     module Support
       module Measurement
-        class Measurement_Service
+        class MeasurementService
         end
-        module External_Environment_Access
+        module ExternalEnvironmentAccess
           def eea_terminology_svc
           end
Index: /ruby/branches/0.5.0/lib/open_ehr/rm/support/terminology.rb
===================================================================
--- /ruby/branches/0.5.0/lib/open_ehr/rm/support/terminology.rb	(revision 166)
+++ /ruby/branches/0.5.0/lib/open_ehr/rm/support/terminology.rb	(revision 167)
@@ -1,8 +1,8 @@
 
-module OpenEHR
+module OpenEhr
   module RM
     module Support
       module Terminology
-        class Code_Set_Access
+        class CodeSetAccess
           def all_codes
             raise NotImplementedError, "all_codes must be implemented"
@@ -18,5 +18,5 @@
           end
         end
-        module OpenEHR_Code_Set_Identifier
+        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 OpenEHR_Terminology_Group_Identifiers
+        module OpenEhrTerminologyGroupIdentifiers
           GROUP_ID_ATTESTATION_REASON = "attestation reason".freeze
           GROUP_ID_AUDIT_CHANGE_TYPE = "audit change type".freeze
@@ -46,5 +46,5 @@
           TERMINOLOGY_ID = "openehr".freeze
         end
-        class Terminology_Access
+        class TerminologyAccess
           def all_codes
             raise NotImplementedError, "all_codes is not implemented"
@@ -74,6 +74,6 @@
           end
         end
-        class Terminology_Service
-          include OpenEHR_Code_Set_Identifier, OpenEHR_Terminology_Group_Identifiers
+        class TerminologyService
+          include OpenEhrCodeSetIdentifier, OpenEhrTerminologyGroupIdentifiers
           def code_set(name)
             raise NotImplementedError, "code_set is not implemented"
Index: by/branches/0.5.0/terminology/doc/README_FOR_APP
===================================================================
--- /ruby/branches/0.5.0/terminology/doc/README_FOR_APP	(revision 166)
+++ 	(revision )
@@ -1,2 +1,0 @@
-Use this README file to introduce your application and point to useful places in the API for learning more.
-Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
Index: by/branches/0.5.0/terminology/doc/api
===================================================================
--- /ruby/branches/0.5.0/terminology/doc/api	(revision 166)
+++ 	(revision )
@@ -1,1 +1,0 @@
-link /usr/share/doc/rails/html
Index: by/branches/0.5.0/terminology/doc/openehr_terminology.csv
===================================================================
--- /ruby/branches/0.5.0/terminology/doc/openehr_terminology.csv	(revision 166)
+++ 	(revision )
@@ -1,192 +1,0 @@
-1,0,openehr,en,subject relationship,self,The party is the subject of EHR ,HL7_RoleCode:: CEN: 
-2,3,openehr,en,subject relationship,foetus,The party is a foetus ,HL7: CEN: 
-3,6,openehr,en,subject relationship,donor,The party is a donor of organs or other body products to the EHR subject. ,HL7: CEN: 
-4,7,openehr,en,subject relationship,maternal grandmother,Relationship of maternal grandmother to subject of EHR ,HL7: CEN: 
-5,8,openehr,en,subject relationship,maternal grandfather,Relationship of maternal grandfather to subject of EHR ,HL7: CEN: 
-6,9,openehr,en,subject relationship,father,The party is the father of the subject of the EHR ,HL7: CEN: 
-7,10,openehr,en,subject relationship,mother,The party is the mother of the subject of EHR ,HL7: CEN: 
-8,22,openehr,en,subject relationship,partner/spouse,The husband or wife or life partner of the subject of EHR ,HL7: CEN: 
-9,23,openehr,en,subject relationship,brother,Relationship of brother to subject of EHR ,HL7: CEN: 
-10,24,openehr,en,subject relationship,sister,Relationship of sister to subject of EHR ,HL7: CEN: 
-11,25,openehr,en,subject relationship,step or half brother,Relationship of step or half brother to subject of EHR ,HL7: CEN: 
-12,26,openehr,en,subject relationship,step or half sister,Relationship of step or half sister to subject of EHR ,HL7: CEN: 
-13,27,openehr,en,subject relationship,sibling,Relationship of sibling to subject of EHR ,HL7: CEN: 
-14,28,openehr,en,subject relationship,child,Relationship of child to subject of EHR ,HL7: CEN: 
-15,29,openehr,en,subject relationship,daughter,Relationship of daughter to subject of EHR ,HL7: CEN: 
-16,31,openehr,en,subject relationship,son,Relationship of son to subject of EHR ,HL7: CEN: 
-17,36,openehr,en,subject relationship,paternal grandfather,Relationship of aternal grandfather to subject of EHR ,HL7: CEN: 
-18,37,openehr,en,subject relationship,paternal grandmother,Relationship of paternal grandmother to subject of EHR ,HL7: CEN: 
-19,38,openehr,en,subject relationship,maternal uncle,Relationship of maternal uncle to subject of EHR ,HL7: CEN: 
-20,39,openehr,en,subject relationship,maternal aunt,Relationship of maternal aunt to subject of EHR ,HL7: CEN: 
-21,40,openehr,en,subject relationship,paternal uncle,Relationship of paternal uncle to subject of EHR ,HL7: CEN: 
-22,41,openehr,en,subject relationship,paternal aunt,Relationship of paternal aunt to subject of EHR ,HL7: CEN: 
-23,45,openehr,en,event math function,minimum,Value of the interval-event is the minimum value of the discrete events which the interval-event summarises. ,
-24,121,openehr,en,property,Energy ,,
-25,122,openehr,en,property,Length ,,
-26,123,openehr,en,property,Loudness ,,
-27,124,openehr,en,property,Mass ,,
-28,125,openehr,en,property,Pressure ,,
-29,126,openehr,en,property,Flow rate  volume ,,
-30,127,openehr,en,property,Temperature ,,
-31,128,openehr,en,property,Time ,,
-32,129,openehr,en,property,Volume ,,
-33,130,openehr,en,property,Work ,,
-34,144,openehr,en,event math function,maximum,Value of the interval-event is the maximum value of the discrete events which the interval-event summarises. ,
-35,146,openehr,en,event math function,mean,Value of the interval-event is the average value of the discrete events which the interval-event summarises. ,
-36,147,openehr,en,event math function,change,Value of the interval-event is the net change over the period which the interval-event summarises. ,
-37,148,openehr,en,event math function,total,Value of the interval-event is the sum of the values of the discrete events which the interval-event summarises (typically differential flow measurements  e.g. blood loss). ,
-38,149,openehr,en,event math function,variation,Value of the interval-event is difference between the point maximum and point minimum over the period  in other words the value band into which all sample during a period fit. Useful for specifying a maximal allowed variation in a datum to still be considered the same (approximate) value. ,
-39,166,openehr,en,Instruction transitions,cancel,Cancel a planned Instruction  before it is booked or started. ,
-40,189,openehr,en,subject relationship,neonate,Relationship of neonate to subject of EHR ,HL7: CEN: 
-41,193,openehr,en,participation mode,not specified,Mode of participation is not specified; use only for legacy data. ,
-42,194,openehr,en,participation mode,asynchronous audiovisual; recorded video,Audio-visual communication that is not live ,
-43,195,openehr,en,participation mode,live audiovisual; videoconference; videophone,Any audio-visual communication in real time ,
-44,196,openehr,en,participation mode,recorded video,Recorded video or video mail ,
-45,197,openehr,en,participation mode,videophone,Live audio-visual communication ,
-46,198,openehr,en,participation mode,videoconferencing,Live audio-visual communication over videoconferencing or other similar equipment. ,HL7_ParticipationMode::16548 
-47,199,openehr,en,participation mode,asynchronous audio-only; dictated; voice mail,Audio-only communication that is not live. ,
-48,200,openehr,en,participation mode,dictated,Non-interactive audio-only information recorded on some medium  such as cassette tape. ,HL7_ParticipationMode::16547 
-49,201,openehr,en,participation mode,voice-mail,Audio messaging system ,
-50,202,openehr,en,participation mode,live audio-only; telephone; internet phone; teleconference,Any live audio-only communication. ,HL7_ParticipationMode::V16544 (includes live) 
-51,203,openehr,en,participation mode,teleconference,Live verbal communication over teleconference ,HL7_ParticipationMode::16546 
-52,204,openehr,en,participation mode,internet telephone,Live verbal communication over a the internet. ,HL7_ParticipationMode::16546 
-53,205,openehr,en,participation mode,telephone,Live verbal communication over a telephone. ,HL7_ParticipationMode::16546 
-54,206,openehr,en,participation mode,asynchronous text; email; fax; letter; handwritten note; SMS message,Any text-only communication including email  written text  SMS message etc. ,HL7_ParticipationMode::V16549 
-55,207,openehr,en,participation mode,email,Written communication by email. ,HL7_ParticipationMode::16553 [ inlcude HL7_ParticipationMode::16554 (electronic data)] 
-56,208,openehr,en,participation mode,facsimile/telefax,Non-interactive written communication using a fax machine. ,HL7_ParticipationMode::16552 
-57,209,openehr,en,participation mode,SMS message,Messages sent via mobile/cell phone ,
-58,210,openehr,en,participation mode,printed/typed letter,Written communication by typewritten document. ,HL7_ParticipationMode::16551 
-59,211,openehr,en,participation mode,handwritten note,Written communication by handwritten document. ,HL7_ParticipationMode::16550 
-60,212,openehr,en,participation mode,live text-only; internet chat; SMS chat; interactive written note,Any live text-only communication ,
-61,213,openehr,en,participation mode,internet chat,Live text-only communication over the internet ,
-62,214,openehr,en,participation mode,SMS chat,Live text-only chat over mobile/cell phone ,
-63,215,openehr,en,participation mode,interactive written note,Live text-only communication using written notes ,HL7_ParticipationMode::16550 
-64,216,openehr,en,participation mode,face-to-face communication,Face to face communications between parties in the same room. ,HL7_ParticipationMode::16545 
-65,217,openehr,en,participation mode,signing (face-toface),Live face-to-face communication using a recognised sign language. ,
-66,218,openehr,en,participation mode,signing over video,Live video communication using sign language. ,
-67,219,openehr,en,participation mode,physically present,Participation by actions  where the participant is physically present. ,HL7_ParticipationMode::16556 
-68,220,openehr,en,participation mode,physically remote,Participation by actions  where the participant is not physically present  and the actions are transmitted by electronic means. ,HL7_ParticipationMode::16557 
-69,221,openehr,en,participation mode,translated text,Non-interactive written communication requiring translation ,HL7_ParticipationMode::V16549 
-70,222,openehr,en,participation mode,interpreted audio-only,Any live audio-only communication using an interpreter. ,HL7_ParticipationMode::V16544 (includes live) 
-71,223,openehr,en,participation mode,interpreted face-toface communication,Face to face communications between parties in the same room with an interpreter ,HL7_ParticipationMode::16545 
-72,224,openehr,en,participation mode,interpreted video communication,Live audio-visual communication involving an interpreter ,
-73,240,openehr,en,attestation reason,signed,The attested information has been signed by its signatory. ,HL7_ParticipationSignature::10284 
-74,245,openehr,en,Instruction transitions,active,The instruction is currently being carried out ,
-75,249,openehr,en,audit change type,creation,Change type was creation. ,HL7_CDA: CEN: 
-76,250,openehr,en,audit change type,amendment,Change type was amendment i.e. correction of the previous version. ,HL7_CDA: CEN: 
-77,251,openehr,en,audit change type,modification,Change type was update of the previous version. ,HL7_CDA: CEN: 
-78,252,openehr,en,audit change type,synthesis,Change type was creation synthesis of data due to conversion process  typically a data importer. ,HL7_CDA: CEN: 
-79,253,openehr,en,null flavours,unknown,A possible value exists but is not provided. ,HL7_NullFlavor::V10612 
-80,254,openehr,en,subject relationship,parent,Relationship of parent to subject of EHR ,HL7: CEN: 
-81,255,openehr,en,subject relationship,biological mother,Relationship of biological mother to subject of EHR ,HL7: CEN: 
-82,256,openehr,en,subject relationship,biological father,Relationship of biological father to subject of EHR ,HL7: CEN: 
-83,257,openehr,en,subject relationship,cousin,Relationship of cousin to subject of EHR ,HL7: CEN: 
-84,258,openehr,en,subject relationship,adoptive mother,Relationship of adoptive mother to subject of EHR ,HL7: CEN: 
-85,259,openehr,en,subject relationship,adoptive father,Relationship of adoptive father to subject of EHR ,HL7: CEN: 
-86,260,openehr,en,subject relationship,adopted son,Relationship of adopted son to subject of EHR ,HL7: CEN: 
-87,261,openehr,en,subject relationship,adopted daughter,Relationship of adopted daughter to subject of EHR ,HL7: CEN: 
-88,262,openehr,en,subject relationship,step mother,Relationship of step mother to subject of EHR ,HL7: CEN: 
-89,263,openehr,en,subject relationship,step father,Relationship of step father to subject of EHR ,HL7: CEN: 
-90,264,openehr,en,subject relationship,guardian,Relationship of guardianto subject of EHR ,HL7: CEN: 
-91,265,openehr,en,subject relationship,cohabitee,Lives with the subject of EHR ,HL7: CEN: 
-92,267,openehr,en,event math function,mode,Value of the interval-event is the modal (most common) value of the discrete events which the interval-event summarises. ,
-93,268,openehr,en,event math function,median,Value of the interval-event is the median (centre value in sorted series) value of the discrete events which the interval-event summarises. ,
-94,271,openehr,en,null flavours,no information,No information provided; nothing can be inferred as to the reason why  including whether there might be a possible applicable value or not. ,HL7_NullFlavor::V10610 
-95,272,openehr,en,null flavours,masked,The value has not been provided due to privacy settings. ,HL7_NullFlavor::17932 
-96,273,openehr,en,null flavours,not applicable,No valid value exists for this data item. ,HL7_NullFlavor::10611 
-97,334,openehr,en,property,Electrical current ,,
-98,335,openehr,en,property,Area ,,
-99,336,openehr,en,property,Specific volume ,,
-100,337,openehr,en,property,Specific surface ,,
-101,338,openehr,en,property,Velocity ,,
-102,339,openehr,en,property,Acceleration ,,
-103,340,openehr,en,property,Momentum ,,
-104,341,openehr,en,property,Velocity  angular ,,
-105,342,openehr,en,property,Acceleration  angular ,,
-106,343,openehr,en,property,Momentum  angular ,,
-107,344,openehr,en,property,Moment inertia  area ,,
-108,345,openehr,en,property,Moment inertia  mass ,,
-109,346,openehr,en,property,Momentum  flow rate ,,
-110,347,openehr,en,property,Flow rate  mass ,,
-111,348,openehr,en,property,Flux  mass ,,
-112,349,openehr,en,property,Mass per area ,,
-113,350,openehr,en,property,Density ,,
-114,351,openehr,en,property,Flow rate  mass/volume ,,
-115,352,openehr,en,property,Flow rate  mass/force ,,
-116,355,openehr,en,property,Force ,,
-117,356,openehr,en,property,Surface tension ,,
-118,357,openehr,en,property,Force  body ,,
-119,360,openehr,en,property,Velocity  dynamic ,,
-120,361,openehr,en,property,Velocity  kinematic ,,
-121,362,openehr,en,property,Diffusion coefficient ,,
-122,365,openehr,en,property,Energy per area ,,
-123,366,openehr,en,property,Energy density ,,
-124,367,openehr,en,property,Power  linear ,,
-125,368,openehr,en,property,Power flux ,,
-126,369,openehr,en,property,Power density ,,
-127,370,openehr,en,property,Specific energy ,,
-128,371,openehr,en,property,Specific heat  gas content ,,
-129,373,openehr,en,property,Heat transfer coefficient ,,
-130,374,openehr,en,property,Voltage  electrical ,,
-131,375,openehr,en,property,Resistance ,,
-132,377,openehr,en,property,Electrical field strength ,,
-133,378,openehr,en,property,Magnetic flux ,,
-134,379,openehr,en,property,Inductance ,,
-135,380,openehr,en,property,Qualified real ,This is a number with an arithmetic qualification (which may be no units  103 etc) allowing integers to be expressed as reals raised to a nominated power  or for real numbers alone. ,
-136,381,openehr,en,property,Amount (Eq) ,,
-137,382,openehr,en,property,Frequency ,,
-138,384,openehr,en,property,Amount (mole) ,,
-139,385,openehr,en,property,Mass (IU) ,,
-140,431,openehr,en,composition category,persistent,This Composition contains information which remains valid for (more or less) the life of the EHR. Typical persistent Compositions include family history” problem list” current medications”  and vaccination history”. The usual change type when creating a new version of a persistent composition is modification”. ,
-141,433,openehr,en,composition category,event,This composition pertains to a point in time or brief episode. Change types may usually be modificationor  ,
-142,497,openehr,en,property,Angle  plane ,,
-143,498,openehr,en,property,Electrical charge ,,
-144,499,openehr,en,property,Light intensity ,,
-145,500,openehr,en,property,Angle  solid ,,
-146,501,openehr,en,property,Electrical capacitance ,,
-147,502,openehr,en,property,Electrical conductance ,,
-148,503,openehr,en,property,Magnetic flux density ,,
-149,504,openehr,en,property,Luminous flux ,,
-150,505,openehr,en,property,Illuminance ,,
-151,506,openehr,en,property,Radioactivity ,,
-152,507,openehr,en,property,Proportion ,,
-153,508,openehr,en,property,Energy dose ,,
-154,521,openehr,en,event math function,decrease,This is a change - as in 147 - except indicates that the value  while a positive number  is actually a negative change. Typically used for negative changes like weight loss: 5kgor blood pressure postural drop of 10 mm[Hg]”. ,
-155,522,openehr,en,event math function,increase,This is also a change  but is only a positive change and cannot be expressed as a negative. This can be used for positive changes like Weight gain: 2.5kg”. ,
-156,523,openehr,en,version lifecycle state,deleted,Item has been logically deleted. ,
-157,523,openehr,en,audit change type,deleted,Change type was logical deletion. ,HL7_CDA: CEN: 
-158,524,openehr,en,Instruction transitions,initial,The instruction is recorded but no state is determined ,
-159,526,openehr,en,Instruction transitions,planned,The instruction is planned ,
-160,527,openehr,en,Instruction transitions,postponed,The instruction has been posponed - it had not be commenced ,
-161,528,openehr,en,Instruction transitions,cancelled,The instruction has been cancelled - it had not been commenced and will not commence in the future ,
-162,529,openehr,en,Instruction transitions,scheduled,The instruction has been scheduled to be carried out at a particular time ,
-163,530,openehr,en,Instruction transitions,suspended,The instruction is suspended  it has been activated but is not active at present. It could be active again in the future. ,
-164,531,openehr,en,Instruction transitions,aborted,The instruction is aborted  it has been activated but ceased before it has been completed and will not be restarted in the future. ,
-165,532,openehr,en,version lifecycle state,complete,Item is complete at time of committal. ,
-166,532,openehr,en,Instruction transitions,completed,The instruction has been completed ,
-167,533,openehr,en,Instruction transitions,expired,The instruction has expired  timed out - and assumed to have either been cancelled  aborted or completed ,
-168,535,openehr,en,Instruction transitions,initiate,Initiate the planning of the Instruction. ,
-169,536,openehr,en,Instruction transitions,plan step,Any step in the planned state of the Instruction  e.g. signing  approving. ,
-170,537,openehr,en,Instruction transitions,postpone,Put a planned Instruction on hold  while still in the planning stage  i.e. before it has been booked or started. ,
-171,538,openehr,en,Instruction transitions,restore,Restore a previously postponed Instruction back to the planned state. ,
-172,539,openehr,en,Instruction transitions,schedule,Where booking is required  book the activities in the Instruction in a scheduling system. ,
-173,540,openehr,en,Instruction transitions,start,Start executing the activities in the Instruction  e.g. commence drug administration course. ,
-174,540,openehr,en,Instruction transitions,notify aborted,Occurs when notification of Instruction having been aborted is received after expiry. ,
-175,541,openehr,en,Instruction transitions,do,Do the activities in the Instruction in one go  taking the state machine directly from the planned to the completed state. Used for Instructions whose activities are instantaneous in the practical sense  e.g. a single vaccination  single tablet. ,
-176,542,openehr,en,Instruction transitions,postponed step,Any step in the postponed state of the Instruction. ,
-177,543,openehr,en,Instruction transitions,active step,Any step taken during the active phase of the Instruction  e.g. nurse’s observation  adjustment of dose. ,
-178,544,openehr,en,Instruction transitions,suspend,Suspend the activities from the active phase  with the possibility of later resumption. ,
-179,545,openehr,en,Instruction transitions,suspended step,Any step taken in the suspended state  e.g. nurse’s observation  pathology test to determine if the Instruction should be resumed  remain suspended or aborted. ,
-180,546,openehr,en,Instruction transitions,resume,Resume the Instruction from the suspended state. ,
-181,547,openehr,en,Instruction transitions,abort,Abort the Instruction  i.e. stop its execution permanently after it has started. ,
-182,548,openehr,en,Instruction transitions,finish,Finish performing the Instruction  taking it to the completed state. ,
-183,549,openehr,en,Instruction transitions,time out,Time out has occurred  taking the Instruction from some pervious state into the expired state. ,
-184,551,openehr,en,Instruction transitions,notify completed,Occurs when notification of Instruction having been completed is received after expiry. ,
-185,552,openehr,en,Instruction transitions,notify cancelled,Occurs when notification of Instruction having been cancelled is received after expiry. ,
-186,553,openehr,en,version lifecycle state,incomplete,Item is incomplete at time of committal  in the view of the author. Further editing or review needed before its status will be set to finished”. ,
-187,640,openehr,en,event math function,actual,Value of the datum was the value indicated during the entire time of the event  i.e. it is not an averaged or other computed value. ,
-188,648,openehr,en,attestation reason,witnessed,This attested information has been witnessed by the signatory. ,
-189,666,openehr,en,audit change type,attestation,Existing data were attested. ,HL7_CDA: CEN: 
-190,669,openehr,en,term mapping purpose,public health,Public health related term mapping. ,
-191,670,openehr,en,term mapping purpose,reimbursement,Reimbrusement / billing related term mapping. ,
-192,671,openehr,en,term mapping purpose,research study,Term mapping.for research study ,
Index: by/branches/0.5.0/terminology/test/fixtures/terminologies.yml
===================================================================
--- /ruby/branches/0.5.0/terminology/test/fixtures/terminologies.yml	(revision 166)
+++ 	(revision )
@@ -1,17 +1,0 @@
-# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
-
-one:
-  id: 1
-  lang: MyString
-  group: MyText
-  rubric: MyString
-  description: MyText
-  mappings: MyString
-
-two:
-  id: 1
-  lang: MyString
-  group: MyText
-  rubric: MyString
-  description: MyText
-  mappings: MyString
Index: by/branches/0.5.0/terminology/test/functional/terminology_controller_test.rb
===================================================================
--- /ruby/branches/0.5.0/terminology/test/functional/terminology_controller_test.rb	(revision 166)
+++ 	(revision )
@@ -1,8 +1,0 @@
-require 'test_helper'
-
-class TerminologyControllerTest < ActionController::TestCase
-  # Replace this with your real tests.
-  def test_truth
-    assert true
-  end
-end
Index: by/branches/0.5.0/terminology/test/test_helper.rb
===================================================================
--- /ruby/branches/0.5.0/terminology/test/test_helper.rb	(revision 166)
+++ 	(revision )
@@ -1,38 +1,0 @@
-ENV["RAILS_ENV"] = "test"
-require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
-require 'test_help'
-
-class Test::Unit::TestCase
-  # Transactional fixtures accelerate your tests by wrapping each test method
-  # in a transaction that's rolled back on completion.  This ensures that the
-  # test database remains unchanged so your fixtures don't have to be reloaded
-  # between every test method.  Fewer database queries means faster tests.
-  #
-  # Read Mike Clark's excellent walkthrough at
-  #   http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting
-  #
-  # Every Active Record database supports transactions except MyISAM tables
-  # in MySQL.  Turn off transactional fixtures in this case; however, if you
-  # don't care one way or the other, switching from MyISAM to InnoDB tables
-  # is recommended.
-  #
-  # The only drawback to using transactional fixtures is when you actually 
-  # need to test transactions.  Since your test is bracketed by a transaction,
-  # any transactions started in your code will be automatically rolled back.
-  self.use_transactional_fixtures = true
-
-  # Instantiated fixtures are slow, but give you @david where otherwise you
-  # would need people(:david).  If you don't want to migrate your existing
-  # test cases which use the @david style and don't mind the speed hit (each
-  # instantiated fixtures translates to a database query per test method),
-  # then set this back to true.
-  self.use_instantiated_fixtures  = false
-
-  # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
-  #
-  # Note: You'll currently still have to declare fixtures explicitly in integration tests
-  # -- they do not yet inherit this setting
-  fixtures :all
-
-  # Add more helper methods to be used by all tests here...
-end
Index: by/branches/0.5.0/terminology/test/unit/terminology_test.rb
===================================================================
--- /ruby/branches/0.5.0/terminology/test/unit/terminology_test.rb	(revision 166)
+++ 	(revision )
@@ -1,8 +1,0 @@
-require 'test_helper'
-
-class TerminologyTest < ActiveSupport::TestCase
-  # Replace this with your real tests.
-  def test_truth
-    assert true
-  end
-end
Index: /ruby/branches/0.5.0/test/fixtures/terminologies.yml
===================================================================
--- /ruby/branches/0.5.0/test/fixtures/terminologies.yml	(revision 167)
+++ /ruby/branches/0.5.0/test/fixtures/terminologies.yml	(revision 167)
@@ -0,0 +1,17 @@
+# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
+
+one:
+  id: 1
+  lang: MyString
+  group: MyText
+  rubric: MyString
+  description: MyText
+  mappings: MyString
+
+two:
+  id: 1
+  lang: MyString
+  group: MyText
+  rubric: MyString
+  description: MyText
+  mappings: MyString
Index: /ruby/branches/0.5.0/test/functional/terminology_controller_test.rb
===================================================================
--- /ruby/branches/0.5.0/test/functional/terminology_controller_test.rb	(revision 167)
+++ /ruby/branches/0.5.0/test/functional/terminology_controller_test.rb	(revision 167)
@@ -0,0 +1,8 @@
+require 'test_helper'
+
+class TerminologyControllerTest < ActionController::TestCase
+  # Replace this with your real tests.
+  def test_truth
+    assert true
+  end
+end
Index: /ruby/branches/0.5.0/test/test_helper.rb
===================================================================
--- /ruby/branches/0.5.0/test/test_helper.rb	(revision 167)
+++ /ruby/branches/0.5.0/test/test_helper.rb	(revision 167)
@@ -0,0 +1,38 @@
+ENV["RAILS_ENV"] = "test"
+require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
+require 'test_help'
+
+class Test::Unit::TestCase
+  # Transactional fixtures accelerate your tests by wrapping each test method
+  # in a transaction that's rolled back on completion.  This ensures that the
+  # test database remains unchanged so your fixtures don't have to be reloaded
+  # between every test method.  Fewer database queries means faster tests.
+  #
+  # Read Mike Clark's excellent walkthrough at
+  #   http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting
+  #
+  # Every Active Record database supports transactions except MyISAM tables
+  # in MySQL.  Turn off transactional fixtures in this case; however, if you
+  # don't care one way or the other, switching from MyISAM to InnoDB tables
+  # is recommended.
+  #
+  # The only drawback to using transactional fixtures is when you actually 
+  # need to test transactions.  Since your test is bracketed by a transaction,
+  # any transactions started in your code will be automatically rolled back.
+  self.use_transactional_fixtures = true
+
+  # Instantiated fixtures are slow, but give you @david where otherwise you
+  # would need people(:david).  If you don't want to migrate your existing
+  # test cases which use the @david style and don't mind the speed hit (each
+  # instantiated fixtures translates to a database query per test method),
+  # then set this back to true.
+  self.use_instantiated_fixtures  = false
+
+  # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
+  #
+  # Note: You'll currently still have to declare fixtures explicitly in integration tests
+  # -- they do not yet inherit this setting
+  fixtures :all
+
+  # Add more helper methods to be used by all tests here...
+end
Index: /ruby/branches/0.5.0/test/unit/terminology_test.rb
===================================================================
--- /ruby/branches/0.5.0/test/unit/terminology_test.rb	(revision 167)
+++ /ruby/branches/0.5.0/test/unit/terminology_test.rb	(revision 167)
@@ -0,0 +1,8 @@
+require 'test_helper'
+
+class TerminologyTest < ActiveSupport::TestCase
+  # Replace this with your real tests.
+  def test_truth
+    assert true
+  end
+end
Index: /ruby/branches/0.5.0/test/unit/ts_openehr.rb
===================================================================
--- /ruby/branches/0.5.0/test/unit/ts_openehr.rb	(revision 167)
+++ /ruby/branches/0.5.0/test/unit/ts_openehr.rb	(revision 167)
@@ -0,0 +1,11 @@
+# To change this template, choose Tools | Templates
+# and open the template in the editor.
+
+require 'test/unit' 
+
+# Add your testcases here
+
+require 'tc_1' 
+require 'tc_2' 
+require 'tc_3' 
+
Index: /ruby/branches/0.5.0/tests/models/test_archetype_model.rb
===================================================================
--- /ruby/branches/0.5.0/tests/models/test_archetype_model.rb	(revision 166)
+++ /ruby/branches/0.5.0/tests/models/test_archetype_model.rb	(revision 167)
@@ -5,25 +5,25 @@
 class ArchetypeModelTest < Test::Unit::TestCase
   def setup
-    @archetype = OpenEHR::AM::Archetype::ARCHETYPE.new
-    @validity_kind = OpenEHR::AM::Archetype::VALIDITY_KIND.new
+    @archetype = OpenEhr::AM::Archetype::ARCHETYPE.new
+    @validity_kind = OpenEhr::AM::Archetype::VALIDITY_KIND.new
 
-    @archetype_description = OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION.new
-    @archetype_description_item = OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION_ITEM.new
+    @archetype_description = OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION.new
+    @archetype_description_item = OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION_ITEM.new
   end
   
   def test_init
-    assert_instance_of OpenEHR::AM::Archetype::ARCHETYPE, @archetype
-    assert_instance_of OpenEHR::AM::Archetype::VALIDITY_KIND, @validity_kind
-    assert_instance_of OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION, @archetype_description
-    assert_instance_of OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION_ITEM, @archetype_description_item
-    assert_instance_of OpenEHR::AM::Archetype::ARCHETYPE, @archetype
+    assert_instance_of OpenEhr::AM::Archetype::ARCHETYPE, @archetype
+    assert_instance_of OpenEhr::AM::Archetype::VALIDITY_KIND, @validity_kind
+    assert_instance_of OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION, @archetype_description
+    assert_instance_of OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION_ITEM, @archetype_description_item
+    assert_instance_of OpenEhr::AM::Archetype::ARCHETYPE, @archetype
   end
 
   def test_create
-    archetype_instance = OpenEHR::AM::Archetype::ARCHETYPE.create() do |archetype|
+    archetype_instance = OpenEhr::AM::Archetype::ARCHETYPE.create() do |archetype|
       archetype.adl_version = '1.4'
     end
 
-    assert_instance_of OpenEHR::AM::Archetype::ARCHETYPE, archetype_instance
+    assert_instance_of OpenEhr::AM::Archetype::ARCHETYPE, archetype_instance
   end
 end
@@ -31,49 +31,49 @@
 class ArchetypeModelConstraintTest < Test::Unit::TestCase
   def setup
-    @archetype_constraint = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT.new
-    @cardinality = OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY.new    
+    @archetype_constraint = OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT.new
+    @cardinality = OpenEhr::AM::Archetype::Constraint_Model::CARDINALITY.new
     
-    @archetype_constraint = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT.new
-    @c_object = OpenEHR::AM::Archetype::Constraint_Model::C_OBJECT.new
-    @c_defined_object = OpenEHR::AM::Archetype::Constraint_Model::C_DEFINED_OBJECT.new
-    @c_attribute = OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE.new
-    @c_single_attribute = OpenEHR::AM::Archetype::Constraint_Model::C_SINGLE_ATTRIBUTE.new
-    @c_multiple_attribute = OpenEHR::AM::Archetype::Constraint_Model::C_MULTIPLE_ATTRIBUTE.new(:rm_attribute_name => 'attribute_name', :cardinality => @cardinality)
-    @c_primitive_object = OpenEHR::AM::Archetype::Constraint_Model::C_PRIMITIVE_OBJECT.new
-    @c_reference_object =  OpenEHR::AM::Archetype::Constraint_Model::C_REFERENCE_OBJECT.new
-    @archetype_internal_ref =  OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_INTERNAL_REF.new
-    @archetype_slot = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_SLOT.new
-    @constraint_ref = OpenEHR::AM::Archetype::Constraint_Model::CONSTRAINT_REF.new
-    @c_domain_type = OpenEHR::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE.new
-    @c_complex_object = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.new(:attributes => [@c_single_attribute])
+    @archetype_constraint = OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT.new
+    @c_object = OpenEhr::AM::Archetype::Constraint_Model::C_OBJECT.new
+    @c_defined_object = OpenEhr::AM::Archetype::Constraint_Model::C_DEFINED_OBJECT.new
+    @c_attribute = OpenEhr::AM::Archetype::Constraint_Model::C_ATTRIBUTE.new
+    @c_single_attribute = OpenEhr::AM::Archetype::Constraint_Model::C_SINGLE_ATTRIBUTE.new
+    @c_multiple_attribute = OpenEhr::AM::Archetype::Constraint_Model::C_MULTIPLE_ATTRIBUTE.new(:rm_attribute_name => 'attribute_name', :cardinality => @cardinality)
+    @c_primitive_object = OpenEhr::AM::Archetype::Constraint_Model::C_PRIMITIVE_OBJECT.new
+    @c_reference_object =  OpenEhr::AM::Archetype::Constraint_Model::C_REFERENCE_OBJECT.new
+    @archetype_internal_ref =  OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_INTERNAL_REF.new
+    @archetype_slot = OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_SLOT.new
+    @constraint_ref = OpenEhr::AM::Archetype::Constraint_Model::CONSTRAINT_REF.new
+    @c_domain_type = OpenEhr::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE.new
+    @c_complex_object = OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.new(:attributes => [@c_single_attribute])
   end
 
   def test_init
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT, @archetype_constraint
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_OBJECT, @c_object
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_DEFINED_OBJECT, @c_defined_object
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE, @c_attribute
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_SINGLE_ATTRIBUTE, @c_single_attribute
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_MULTIPLE_ATTRIBUTE, @c_multiple_attribute
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT, @archetype_constraint
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_OBJECT, @c_object
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_DEFINED_OBJECT, @c_defined_object
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_ATTRIBUTE, @c_attribute
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_SINGLE_ATTRIBUTE, @c_single_attribute
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_MULTIPLE_ATTRIBUTE, @c_multiple_attribute
     assert_equal 'attribute_name', @c_multiple_attribute.rm_attribute_name
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY, @c_multiple_attribute.cardinality
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_PRIMITIVE_OBJECT, @c_primitive_object
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_REFERENCE_OBJECT, @c_reference_object
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_INTERNAL_REF, @archetype_internal_ref
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_SLOT, @archetype_slot
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::CONSTRAINT_REF, @constraint_ref
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE, @c_domain_type
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, @c_complex_object
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::CARDINALITY, @c_multiple_attribute.cardinality
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_PRIMITIVE_OBJECT, @c_primitive_object
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_REFERENCE_OBJECT, @c_reference_object
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_INTERNAL_REF, @archetype_internal_ref
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_SLOT, @archetype_slot
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::CONSTRAINT_REF, @constraint_ref
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE, @c_domain_type
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, @c_complex_object
     assert_instance_of Array, @c_complex_object.attributes
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT, @archetype_constraint
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY, @cardinality
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT, @archetype_constraint
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::CARDINALITY, @cardinality
   end
 
   def test_create
-    c_complex_object = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.create(:node_id => 'test_node',
+    c_complex_object = OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.create(:node_id => 'test_node',
                                                                                          :attributes => [1,2],
                                                                                          :assumed_value => Array
                                                                                          )
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, c_complex_object
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, c_complex_object
     assert_equal 'test_node', c_complex_object.node_id
   end
@@ -83,26 +83,26 @@
   def setup
     #@c_primitive = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_PRIMITIVE.new
-    @c_boolean = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true,
+    @c_boolean = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true,
                                                                                     :false_valid => true,
                                                                                     :assumed_value => true)
-    @c_string = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_STRING.new
-    @c_integer = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_INTEGER.new
-    @c_real = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_REAL.new
-    @c_time = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_TIME.new
-    @c_date = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE.new
-    @c_date_time = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME.new
-    @c_duration = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DURATION.new
+    @c_string = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_STRING.new
+    @c_integer = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_INTEGER.new
+    @c_real = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_REAL.new
+    @c_time = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_TIME.new
+    @c_date = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DATE.new
+    @c_date_time = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME.new
+    @c_duration = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DURATION.new
   end
 
   def test_init
     #assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_PRIMITIVE, @c_primitive
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN, @c_boolean
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_STRING, @c_string
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_INTEGER, @c_integer
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_REAL, @c_real
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_TIME, @c_time
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE, @c_date
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME, @c_date_time
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DURATION, @c_duration
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN, @c_boolean
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_STRING, @c_string
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_INTEGER, @c_integer
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_REAL, @c_real
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_TIME, @c_time
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DATE, @c_date
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME, @c_date_time
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DURATION, @c_duration
   end
 
@@ -119,5 +119,5 @@
     end
     assert_raise(ArgumentError) do 
-      OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid =>false,
+      OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid =>false,
                                                                          :false_valid => false,
                                                                          :assumed_value => false)
@@ -129,11 +129,11 @@
 class ArchetypeModelOntologyTest < Test::Unit::TestCase
   def setup
-    @archetype_ontology = OpenEHR::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY.new
-    @archetype_term = OpenEHR::AM::Archetype::Ontology::ARCHETYPE_TERM.new(:code => '', :items => '')
+    @archetype_ontology = OpenEhr::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY.new
+    @archetype_term = OpenEhr::AM::Archetype::Ontology::ARCHETYPE_TERM.new(:code => '', :items => '')
   end
 
   def test_init
-    assert_instance_of OpenEHR::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY, @archetype_ontology
-    assert_instance_of OpenEHR::AM::Archetype::Ontology::ARCHETYPE_TERM, @archetype_term
+    assert_instance_of OpenEhr::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY, @archetype_ontology
+    assert_instance_of OpenEhr::AM::Archetype::Ontology::ARCHETYPE_TERM, @archetype_term
   end
 end
@@ -141,23 +141,23 @@
 class ArchetypeModelAssertionTest < Test::Unit::TestCase
   def setup
-    @assertion = OpenEHR::AM::Archetype::Assertion::ASSERTION.new
-    @assertion_variable = OpenEHR::AM::Archetype::Assertion::ASSERTION_VARIABLE.new
-    @operator_kind = OpenEHR::AM::Archetype::Assertion::OPERATOR_KIND.new
-    @expr_item = OpenEHR::AM::Archetype::Assertion::EXPR_ITEM.new
-    @expr_leaf = OpenEHR::AM::Archetype::Assertion::EXPR_LEAF.new
-    @expr_operator = OpenEHR::AM::Archetype::Assertion::EXPR_OPERATOR.new
-    @expr_unary_operator = OpenEHR::AM::Archetype::Assertion::EXPR_UNARY_OPERATOR.new
-    @expr_binary_operator = OpenEHR::AM::Archetype::Assertion::EXPR_BINARY_OPERATOR.new
+    @assertion = OpenEhr::AM::Archetype::Assertion::ASSERTION.new
+    @assertion_variable = OpenEhr::AM::Archetype::Assertion::ASSERTION_VARIABLE.new
+    @operator_kind = OpenEhr::AM::Archetype::Assertion::OPERATOR_KIND.new
+    @expr_item = OpenEhr::AM::Archetype::Assertion::EXPR_ITEM.new
+    @expr_leaf = OpenEhr::AM::Archetype::Assertion::EXPR_LEAF.new
+    @expr_operator = OpenEhr::AM::Archetype::Assertion::EXPR_OPERATOR.new
+    @expr_unary_operator = OpenEhr::AM::Archetype::Assertion::EXPR_UNARY_OPERATOR.new
+    @expr_binary_operator = OpenEhr::AM::Archetype::Assertion::EXPR_BINARY_OPERATOR.new
   end
 
   def test_init
-    assert_instance_of OpenEHR::AM::Archetype::Assertion::ASSERTION, @assertion
-    assert_instance_of OpenEHR::AM::Archetype::Assertion::ASSERTION_VARIABLE, @assertion_variable
-    assert_instance_of OpenEHR::AM::Archetype::Assertion::OPERATOR_KIND, @operator_kind
-    assert_instance_of OpenEHR::AM::Archetype::Assertion::EXPR_ITEM, @expr_item
-    assert_instance_of OpenEHR::AM::Archetype::Assertion::EXPR_LEAF, @expr_leaf
-    assert_instance_of OpenEHR::AM::Archetype::Assertion::EXPR_OPERATOR, @expr_operator
-    assert_instance_of OpenEHR::AM::Archetype::Assertion::EXPR_UNARY_OPERATOR, @expr_unary_operator
-    assert_instance_of OpenEHR::AM::Archetype::Assertion::EXPR_BINARY_OPERATOR, @expr_binary_operator
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::ASSERTION, @assertion
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::ASSERTION_VARIABLE, @assertion_variable
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::OPERATOR_KIND, @operator_kind
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::EXPR_ITEM, @expr_item
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::EXPR_LEAF, @expr_leaf
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::EXPR_OPERATOR, @expr_operator
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::EXPR_UNARY_OPERATOR, @expr_unary_operator
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::EXPR_BINARY_OPERATOR, @expr_binary_operator
   end
 end
@@ -165,29 +165,29 @@
 class ArchetypeModelProfileTest < Test::Unit::TestCase
   def setup
-    @c_dv_state = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::C_DV_STATE.new
-    @state_machine = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::STATE_MACHINE.new
-    @state = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::STATE.new
-    @terminal_state = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::TERMINAL_STATE.new
-    @non_terminal_state = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::NON_TERMINAL_STATE.new
-    @transition = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::TRANSITION.new
+    @c_dv_state = OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::C_DV_STATE.new
+    @state_machine = OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::STATE_MACHINE.new
+    @state = OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::STATE.new
+    @terminal_state = OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::TERMINAL_STATE.new
+    @non_terminal_state = OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::NON_TERMINAL_STATE.new
+    @transition = OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::TRANSITION.new
 
-    @c_code_phase = OpenEHR::AM::OpenEHR_Profile::Data_Types::Text::C_CODE_PHASE.new
+    @c_code_phase = OpenEhr::AM::OpenEHR_Profile::DataTypes::Text::C_CODE_PHASE.new
 
-    @c_dv_quantity = OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_DV_QUANTITY.new
-    @c_dv_ordinal = OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_DV_ORDINAL.new
-    @c_quantity_item = OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_QUANTITY_ITEM.new
+    @c_dv_quantity = OpenEhr::AM::OpenEHR_Profile::DataTypes::Quantity::C_DV_QUANTITY.new
+    @c_dv_ordinal = OpenEhr::AM::OpenEHR_Profile::DataTypes::Quantity::C_DV_ORDINAL.new
+    @c_quantity_item = OpenEhr::AM::OpenEHR_Profile::DataTypes::Quantity::C_QUANTITY_ITEM.new
   end
 
   def test_init
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::C_DV_STATE, @c_dv_state
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::STATE_MACHINE, @state_machine
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::STATE, @state
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::TERMINAL_STATE, @terminal_state
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::NON_TERMINAL_STATE, @non_terminal_state
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::TRANSITION, @transition
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Text::C_CODE_PHASE, @c_code_phase
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_DV_QUANTITY, @c_dv_quantity
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_DV_ORDINAL, @c_dv_ordinal
-    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_QUANTITY_ITEM, @c_quantity_item
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::C_DV_STATE, @c_dv_state
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::STATE_MACHINE, @state_machine
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::STATE, @state
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::TERMINAL_STATE, @terminal_state
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::NON_TERMINAL_STATE, @non_terminal_state
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::TRANSITION, @transition
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Text::C_CODE_PHASE, @c_code_phase
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Quantity::C_DV_QUANTITY, @c_dv_quantity
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Quantity::C_DV_ORDINAL, @c_dv_ordinal
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Quantity::C_QUANTITY_ITEM, @c_quantity_item
   end
 end
Index: /ruby/branches/0.5.0/tests/models/test_assumed_library_types.rb
===================================================================
--- /ruby/branches/0.5.0/tests/models/test_assumed_library_types.rb	(revision 166)
+++ /ruby/branches/0.5.0/tests/models/test_assumed_library_types.rb	(revision 167)
@@ -4,8 +4,8 @@
 class Assumed_Library_Test < Test::Unit::TestCase
   def setup
-    @interval = OpenEHR::Assumed_Library_Types::Interval.new(1,2)
+    @interval = OpenEhr::AssumedLibraryTypes::Interval.new(1,2)
   end
   def test_initialize
-    assert_instance_of OpenEHR::Assumed_Library_Types::Interval, @interval
+    assert_instance_of OpenEhr::AssumedLibraryTypes::Interval, @interval
   end
   def test_limits_comparable
Index: /ruby/branches/0.5.0/tests/models/test_reference_model.rb
===================================================================
--- /ruby/branches/0.5.0/tests/models/test_reference_model.rb	(revision 166)
+++ /ruby/branches/0.5.0/tests/models/test_reference_model.rb	(revision 167)
@@ -5,36 +5,36 @@
 class ReferenceModelTest < Test::Unit::TestCase
   def setup
-    @authored_resource = OpenEHR::RM::Common::Resource::AUTHORED_RESOURCE.new(:original_language => "ja",
+    @authored_resource = OpenEhr::RM::Common::Resource::AUTHORED_RESOURCE.new(:original_language => "ja",
                                                                               :translations => "en",
                                                                               :description => "test")
-    @translation_details = OpenEHR::RM::Common::Resource::TRANSLATION_DETAILS.new(nil,nil,nil,nil,nil)
+    @translation_details = OpenEhr::RM::Common::Resource::TRANSLATION_DETAILS.new(nil,nil,nil,nil,nil)
 #    @openehr_definitions = OpenEHR::RM::Support::Definition::OpenEHR_Definitions.new
-    @dv_boolean = OpenEHR::RM::Data_Types::Basic::DV_Boolean.new("TRUE")
-    @dv_state = OpenEHR::RM::Data_Types::Basic::DV_State.new("code1",true)
-    @dv_identifier = OpenEHR::RM::Data_Types::Basic::DV_Identifier.new("Ruby Hospital","0123456-0", "Information office", "personal id")
-    @dv_uri = OpenEHR::RM::Data_Types::URI::DV_URI.new("http://www.openehr.jp/changeset/test?cmd=93#file0")
-    @dv_ehr_uri = OpenEHR::RM::Data_Types::URI::DV_EHR_URI.new("ehr://1234567/87284370-2D4B-4e3d-A3F3-F303D2F4F34B@2005-08-02T04:30:00")
-    @dv_text = OpenEHR::RM::Data_Types::Text::DV_Text.new("valid value")
-    @dv_coded_text = OpenEHR::RM::Data_Types::Text::DV_Coded_Text.new("valid value", "AT1000")
-    @dv_paragraph = OpenEHR::RM::Data_Types::Text::DV_Paragraph.new(Set.new(["test1", "test2"]))
+    @dv_boolean = OpenEhr::RM::DataTypes::Basic::DvBoolean.new("TRUE")
+    @dv_state = OpenEhr::RM::DataTypes::Basic::DvState.new("code1",true)
+    @dv_identifier = OpenEhr::RM::DataTypes::Basic::DvIdentifier.new("Ruby Hospital","0123456-0", "Information office", "personal id")
+    @dv_uri = OpenEhr::RM::DataTypes::Uri::DvUri.new("http://www.openehr.jp/changeset/test?cmd=93#file0")
+    @dv_ehr_uri = OpenEhr::RM::DataTypes::Uri::DvEhrUri.new("ehr://1234567/87284370-2D4B-4e3d-A3F3-F303D2F4F34B@2005-08-02T04:30:00")
+    @dv_text = OpenEhr::RM::DataTypes::Text::DvText.new("valid value")
+    @dv_coded_text = OpenEhr::RM::DataTypes::Text::DvCodedText.new("valid value", "AT1000")
+    @dv_paragraph = OpenEhr::RM::DataTypes::Text::DvParagraph.new(Set.new(["test1", "test2"]))
   end
   
   def test_init
-    assert_instance_of OpenEHR::RM::Common::Resource::AUTHORED_RESOURCE, @authored_resource
-    assert_instance_of OpenEHR::RM::Common::Resource::TRANSLATION_DETAILS, @translation_details
-    assert_instance_of OpenEHR::RM::Data_Types::Basic::DV_Boolean, @dv_boolean
-    assert_instance_of OpenEHR::RM::Data_Types::Basic::DV_State, @dv_state
-    assert_instance_of OpenEHR::RM::Data_Types::Basic::DV_Identifier, @dv_identifier
-    assert_instance_of OpenEHR::RM::Data_Types::URI::DV_URI, @dv_uri
-    assert_instance_of OpenEHR::RM::Data_Types::URI::DV_EHR_URI, @dv_ehr_uri
-    assert_instance_of OpenEHR::RM::Data_Types::Text::DV_Text, @dv_text
-    assert_instance_of OpenEHR::RM::Data_Types::Text::DV_Coded_Text, @dv_coded_text
+    assert_instance_of OpenEhr::RM::Common::Resource::AUTHORED_RESOURCE, @authored_resource
+    assert_instance_of OpenEhr::RM::Common::Resource::TRANSLATION_DETAILS, @translation_details
+    assert_instance_of OpenEhr::RM::DataTypes::Basic::DvBoolean, @dv_boolean
+    assert_instance_of OpenEhr::RM::DataTypes::Basic::DvState, @dv_state
+    assert_instance_of OpenEhr::RM::DataTypes::Basic::DvIdentifier, @dv_identifier
+    assert_instance_of OpenEhr::RM::DataTypes::Uri::DvUri, @dv_uri
+    assert_instance_of OpenEhr::RM::DataTypes::Uri::DvEhrUri, @dv_ehr_uri
+    assert_instance_of OpenEhr::RM::DataTypes::Text::DvText, @dv_text
+    assert_instance_of OpenEhr::RM::DataTypes::Text::DvCodedText, @dv_coded_text
   end
 
   def test_constant
-    assert_equal("\r", OpenEHR::RM::Support::Definition::OpenEHR_Definitions::CR)
-    assert_equal("\n", OpenEHR::RM::Support::Definition::OpenEHR_Definitions::LF)
-    assert_equal("\r", OpenEHR::RM::Data_Types::Basic::Data_Value::CR)
-    assert_equal("\n", OpenEHR::RM::Data_Types::Basic::Data_Value::LF)
+    assert_equal("\r", OpenEhr::RM::Support::Definition::OpenEHRDefinitions::CR)
+    assert_equal("\n", OpenEhr::RM::Support::Definition::OpenEHRDefinitions::LF)
+    assert_equal("\r", OpenEhr::RM::DataTypes::Basic::DataValue::CR)
+    assert_equal("\n", OpenEhr::RM::DataTypes::Basic::DataValue::LF)
   end
 
@@ -45,5 +45,5 @@
     # Constraints Value_exists
     assert_raise(ArgumentError){@dv_boolean.value=nil}
-    assert_raise(ArgumentError){OpenEHR::RM::Data_Types::Basic::DV_Boolean.new(nil)}
+    assert_raise(ArgumentError){OpenEhr::RM::DataTypes::Basic::DvBoolean.new(nil)}
   end
 
@@ -55,5 +55,5 @@
     @dv_state.terminal = false
     assert !@dv_state.is_terminal?
-    assert_raise(ArgumentError) {OpenEHR::RM::Data_Types::Basic::DV_State.new(nil,nil)}
+    assert_raise(ArgumentError) {OpenEhr::RM::DataTypes::Basic::DvState.new(nil,nil)}
   end
 
@@ -71,5 +71,5 @@
     @dv_identifier.type = "test id"
     assert_equal("test id", @dv_identifier.type)
-    assert_raise(ArgumentError) {OpenEHR::RM::Data_Types::Basic::DV_Identifier.new(nil, nil, nil, nil)}
+    assert_raise(ArgumentError) {OpenEhr::RM::DataTypes::Basic::DvIdentifier.new(nil, nil, nil, nil)}
   end
 
@@ -123,13 +123,13 @@
 class ReferenceModelSupportIdentificationTest < Test::Unit::TestCase
   def setup
-    @object_id = OpenEHR::RM::Support::Identification::OBJECT_ID.new
-    @terminology_id = OpenEHR::RM::Support::Identification::TERMINOLOGY_ID.new('terminology','version')
-    @archetype_id = OpenEHR::RM::Support::Identification::ARCHETYPE_ID.new
+    @object_id = OpenEhr::RM::Support::Identification::OBJECT_ID.new
+    @terminology_id = OpenEhr::RM::Support::Identification::TERMINOLOGY_ID.new('terminology','version')
+    @archetype_id = OpenEhr::RM::Support::Identification::ARCHETYPE_ID.new
   end
   
   def test_init
-    assert_instance_of OpenEHR::RM::Support::Identification::OBJECT_ID, @object_id
-    assert_instance_of OpenEHR::RM::Support::Identification::TERMINOLOGY_ID, @terminology_id
-    assert_instance_of OpenEHR::RM::Support::Identification::ARCHETYPE_ID, @archetype_id
+    assert_instance_of OpenEhr::RM::Support::Identification::OBJECT_ID, @object_id
+    assert_instance_of OpenEhr::RM::Support::Identification::TERMINOLOGY_ID, @terminology_id
+    assert_instance_of OpenEhr::RM::Support::Identification::ARCHETYPE_ID, @archetype_id
 
   end
