Index: /ruby/trunk/lib/models/rm.rb
===================================================================
--- /ruby/trunk/lib/models/rm.rb	(revision 139)
+++ /ruby/trunk/lib/models/rm.rb	(revision 140)
@@ -42,4 +42,8 @@
       autoload :Data_Structure, "rm/data_structure.rb"
     end
+
+    module Security
+      autoload :Security, 'rm/security.rb'
+    end
   end
 
Index: /ruby/trunk/lib/models/rm/data_types/quantity.rb
===================================================================
--- /ruby/trunk/lib/models/rm/data_types/quantity.rb	(revision 139)
+++ /ruby/trunk/lib/models/rm/data_types/quantity.rb	(revision 140)
@@ -42,5 +42,4 @@
               raise ArgumentError, "Other reference ranges validity error"
             end
-            
             @other_reference_ranges = other_reference_ranges
           end
@@ -56,6 +55,4 @@
                          other_reference_ranges=nil)
             super(normal_range, normal_status, other_reference_ranges)
-            
-            
           end
 
@@ -65,21 +62,28 @@
 
           def <=>(others)
-            @symbol.
+            @value <=> others.value
           end
 
           def valid_magnitude_status(s)
+
           end
         end
 
         class DV_Ordinal < DV_Ordered
-          attr_reader :symbol, :value
+          attr_reader :value, :symbol
+          def initialize(value, symbol, normal_range=nil, normal_status = nil,
+                         other_reference_ranges=nil)
+          end
 
           def is_strictly_comparable_to?
+
           end
 
           def <=>(other)
-              @symbol.
+              @value <=> other.value
           end
+
           def limits
+
           end
         end
@@ -103,10 +107,16 @@
         class DV_Amount < DV_Quantified
           attr_reader :accuracy, :accuracy_is_percent
+
           def infix(dv_amount, op)
             raise NotImplementError, 'infix must be implemented'
           end
+          
           def accuracy=(accuracy)
             raise ArgumentError, 'accuracy invalid'
           end
+        end
+
+        class DV_Quantity < DV_Amount
+
         end
 
@@ -126,5 +136,5 @@
             return false
           end
-        end
+        end # end of Proportion_Kind
       end # of Quantity
     end # of Data_Types
Index: /ruby/trunk/lib/models/rm/data_types/quantity/date_time.rb
===================================================================
--- /ruby/trunk/lib/models/rm/data_types/quantity/date_time.rb	(revision 139)
+++ /ruby/trunk/lib/models/rm/data_types/quantity/date_time.rb	(revision 140)
@@ -43,4 +43,9 @@
             end
           end
+
+          class DV_Interval
+            def initialize
+            end
+          end
         end # of Date_Time
       end # of Quantity
Index: /ruby/trunk/lib/models/tests/rm/test_data_types.rb
===================================================================
--- /ruby/trunk/lib/models/tests/rm/test_data_types.rb	(revision 139)
+++ /ruby/trunk/lib/models/tests/rm/test_data_types.rb	(revision 140)
@@ -165,9 +165,9 @@
       @dv_ordered = OpenEHR::RM::Data_Types::Quantity::DV_Ordered.new }
     assert_nothing_raised(Exception){
-      @dv_interval = OpenEHR::RM::Data_Types::Quantity::DV_Interval.new}
+      @dv_interval = OpenEHR::RM::Data_Types::Quantity::Date_Time::DV_Interval.new}
     assert_nothing_raised(Exception){
       @reference_range = OpenEHR::RM::Data_Types::Quantity::Reference_Range.new}
     assert_nothing_raised(Exception){
-      @dv_ordinal = OpenEHR::RM::Data_Types::Quantity::DV_Ordinal.new}
+      @dv_ordinal = OpenEHR::RM::Data_Types::Quantity::DV_Ordinal.new(1,'+')}
     assert_nothing_raised(Exception){
       @dv_quantified = OpenEHR::RM::Data_Types::Quantity::DV_Quantified.new }
@@ -181,10 +181,10 @@
      assert_instance_of OpenEHR::RM::Data_Types::Quantity::DV_Ordered, @dv_ordered
      assert_instance_of OpenEHR::RM::Data_Types::Quantity::DV_Quantified, @dv_quantified
