Index: ruby/branches/0.5/lib/open_ehr/rm/data_types/quantity/date_time.rb
===================================================================
--- ruby/branches/0.5/lib/open_ehr/rm/data_types/quantity/date_time.rb	(revision 308)
+++ ruby/branches/0.5/lib/open_ehr/rm/data_types/quantity/date_time.rb	(revision 309)
@@ -5,4 +5,5 @@
 require 'date'
 include OpenEHR::RM::DataTypes::Quantity
+include OpenEHR::AssumedLibraryTypes
 
 module OpenEHR
@@ -13,4 +14,12 @@
           class DvTemporal < DvAbsoluteQuantity
             include Comparable
+            def initialize(args = {})
+              self.value = args[:value]
+              self.magnitude_status = args[:magnitude_status]
+              self.accuracy = args[:accuracy]
+              self.normal_range = args[:normal_range]
+              self.normal_status = args[:normal_status]
+              self.other_reference_ranges = args[:other_reference_ranges]
+            end
 
             def value=(value)
@@ -23,18 +32,11 @@
 
           class DvDate < DvTemporal
-            include OpenEHR::AssumedLibraryTypes::ISO8601DateModule
+            include ISO8601DateModule
 
             DAYS_IN_MONTH = [0,31,28,31,30,31,30,31,31,30,31,30,31]
 
-            def initialize(value, magnitude_status=nil, accuracy=nil,
-                           normal_range=nil, normal_status=nil,
-                           other_reference_range=nil)
-              super(value, magnitude_status, accuracy, normal_range,
-                    normal_status, other_reference_range)
-            end
-
             def value=(value)
               super(value)
-              iso8601_date = AssumedLibraryTypes::ISO8601_DATE.new(value)
+              iso8601_date = ISO8601Date.new(value)
               @year = iso8601_date.year
               @month = iso8601_date.month
Index: ruby/branches/0.5/spec/lib/open_ehr/rm/common/archetyped/feeder_audit_spec.rb
===================================================================
--- ruby/branches/0.5/spec/lib/open_ehr/rm/common/archetyped/feeder_audit_spec.rb	(revision 309)
+++ ruby/branches/0.5/spec/lib/open_ehr/rm/common/archetyped/feeder_audit_spec.rb	(revision 309)
@@ -0,0 +1,51 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Common::Archetyped
+include OpenEHR::RM::DataTypes::Encapsulated
+include OpenEHR::RM::DataTypes::Basic
+
+describe FeederAudit do
+  before(:each) do
+    originating_system_audit = stub(FeederAuditDetails, :system_id => 'CASPAR')
+    originating_system_item_ids = stub(Array, :size => 10)
+    feeder_system_audit = stub(FeederAuditDetails, :system_id => 'BARTHASAR')
+    feeder_system_item_ids = stub(Array, :size => 5)
+    original_content = stub(DvEncapsulated, :charset => 'UTF-8')
+    @feeder_audit = FeederAudit.new(
+       :originating_system_audit => originating_system_audit,
+       :originating_system_item_ids => originating_system_item_ids,
+       :feeder_system_audit => feeder_system_audit,
+       :feeder_system_item_ids => feeder_system_item_ids,
+       :original_content => original_content)
+  end
+
+  it 'should be an instance of FeederAudit' do
+    @feeder_audit.should be_an_instance_of FeederAudit
+  end
+
+  it 'originating_system_audit.system_id should be CASPAR' do
+    @feeder_audit.originating_system_audit.system_id.should == 'CASPAR'
+  end
+
+  it 'originating_system_item_ids.size should be equal 10' do
+    @feeder_audit.originating_system_item_ids.size.should be_equal 10
+  end
+
+  it 'feeder_system_audit.system_id should BARTHASAR' do
+    @feeder_audit.feeder_system_audit.system_id.should == 'BARTHASAR'
+  end
+
+  it 'feeder_system_item_ids.size should be equal 5' do
+    @feeder_audit.feeder_system_item_ids.size.should be_equal 5
+  end
+
+  it 'original_content.charset should be UTF-8' do
+    @feeder_audit.original_content.charset.should == 'UTF-8'
+  end
+
+  it 'should raise ArgumentError with nil originating_system_audit' do
+    lambda {
+      @feeder_audit.originating_system_audit = nil
+    }.should raise_error ArgumentError
+  end
+end
+
