Index: /ruby/trunk/lib/models/rm/common/archetyped.rb
===================================================================
--- /ruby/trunk/lib/models/rm/common/archetyped.rb	(revision 152)
+++ /ruby/trunk/lib/models/rm/common/archetyped.rb	(revision 153)
@@ -138,5 +138,14 @@
 
         class Feeder_Audit_Details
+          attr_reader :system_id
 
+          def initialize(args ={ })
+            self.system_id = args[:system_id]
+          end
+
+          def system_id=(system_id)
+            raise ArgumentError, 'system_id invalid' if system_id.nil? or system_id.empty?
+            @system_id = system_id
+          end
         end # of Feeder_Audit_Details
       end # of Archetyped
Index: /ruby/trunk/lib/models/rm/common/generic.rb
===================================================================
--- /ruby/trunk/lib/models/rm/common/generic.rb	(revision 152)
+++ /ruby/trunk/lib/models/rm/common/generic.rb	(revision 153)
@@ -2,4 +2,6 @@
 # http://www.openehr.org/uml/release-1.0.1/Browsable/_9_5_1_76d0249_1140169202660_257304_813Report.html
 # Related to the ticket #62
+include OpenEHR::RM::Support::Identification
+include OpenEHR::RM::Data_Types::Basic
 module OpenEHR
   module RM
@@ -17,6 +19,8 @@
 
         class Party_Proxy
-          def external_ref
-            Raise NotImplementedError, 'external_ref shoud provide Party_Ref'
+          attr_accessor :external_ref
+
+          def initialize(args = { })
+            self.external_ref = args[:external_ref]
           end
         end
@@ -27,5 +31,32 @@
 
         class Party_Identified < Party_Proxy
+          attr_reader :name, :identifier
+          def initialize(args = { })
+            if args[:external_ref].nil? && args[:name].nil? &&
+                args[:identifier].nil?
+              raise ArgumentError, 'cannot identified'
+            end
+            super(:external_ref => args[:external_ref])
+            self.name = args[:name]
+            self.identifier = args[:identifier]
+          end
 
+          def name=(name)
+            if name.nil? && @external_ref.nil? && @identifier.nil?
+              raise ArgumentError, 'cannot identified'
+            end
+            raise ArgumentError, 'invaild name' unless name.nil? || !name.empty?
+            @name = name
+          end
+
+          def identifier=(identifier)
+            if @name.nil? && @external_ref.nil? && identifier.nil?
+              raise ArgumentError, 'cannot identified'
+            end
+            unless identifier.nil? || !identifier.empty?
+              raise ArgumentError, 'invaild identifier'
+            end
+            @identifier = identifier
+          end
         end
 
Index: /ruby/trunk/lib/models/rm/data_types/time_specification.rb
===================================================================
--- /ruby/trunk/lib/models/rm/data_types/time_specification.rb	(revision 152)
+++ /ruby/trunk/lib/models/rm/data_types/time_specification.rb	(revision 153)
@@ -30,4 +30,7 @@
         end
 
+# I have not implemented two classes bellow,
+# because I could not obtain HL7 specification related them.
+
 
         class DV_General_Time_Specification < DV_Time_Specification
@@ -55,22 +58,14 @@
               raise ArgumentError, "value is not valid"
             end
-            /^\[(\d+)\;?(\d+)?\]\/\((\d+\w+)\)(@(\w+?))?(IST)?$/ =~ value
-            interval1, interval2, difference, allignment = $1, $2, $3, $5
-# not implemented because of unknown HL7 specification
-
-          end
-
-          def calender_alignment
-
-          end
-
-          def event_alignment
-
+            if value.formalism('HL7:PIVL')
+              /^\[(\d+)\;?(\d+)?\]\/\((\d+\w+)\)(@(\w+?))?(IST)?$/ =~ value
+              interval1, interval2, difference, allignment = $1, $2, $3, $5
+            end
+            if value
+            end
           end
 
           def institution_specified?
 
-          end
-          def period
           end
         end
Index: /ruby/trunk/lib/models/tests/rm/test_common.rb
===================================================================
--- /ruby/trunk/lib/models/tests/rm/test_common.rb	(revision 152)
+++ /ruby/trunk/lib/models/tests/rm/test_common.rb	(revision 153)
@@ -2,4 +2,8 @@
 require 'set'
 require 'rm'
+
+include OpenEHR::RM::Data_Types::Text
+include OpenEHR::RM::Common::Resource
+include OpenEHR::RM::Common::Archetyped
 
 class RM_Common_Resource_Test < Test::Unit::TestCase
@@ -15,4 +19,7 @@
   end
 
+  def test_authoured_resource
+    assert_equal 'ja', @authored_resource.original_language
+  end
 end
 
