Index: ruby/branches/0.5/test/unit/open_ehr/rm/data_types_test.rb
===================================================================
--- ruby/branches/0.5/test/unit/open_ehr/rm/data_types_test.rb	(revision 191)
+++ ruby/branches/0.5/test/unit/open_ehr/rm/data_types_test.rb	(revision 216)
@@ -42,5 +42,5 @@
     assert_equal 'COMPLETED', @dv_state.value.defining_code.code_string
     assert @dv_state.is_terminal?
-    assert_raise(ArgumentError) {OpenEhr::RM::DataTypes::Basic::DvState.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}
@@ -60,5 +60,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::DataTypes::Basic::DvIdentifier.new(nil, nil, nil, nil)}
   end
 end
@@ -67,11 +67,11 @@
 class RM_Data_Types_URI_Test < Test::Unit::TestCase
   def setup
-    @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_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::DataTypes::Uri::DvUri, @dv_uri
-    assert_instance_of OpenEhr::RM::DataTypes::Uri::DvEhrUri, @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
 
@@ -96,18 +96,18 @@
 class RM_Data_Types_Text_Test < Test::Unit::TestCase
   def setup
-    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){@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::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")
+    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::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
+    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
 
@@ -145,15 +145,15 @@
   def test_term_mapping
     assert_equal '=', @term_mapping.match
-    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 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::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)}
+    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
@@ -162,45 +162,45 @@
   def setup
     assert_nothing_raised(Exception){
-      @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,'=')}
+      @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::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
+     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
 
@@ -212,11 +212,11 @@
     assert @dv_ordered.is_simple?
     assert_raise(NotImplementedError){@dv_ordered<=>1}
-    openehr_terminology_id = OpenEhr::RM::Support::Identification::TerminologyId.new('openEHR')
-    normal_code = OpenEhr::RM::DataTypes::Text::CodePhrase.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::DataTypes::Quantity::DvOrdered.new
+    other = OpenEHR::RM::DataTypes::Quantity::DvOrdered.new
     assert_raise(NotImplementedError){
       @dv_ordered.is_strictly_comparable_to?(other)}
@@ -230,8 +230,8 @@
     assert_equal 'normal', @reference_range.meaning.value
     assert_equal 1, @reference_range.range.lower.value
-    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)
+    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
@@ -242,10 +242,10 @@
     assert_equal 1, @dv_quantified.magnitude
     assert_equal '=', @dv_quantified.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 !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
@@ -287,6 +287,6 @@
     assert @dv_ordinal1 > @dv_ordinal2
     assert_raise(ArgumentError){@dv_ordinal1.limits = @reference_range}
-    meaning = OpenEhr::RM::DataTypes::Text::DvText.new('limits')
-    limit_reference_range = OpenEhr::RM::DataTypes::Quantity::ReferenceRange.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
@@ -297,5 +297,5 @@
     assert_equal 'mg', @dv_quantity.units
     assert_equal '~', @dv_quantity.magnitude_status
-    dv_quantity2 = OpenEhr::RM::DataTypes::Quantity::DvQuantity.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)
@@ -316,5 +316,5 @@
   def test_dv_count
     assert_equal 1, @dv_count.magnitude
-    dv_count2 = OpenEhr::RM::DataTypes::Quantity::DvCount.new(2)
+    dv_count2 = OpenEHR::RM::DataTypes::Quantity::DvCount.new(2)
     dv_count3 = @dv_count + dv_count2
     assert 3, dv_count3.magnitude
@@ -324,13 +324,13 @@
 
   def test_proportion_kind
-    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)
+    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
 
@@ -341,18 +341,18 @@
     assert_equal 2.0/3.0, @dv_proportion.magnitude
     assert @dv_proportion.is_integral?
-    dv_proportion2 = OpenEhr::RM::DataTypes::Quantity::DvProportion.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::DataTypes::Quantity::DvProportion.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::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)}
+      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
 
@@ -361,20 +361,20 @@
 class EncapsulatedTest < Test::Unit::TestCase
   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_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)}
+    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::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
+    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
 
@@ -383,12 +383,12 @@
     assert_equal 'ja', @dv_encapsulated.language.code_string
     assert_equal 10, @dv_encapsulated.size
-    wrong_charset = OpenEhr::RM::DataTypes::Text::CodePhrase.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::DataTypes::Text::CodePhrase.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::DataTypes::Text::CodePhrase.new('jpg', 'language')
+    wrong_language = OpenEHR::RM::DataTypes::Text::CodePhrase.new('jpg', 'language')
     assert_raise(ArgumentError){@dv_encapsulated.language = wrong_language}
-    language = OpenEhr::RM::DataTypes::Text::CodePhrase.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
@@ -428,9 +428,9 @@
 class TestDvTimeSpecification < Test::Unit::TestCase
   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 = OpenEhr::RM::DataTypes::Encapsulated::DvParsable.new(charset, language, 10, 'XML','<TEST>test</TEST>')
-      @dv_time_specification = OpenEhr::RM::DataTypes::TimeSpecification::DvTimeSpecification.new(dv_parsable)}
+    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 = OpenEHR::RM::DataTypes::Encapsulated::DvParsable.new(charset, language, 10, 'XML','<TEST>test</TEST>')
+      @dv_time_specification = OpenEHR::RM::DataTypes::TimeSpecification::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')}
@@ -438,5 +438,5 @@
 
   def test_init
-    assert_instance_of OpenEhr::RM::DataTypes::TimeSpecification::DvTimeSpecification, @dv_time_specification
+    assert_instance_of OpenEHR::RM::DataTypes::TimeSpecification::DvTimeSpecification, @dv_time_specification
   end
 
