Index: by/branches/0.0/CHANGELOG
===================================================================
--- /ruby/branches/0.0/CHANGELOG	(revision 167)
+++ 	(revision )
@@ -1,3 +1,0 @@
-2008/05/15 Arranged hierachy of directory. Some test suits are broken.
-2008/05/10 Fixed some bugs and resoleved dependency on YaParc
-2008/05/08 First memorable release 0.0.1
Index: /ruby/branches/0.0/adl_parser/bin/adl_validator.rb
===================================================================
--- /ruby/branches/0.0/adl_parser/bin/adl_validator.rb	(revision 167)
+++ /ruby/branches/0.0/adl_parser/bin/adl_validator.rb	(revision 168)
@@ -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 167)
+++ /ruby/branches/0.0/adl_parser/lib/model.rb	(revision 168)
@@ -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 167)
+++ /ruby/branches/0.0/adl_parser/lib/parser.rb	(revision 168)
@@ -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 167)
+++ /ruby/branches/0.0/adl_parser/lib/scanner.rb	(revision 168)
@@ -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 167)
+++ /ruby/branches/0.0/adl_parser/lib/shell.rb	(revision 168)
@@ -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 167)
+++ /ruby/branches/0.0/adl_parser/lib/validator.rb	(revision 168)
@@ -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 167)
+++ /ruby/branches/0.0/adl_parser/tests/parser_test.rb	(revision 168)
@@ -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 167)
+++ /ruby/branches/0.0/adl_parser/tests/scanner_test.rb	(revision 168)
@@ -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 167)
+++ /ruby/branches/0.0/models/am.rb	(revision 168)
@@ -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 DataTypes
+      module Data_Types
         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 167)
+++ /ruby/branches/0.0/models/am/archetype/archetype.rb	(revision 168)
@@ -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 167)
+++ /ruby/branches/0.0/models/am/archetype/archetype_description/archetype_description.rb	(revision 168)
@@ -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 167)
+++ /ruby/branches/0.0/models/am/archetype/constraint_model/archetype_constraint.rb	(revision 168)
@@ -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 167)
+++ /ruby/branches/0.0/models/am/archetype/constraint_model/assertion.rb	(revision 168)
@@ -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 167)
+++ /ruby/branches/0.0/models/am/archetype/constraint_model/primitive.rb	(revision 168)
@@ -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 167)
+++ /ruby/branches/0.0/models/am/archetype/ontology.rb	(revision 168)
@@ -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 167)
+++ /ruby/branches/0.0/models/am/openehr_profile/data_types/basic.rb	(revision 168)
@@ -1,6 +1,6 @@
-module OpenEhr
+module OpenEHR
   module AM
     module OpenEHR_Profile
-      module DataTypes
+      module Data_Types
         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 167)
+++ /ruby/branches/0.0/models/am/openehr_profile/data_types/quantity.rb	(revision 168)
@@ -1,12 +1,12 @@
-module OpenEhr
+module OpenEHR
   module AM
     module OpenEHR_Profile
-      module DataTypes
+      module Data_Types
 
         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 167)
+++ /ruby/branches/0.0/models/am/openehr_profile/data_types/text.rb	(revision 168)
@@ -1,8 +1,8 @@
-module OpenEhr
+module OpenEHR
   module AM
     module OpenEHR_Profile
-      module DataTypes
+      module Data_Types
         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 167)
+++ /ruby/branches/0.0/models/assumed_library_types.rb	(revision 168)
@@ -1,4 +1,4 @@
-module OpenEhr
-  module AssumedLibraryTypes
+module OpenEHR
+  module Assumed_Library_Types
     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 167)
+++ /ruby/branches/0.0/models/rm.rb	(revision 168)
@@ -10,5 +10,5 @@
 
 # OpenEHR::RM
-module OpenEhr
+module OpenEHR
   module RM
     autoload :Demographic, "rm/demographic.rb"
@@ -30,5 +30,5 @@
     end
 
-    module DataTypes
+    module Data_Types
       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 167)
+++ /ruby/branches/0.0/models/rm/common/archetyped.rb	(revision 168)
@@ -1,7 +1,7 @@
-module OpenEhr
+module OpenEHR
   module RM
     module Common
       module Archetyped
-        module LocaterConstants
+        module Locater_Constants
           CURRENT_TRANSACTION_ID = "current"
           FRAGMENT_SEPARATOR = "#"