@@ -31,4 +38,6 @@
     assert_nothing_raised(Exception){
       @locatable = OpenEHR::RM::Common::Archetyped::Locatable.new('at0001',name,links)}
+    assert_nothing_raised(Exception){
+      @feeder_audit_details = Feeder_Audit_Details.new(:system_id => 'MAGI')}
   end
 
@@ -38,4 +47,5 @@
     assert_instance_of OpenEHR::RM::Common::Archetyped::Pathable, @pathable
     assert_instance_of OpenEHR::RM::Common::Archetyped::Locatable, @locatable
+    assert_instance_of Feeder_Audit_Details, @feeder_audit_details
   end
 
@@ -73,14 +83,64 @@
     assert_raise(ArgumentError){@link.type = nil}
   end
+
+  def test_feeder_audit
+  end
+
+  def test_feeder_audit_detail
+    assert_equal 'MAGI', @feeder_audit_details.system_id
+  end
 end
 
 class RM_Common_Generic_Test < Test::Unit::TestCase
+  include OpenEHR::RM::Common::Generic
+  include OpenEHR::RM::Support::Identification
+  include OpenEHR::RM::Data_Types::Basic
   def setup
-#    assert_nothing_raised(Exception){@party_proxy = OpenEHR::RM::Common::Generic::Party_Proxy.new}
+    assert_nothing_raised(Exception){party_proxy = Party_Proxy.new}
+    object_id = Object_ID.new('0.0.4')
+    party_ref = Party_Ref.new('unknown', 'ORGANISATION', object_id)
+    assert_nothing_raised(Exception){
+      @party_proxy = Party_Proxy.new(:external_ref => party_ref)}
+    assert_nothing_raised(Exception){party_self = Party_Self.new}
+    assert_nothing_raised(Exception){
+      @party_self = Party_Self.new(:external_ref => party_ref)}
+    assert_raise(ArgumentError){
+      party_identified = Party_Identified.new}
+    identifiers = []
+    identifiers << DV_Identifier.new('NERV', 'MELCHIOR', 'GENDO', 'COMPUTER')
+    identifiers << DV_Identifier.new('NERV', 'CASPER', 'GENDO', 'COMPUTER')
+    identifiers << DV_Identifier.new('NERV', 'BALTHAZAR', 'GENDO', 'COMPUTER')
+    assert_nothing_raised(Exception){
+      @party_identified = Party_Identified.new(:name => 'NERV',
+                                               :external_ref => party_ref,
+                                               :identifier => identifiers)}
 #    change_type = OpenEHR::RM::Data_Types::Text::DV_Text.new('audit_type')
 #    time_committed = OpenEHR::RM::Data_Types::Quantity::Date_Time::DV_Date_Time.new(2008)
 #    assert_nothing_raised(Exception){@audit_details = OpenEHR::RM::Common::Generic::Audit_Details.new('rails',@party_proxy, change_type, time_committed)}
   end
+
   def test_init
+    assert_instance_of Party_Proxy, @party_proxy
+    assert_instance_of Party_Self, @party_self
+    assert_instance_of Party_Identified, @party_identified
+  end
+
+  def test_party_proxy
+    assert_equal 'unknown', @party_proxy.external_ref.namespace
+  end
+
+  def test_party_self
+    assert_equal 'ORGANISATION', @party_self.external_ref.type
+  end
+
+  def test_party_identified
+    assert_equal 'NERV', @party_identified.name
+    assert_equal '0.0.4', @party_identified.external_ref.id.value
+    identifiers = @party_identified.identifier
+    ids = [ ]
+    identifiers.each do |id|
+      ids << id.id
+    end
+    assert_equal %w[MELCHIOR CASPER BALTHAZAR], ids
   end
 end
Index: /ruby/trunk/lib/models/tests/rm/test_data_types.rb
===================================================================
--- /ruby/trunk/lib/models/tests/rm/test_data_types.rb	(revision 152)
+++ /ruby/trunk/lib/models/tests/rm/test_data_types.rb	(revision 153)
@@ -437,8 +437,6 @@
       dv_parsable = DV_Parsable.new(charset, language, 10, 'XML','<TEST>test</TEST>')
       @dv_time_specification = DV_Time_Specification.new(dv_parsable)}
-    
-    assert_nothing_raised(Exception){
-      @dv_periodic_time_specification = Dv_Periodic_Time_Specification.new(
-           charset, language, 10, 'PIVL
+#    assert_nothing_raised(Exception){
+#      @dv_periodic_time_specification = DV_Periodic_Time_Specification.new('[200004181100;200004181110]/(7d)@DWIST', charset, language, 10, 'HL7:PIVL')}
   end
 