-     assert_instance_of OpenEHR::RM::Data_Types::Quantity::DV_Interval, @dv_interval
+     assert_instance_of OpenEHR::RM::Data_Types::Quantity::Date_Time::DV_Interval, @dv_interval
      assert_instance_of OpenEHR::RM::Data_Types::Quantity::Reference_Range, @reference_range
      assert_instance_of OpenEHR::RM::Data_Types::Quantity::DV_Ordinal, @dv_ordinal
      assert_instance_of OpenEHR::RM::Data_Types::Quantity::DV_Quantified, @dv_quantified
      assert_instance_of OpenEHR::RM::Data_Types::Quantity::DV_Amount, @dv_amount
-     assert_instance_of OpenEHR::RM::Data_Types::Quantity:DV_Quantity, @dv_quantity
+     assert_instance_of OpenEHR::RM::Data_Types::Quantity::DV_Quantity, @dv_quantity
   end
 
@@ -194,5 +194,5 @@
     assert_nil @dv_ordered.normal_range
     assert_nil @dv_ordered.other_refference_ranges
-    assert @dv_orderd.is_simple?
+    assert @dv_ordered.is_simple?
     assert_raise(NotImplementedError){@dv_ordered<=>1}
     openehr_terminology_id = OpenEHR::RM::Support::Identification::Terminology_ID.new('openEHR','')
@@ -202,6 +202,7 @@
       @dv_ordered.normal_status = normal_code }
     assert @dv_ordered.is_normal?
+    other = OpenEHR::RM::Data_Types::Quantity::DV_Ordered.new
     assert_raise(NotImplementedError){
-      @dv_ordered.is_strictry_comparable_to? }
+      @dv_ordered.is_strictry_comparable_to?(other)}
   end
 
@@ -212,5 +213,5 @@
   def test_proportion_kind
     assert_equal 0, OpenEHR::RM::Data_Types::Quantity::Proportion_Kind::PK_RATIO
-    assert_equal 1, OpenEHR::RM::Data_Types::Quantity::Proportion_Kind::PK_UNITARITY
+    assert_equal 1, OpenEHR::RM::Data_Types::Quantity::Proportion_Kind::PK_UNITARY
     assert_equal 2, OpenEHR::RM::Data_Types::Quantity::Proportion_Kind::PK_PERCENT
     assert_equal 3, OpenEHR::RM::Data_Types::Quantity::Proportion_Kind::PK_FRACTION
@@ -218,6 +219,6 @@
     assert OpenEHR::RM::Data_Types::Quantity::Proportion_Kind.valid_proportion_kind?(0)
     assert OpenEHR::RM::Data_Types::Quantity::Proportion_Kind.valid_proportion_kind?(4)
-    assert OpenEHR::RM::Data_Types::Quantity::Proportion_Kind.valid_proportion_kind?(-1)
-    assert OpenEHR::RM::Data_Types::Quantity::Proportion_Kind.valid_proportion_kind?(5)
+    assert !OpenEHR::RM::Data_Types::Quantity::Proportion_Kind.valid_proportion_kind?(-1)
+    assert !OpenEHR::RM::Data_Types::Quantity::Proportion_Kind.valid_proportion_kind?(5)
   end
 end
@@ -231,4 +232,5 @@
     assert_instance_of OpenEHR::RM::Data_Types::Quantity::Date_Time::DV_Temporal, @dv_temporal
   end
+
   def test_dv_temporal
     assert_equal '2008', @dv_temporal.value
Index: /ruby/trunk/lib/models/tests/rm/test_security.rb
===================================================================
--- /ruby/trunk/lib/models/tests/rm/test_security.rb	(revision 139)
+++ /ruby/trunk/lib/models/tests/rm/test_security.rb	(revision 140)
@@ -5,9 +5,9 @@
   def setup
     assert_nothing_raised(Exception){
-      @access_control_setting = OpenEHR::RM::Security::Access_Control_Setting.new}
+      @access_control_setting = OpenEHR::RM::Security::Access_Control_Settings.new}
   end
 
   def test_init
-    assert_instance_of OpenEHR::RM::Security::Access_Control_Setting, @access_control_setting
+    assert_instance_of OpenEHR::RM::Security::Access_Control_Settings, @access_control_setting
   end
 end