@@ -32,5 +32,5 @@
         end
         class Locatable < Pathable
-          include LocaterConstants
+          include Locater_Constants
           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 167)
+++ /ruby/branches/0.0/models/rm/common/generic.rb	(revision 168)
@@ -1,8 +1,8 @@
-module OpenEhr
+module OpenEHR
   module RM
     module Common
       module Generic
-        class RevisionHistory
-        end # of RevisionHistory
+        class Revision_History
+        end # of Revision_History
       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 167)
+++ /ruby/branches/0.0/models/rm/common/resource.rb	(revision 168)
@@ -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 167)
+++ /ruby/branches/0.0/models/rm/composition/content/entry.rb	(revision 168)
@@ -1,3 +1,3 @@
-module OpenEhr
+module OpenEHR
   module RM
     module Content
@@ -5,7 +5,7 @@
         class Entry < Content_Item
         end
-        class CareEntry < Entry
+        class Care_Entry < Entry
         end
-        class Action < CareEntry
+        class Action < Care_Entry
           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 167)
+++ /ruby/branches/0.0/models/rm/data_types/basic.rb	(revision 168)
@@ -1,14 +1,14 @@
-module OpenEhr
+module OpenEHR
   module RM
-    module DataTypes
+    module Data_Types
       module Basic
-        module CanonicalFragment
+        module Canonical_Fragment
         end
 
-        class DataValue
-          include OpenEhr::RM::Support::Definition::BasicDefinition
+        class Data_Value
+          include OpenEHR::RM::Support::Definition::Basic_Definition
         end
 
-        class DvBoolean < DataValue
+        class DV_Boolean < Data_Value
           def initialize(value)
             check_not_nil(value)
@@ -32,7 +32,7 @@
             end
           end
-        end  # end of DvBoolean
+        end  # end of DV_Boolean
 
-        class DvState < DataValue
+        class DV_State < Data_Value
           attr_accessor :value
           attr_writer :terminal
@@ -47,7 +47,7 @@
             @terminal == true
           end
-        end # end of DvState
+        end # end of DV_State
 
-        class DvIdentifier
+        class DV_Identifier
           attr_accessor :issuer, :assigner, :id, :type
           def initialize(assigner, id, issuer, type)
@@ -60,5 +60,5 @@
             @type = type
           end
-        end #end of DvIdentifier
+        end #end of DV_Identifier
       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 167)
+++ /ruby/branches/0.0/models/rm/data_types/encapslated.rb	(revision 168)
@@ -1,7 +1,7 @@
-module OpenEhr
+module OpenEHR
   module RM
-    module DataTypes
+    module Data_Types
       module Encapsulated
-        class DvEncapsulated  < OpenEhr::RM::DataTypes::Basic::DataValue
+        class DV_Encapsulated  < OpenEHR::RM::Data_Types::Basic::Data_Value
           attr_accessor :charset, :language
           def size
@@ -13,8 +13,8 @@
           end
         end
-        class DvMultimedia < DvEncapsulated
+        class DV_Multimedia < DV_Encapsulated
           
         end
-        class DvParsable < DvEncapsulated
+        class DV_Parsable < DV_Encapsulated
           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 167)
+++ /ruby/branches/0.0/models/rm/data_types/quantity/data_time.rb	(revision 168)
@@ -1,5 +1,5 @@
-module OpenEhr
+module OpenEHR
   module RM
-    module DataTypes
+    module Data_Types
       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 167)
+++ /ruby/branches/0.0/models/rm/data_types/text.rb	(revision 168)
@@ -1,7 +1,7 @@
-module OpenEhr
+module OpenEHR
   module RM
-    module DataTypes
+    module Data_Types
       module Text
-        class TermMapping
+        class Term_Mapping
           attr_reader :match, :purpose, :target
           def initialize(match, purpose, target)
@@ -23,5 +23,5 @@
             match == '?'
           end
-          def TermMapping.is_valid_mach_code?(c)
+          def Term_Mapping.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? DvCodedText
+            if !purpose.nil? and !purpose.instance_of? DV_Coded_Text
               raise ArgumentError, "purpose is not valid"
             end
@@ -41,5 +41,5 @@
         end
 
-        class CodePhrase
+        class Code_Phrase
           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?(TerminologyId)
+            if terminology_id.instance_of?(Terminology_ID)
               @terminology_id = terminology_id
             else
