Index: /ruby/trunk/lib/open_ehr/serializer.rb
===================================================================
--- /ruby/trunk/lib/open_ehr/serializer.rb	(revision 405)
+++ /ruby/trunk/lib/open_ehr/serializer.rb	(revision 406)
@@ -1,3 +1,4 @@
 require 'rexml/document'
+require 'builder'
 
 module OpenEHR
@@ -14,9 +15,16 @@
 
     class ADLSerializer < BaseSerializer
-      def description
+      def header
         return <<HERE
 archetype (adl_version = #{@archetype.adl_version})
-     #{@archetype.archetype_id.value}
+\t#{@archetype.archetype_id.value}
+
+concept
+\t[#{@archetype.concept}]
 HERE
+      end
+
+      def description
+
       end
 
@@ -31,13 +39,26 @@
 
       def merge
-        return description + definition + ontology
+        return header + description + definition + ontology
       end
     end
 
     class XMLSerializer < BaseSerializer
+
+      def header
+        header = ''
+        xml = Builder::XmlMarkup.new(:indent => 2, :target => header)
+        xml.archetype_id do 
+          xml.value @archetype.archetype_id.value
+        end
+        xml.concept @archetype.concept
+        return header
+      end
+
       def description
-        desc = REXML::Element.new('archetype_id').
-          add_text(@archetype.archetype_id.value)
-        return desc
+        
+      end
+
+      def merge
+
       end
     end
@@ -56,3 +77,8 @@
 
 class Writer
+  def initialize(target)
+    @target = target
+  end
+  def out
+  end
 end
Index: /ruby/trunk/spec/lib/open_ehr/serializer/adl_serializer_spec.rb
===================================================================
--- /ruby/trunk/spec/lib/open_ehr/serializer/adl_serializer_spec.rb	(revision 406)
+++ /ruby/trunk/spec/lib/open_ehr/serializer/adl_serializer_spec.rb	(revision 406)
@@ -0,0 +1,27 @@
+require File.dirname(__FILE__) + '/../../../spec_helper'
+require File.dirname(__FILE__) + '/sample_archetype_spec'
+include OpenEHR::Serializer
+include OpenEHR::AM::Archetype
+include OpenEHR::RM::Support::Identification
+
+describe ADLSerializer do
+  it_should_behave_like 'sample archetype'
+
+  before(:each) do
+    @adl_serializer = ADLSerializer.new(@archetype)
+  end
+
+  it 'should be an instance of ADLSerializer' do
+    @adl_serializer.should be_an_instance_of ADLSerializer
+  end
+
+  it 'header should return archetype context' do
+    @adl_serializer.header.should == <<HERE
+archetype (adl_version = 1.4)
+\tadl-test-ENTRY.most_minimal.v1
+
+concept
+\t[at0000]
+HERE
+  end
+end
Index: /ruby/trunk/spec/lib/open_ehr/serializer/sample_archetype_spec.rb
===================================================================
--- /ruby/trunk/spec/lib/open_ehr/serializer/sample_archetype_spec.rb	(revision 406)
+++ /ruby/trunk/spec/lib/open_ehr/serializer/sample_archetype_spec.rb	(revision 406)
@@ -0,0 +1,17 @@
+require File.dirname(__FILE__) + '/../../../spec_helper'
+include OpenEHR::AM::Archetype
+include OpenEHR::RM::Support::Identification
+include OpenEHR::RM::DataTypes::Text
+
+shared_examples_for 'sample archetype' do
+  before(:all) do
+    archetype_id = ArchetypeID.new(:value => 
+                                   'adl-test-ENTRY.most_minimal.v1')
+    terminology_id = TerminologyID.new(:value => 'ISO_639-1')
+    original_language = CodePhrase.new(:code_string => 'en',
+                                       :terminology_id => terminology_id)
+    @archetype = stub(Archetype, :adl_version => '1.4',
+                      :archetype_id => archetype_id,
+                      :concept => 'at0000')
+  end
+end
Index: /ruby/trunk/spec/lib/open_ehr/serializer/xml_serializer_spec.rb
===================================================================
--- /ruby/trunk/spec/lib/open_ehr/serializer/xml_serializer_spec.rb	(revision 406)
+++ /ruby/trunk/spec/lib/open_ehr/serializer/xml_serializer_spec.rb	(revision 406)
@@ -0,0 +1,25 @@
+require File.dirname(__FILE__) + '/../../../spec_helper'
+require File.dirname(__FILE__) + '/sample_archetype_spec'
+require 'rexml/document'
+include OpenEHR::Serializer
+
+describe XMLSerializer do
+  it_should_behave_like 'sample archetype'
+
+  before(:each) do
+    @xml_serializer = XMLSerializer.new(@archetype)
+  end
+
+  it 'should be an instance of XMLSerializer' do
+    @xml_serializer.should be_an_instance_of XMLSerializer
+  end
+
+  it 'should return XML formatted header' do
+    @xml_serializer.header.should == <<END
+<archetype_id>
+  <value>adl-test-ENTRY.most_minimal.v1</value>
+</archetype_id>
+<concept>at0000</concept>
+END
+  end
+end
Index: /ruby/trunk/spec/models/archetype_datum_spec.rb
===================================================================
--- /ruby/trunk/spec/models/archetype_datum_spec.rb	(revision 405)
+++ /ruby/trunk/spec/models/archetype_datum_spec.rb	(revision 406)
@@ -10,5 +10,5 @@
       :text_data => "value for text_data",
       :integer_data => 1,
-      :real_data => 
+      :real_data => 0.23
     }
   end