-              @terminologyID = TerminologyId.new(terminology_id)
+              @terminologyID = Terminology_ID.new(terminology_id)
             end
             @code_string = code_string
           end
-        end # of CodePhrase
+        end # of Code_Phrase
 
-        class DvText < OpenEhr::RM::DataTypes::Basic::DataValue
+        class DV_Text < OpenEHR::RM::Data_Types::Basic::Data_Value
           attr_reader :value, :formatting, :hyperlink, :mappings
           attr_reader :language, :encoding
@@ -65,8 +65,8 @@
                          mappings = nil, language = nil, encoding = nil)
             value_valid(value)
-            DvText.formatting_valid(formatting)
-            DvText.encoding_valid(encoding)
-            DvText.mapping_valid(mappings)
-            DvText.language_valid(language)
+            DV_Text.formatting_valid(formatting)
+            DV_Text.encoding_valid(encoding)
+            DV_Text.mapping_valid(mappings)
+            DV_Text.language_valid(language)
             @value, @formatting, @encoding = value, formatting, encoding
             @mappings, @language = mappings, language
@@ -77,17 +77,17 @@
           end
           def formatting=(formatting)
-            DvText.formatting_valid(formatting)
+            DV_Text.formatting_valid(formatting)
             @formatting = formatting
           end
           def encoding=(encoding)
-            DvText.encoding_valid(encoding)
+            DV_Text.encoding_valid(encoding)
             @encoding = encoding
           end
           def mappings=(mappings)
-            DvText.mapping_valid(mappings)
+            DV_Text.mapping_valid(mappings)
             @mappings = mappings
           end
           def language=(language)
-            DvText.language_valid(language)
+            DV_Text.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 DataValue.
+              # CR and LF are defined in Basic_Definition inherited Data_Value.
             end
           end
@@ -125,5 +125,5 @@
         end
 
-        class DvCodedText < DvText
+        class DV_Coded_Text < DV_Text
           attr_reader :defining_code
           def initialize(value, defining_code, formatting = nil, 
@@ -144,5 +144,5 @@
         end
 
-        class DvParagraph < OpenEhr::RM::DataTypes::Basic::DataValue
+        class DV_Paragraph < OpenEHR::RM::Data_Types::Basic::Data_Value
           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 167)
+++ /ruby/branches/0.0/models/rm/data_types/time_specification.rb	(revision 168)
@@ -1,7 +1,7 @@
-module OpenEhr
+module OpenEHR
   module RM
-    module DataTypes
-      module TimeSpecification
-        class DvTimeSpecification < OpenEhr::RM::DataTypes::Basic::DataValue
+    module Data_Types
+      module Time_Specification
+        class DV_Time_Specification < OpenEHR::RM::Data_Types::Basic::Data_Value
           def initialize(value)
             @value = value
@@ -18,5 +18,5 @@
         end
         
-        class DvGeneralTimeSpecification < DvTimeSpecification
+        class DV_General_Time_Specification < DV_Time_Specification
           attr_reader :value
           def initialize(value)
@@ -34,5 +34,5 @@
         end
 
-        class DvPeriodicTimeSpecification < DvTimeSpecification
+        class DV_Periodic_Time_Specification < DV_Time_Specification
           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 167)
+++ /ruby/branches/0.0/models/rm/data_types/uri.rb	(revision 168)
@@ -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 DataTypes
-      module Uri
-        class DvUri < OpenEhr::RM::DataTypes::Basic::DataValue
+    module Data_Types
+      module URI
+        class DV_URI < OpenEHR::RM::Data_Types::Basic::Data_Value
           def initialize(value)
             raise ArgumentError, "value is empty" if value.nil?
@@ -51,5 +51,5 @@
           end
         end
-        class DvEhrUri < DvUri
+        class DV_EHR_URI < DV_URI
           def initialize(value)
             check_value(value)
Index: /ruby/branches/0.0/models/rm/demographic.rb
===================================================================
--- /ruby/branches/0.0/models/rm/demographic.rb	(revision 167)
+++ /ruby/branches/0.0/models/rm/demographic.rb	(revision 168)
@@ -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 167)
+++ /ruby/branches/0.0/models/rm/support/assumed_types.rb	(revision 168)
@@ -1,6 +1,6 @@
-module OpenEhr
+module OpenEHR
   module RM
     module Support
-      module AssumedTypes
+      module Assumed_Types
         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 167)
+++ /ruby/branches/0.0/models/rm/support/definition.rb	(revision 168)
@@ -1,12 +1,12 @@
-module OpenEhr
+module OpenEHR
   module RM
     module Support
       module Definition
-        module BasicDefinition
+        module Basic_Definition
           CR = "\015"
           LF = "\012"
         end
-        class OpenEHRDefinitions
-          include BasicDefinition
+        class OpenEHR_Definitions
+          include Basic_Definition          
         end
       end
Index: /ruby/branches/0.0/models/rm/support/identification.rb
===================================================================
--- /ruby/branches/0.0/models/rm/support/identification.rb	(revision 167)
+++ /ruby/branches/0.0/models/rm/support/identification.rb	(revision 168)
@@ -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 167)
+++ /ruby/branches/0.0/models/rm/support/terminology.rb	(revision 168)
@@ -1,8 +1,8 @@
 
-module OpenEhr
+module OpenEHR
   module RM
     module Support
       module Terminology
-        class CodeSetAccess
+        class Code_Set_Access
           def all_codes
             raise NotImplementedError, "all_codes must be implemented"
@@ -18,5 +18,5 @@
           end
         end
-        module OpenEhrCodeSetIdentifier
+        module OpenEHR_Code_Set_Identifier
           CODE_SET_ID_CHARACER_SETS = "character sets".freeze
           CODE_SET_ID_COMPRESSION_ALGORITHMS = "compression algorithms".freeze
@@ -29,5 +29,5 @@
           end
         end
-        module OpenEhrTerminologyGroupIdentifiers
+        module OpenEHR_Terminology_Group_Identifiers
           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 TerminologyAccess
+        class Terminology_Access
           def all_codes
             raise NotImplementedError, "all_codes is not implemented"
@@ -74,6 +74,6 @@
           end
         end
-        class TerminologyService
-          include OpenEhrCodeSetIdentifier, OpenEhrTerminologyGroupIdentifiers
+        class Terminology_Service
+          include OpenEHR_Code_Set_Identifier, OpenEHR_Terminology_Group_Identifiers
           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 167)
+++ /ruby/branches/0.0/models/tests/test_archetype_model.rb	(revision 168)
@@ -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::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_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_code_phase = OpenEhr::AM::OpenEHR_Profile::DataTypes::Text::C_CODE_PHASE.new
+    @c_code_phase = OpenEHR::AM::OpenEHR_Profile::Data_Types::Text::C_CODE_PHASE.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
+    @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
   end
 
   def test_init
-    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
+    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
   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 167)
+++ /ruby/branches/0.0/models/tests/test_assumed_library_types.rb	(revision 168)
@@ -4,8 +4,8 @@
 class Assumed_Library_Test < Test::Unit::TestCase
   def setup
-    @interval = OpenEhr::AssumedLibraryTypes::Interval.new(1,2)
+    @interval = OpenEHR::Assumed_Library_Types::Interval.new(1,2)
   end
   def test_initialize
-    assert_instance_of OpenEhr::AssumedLibraryTypes::Interval, @interval
+    assert_instance_of OpenEHR::Assumed_Library_Types::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 167)
+++ /ruby/branches/0.0/models/tests/test_reference_model.rb	(revision 168)
@@ -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::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"]))
+    @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"]))
   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::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
+    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
   end
 
   def test_constant
-    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)
+    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)
   end
 
@@ -45,5 +45,5 @@
     # Constraints Value_exists
     assert_raise(ArgumentError){@dv_boolean.value=nil}
-    assert_raise(ArgumentError){OpenEhr::RM::DataTypes::Basic::DvBoolean.new(nil)}
+    assert_raise(ArgumentError){OpenEHR::RM::Data_Types::Basic::DV_Boolean.new(nil)}
   end
 
@@ -55,5 +55,5 @@
     @dv_state.terminal = false
     assert !@dv_state.is_terminal?
-    assert_raise(ArgumentError) {OpenEhr::RM::DataTypes::Basic::DvState.new(nil,nil)}
+    assert_raise(ArgumentError) {OpenEHR::RM::Data_Types::Basic::DV_State.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::DataTypes::Basic::DvIdentifier.new(nil, nil, nil, nil)}
+    assert_raise(ArgumentError) {OpenEHR::RM::Data_Types::Basic::DV_Identifier.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
