Index: /ruby/tags/release-0.5.0/CHANGELOG
===================================================================
--- /ruby/tags/release-0.5.0/CHANGELOG	(revision 367)
+++ /ruby/tags/release-0.5.0/CHANGELOG	(revision 367)
@@ -0,0 +1,7 @@
+2009/08/28 Moving from Test::Unit to Rspec
+2009/08/04 branch 0.5 adjust on rails
+2009/07/22 Almost half of the specifications of the openEHR
+           are implemented
+2008/05/15 Arranged hierachy of directory. Some test suits are broken.
+2008/05/10 Fixed some bugs and resoleved dependency on YaParc
+2008/05/08 First memorable release 0.0.1
Index: /ruby/tags/release-0.5.0/COPYING
===================================================================
--- /ruby/tags/release-0.5.0/COPYING	(revision 367)
+++ /ruby/tags/release-0.5.0/COPYING	(revision 367)
@@ -0,0 +1,10 @@
+openEHR Open Source Software License
+
+The openEHR Foundation uses the Mozilla Tri-license 1.1 on all software
+copyrighted to the Foundation. This licence essentially provides the user
+a choice of licence conditions under which to operate with any given piece
+of software, being: the Mozilla Public licence (MPL), and the Free Software
+Foundation GNU General Public Licence (GPL) and Lesser GNU Public Licence
+(LGPL). See the Mozilla relicensing FAQ for details of this license.
+This in no way constrains the way in which software created by other
+organisations is licenced. 
Index: /ruby/tags/release-0.5.0/README
===================================================================
--- /ruby/tags/release-0.5.0/README	(revision 367)
+++ /ruby/tags/release-0.5.0/README	(revision 367)
@@ -0,0 +1,72 @@
+= Synopsis
+
+Ruby openEHR implementation project.
+
+= Version
+
+Release-0.5.0
+
+= Requirements
+
+* Ruby 1.8.6 or higher
+* RubyGems
+* Yaparc Library 0.2.2 or higer
+  To install the library,
+  execute the following command.
+  # gem install yaparc
+* Tested with Ruby 1.8.6 on Linux and FreeBSD.
+* If you use Ruby 1.6, you should prepare racc 
+  runtime environment and some adjustment
+* It should work on other platforms with Ruby
+  support as well.
+
+= Status
+
+This is the version 0.5.0 release of Ruby openEHR
+implementation project. This release is still experimental
+preview of our work based on openEHR specification 
+release 1.0.2. We implemented ADL Parser and almost
+half of the specifications of the openEHR. This parser 
+successfully parses 27 ADLs and generates archetype 
+instances.  The work is still in progress. The 
+intention is to have complete implementation of openEHR
+Reference Model and some of the Archetype Object Models,
+with support for archetype based object creation and
+validation.
+
+Almost all classes passed the test constructed by rspec or
+test/unit. This test cases are under /spec or /tests
+
+Some specifications are not well determined yet, such as
+rm/security and so on. We postponed to implement such
+classes.
+
+Terminology and Demographic server will be implemented in
+next version, Miyajima release
+
+= Authors
+Akimichi Tatsukawa, Shinji Kobayashi
+openEHR.jp, <http://openehr.jp>
+
+= Copyright
+The software, including all files in this directory 
+and subdirectories is copyrighted to the original 
+authors and contributors, 2008
+All Rights Reserved.
+
+= License
+
+This product is under openEHR Open Source Software License
+
+The openEHR Foundation uses the Mozilla Tri-license 1.1 on
+all software copyrighted to the Foundation. This licence
+essentially provides the user a choice of licence conditions
+under which to operate with any given piece of software,
+being: the Mozilla Public licence (MPL), and the Free
+Software Foundation GNU General Public Licence (GPL) and
+Lesser GNU General Public Licence (LGPL). See the Mozilla
+relicensing FAQ for details of this license. This in no way
+constrains the way in which software created by other
+organisations is licenced.
+
+
Index: /ruby/tags/release-0.5.0/Rakefile
===================================================================
--- /ruby/tags/release-0.5.0/Rakefile	(revision 367)
+++ /ruby/tags/release-0.5.0/Rakefile	(revision 367)
@@ -0,0 +1,13 @@
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require(File.join(File.dirname(__FILE__), 'config', 'boot'))
+
+require 'rake'
+require 'rake/testtask'
+require 'rake/rdoctask'
+
+require 'tasks/rails'
+task :default => [:test, :spec]
+
+
Index: /ruby/tags/release-0.5.0/app/controllers/application.rb
===================================================================
--- /ruby/tags/release-0.5.0/app/controllers/application.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/app/controllers/application.rb	(revision 367)
@@ -0,0 +1,15 @@
+# Filters added to this controller apply to all controllers in the application.
+# Likewise, all the methods added will be available for all controllers.
+
+class ApplicationController < ActionController::Base
+  helper :all # include all helpers, all the time
+
+  # See ActionController::RequestForgeryProtection for details
+  # Uncomment the :secret if you're not using the cookie session store
+  protect_from_forgery # :secret => 'dae0f1d0aa66bc5a354be9b4211bf67a'
+  
+  # See ActionController::Base for details 
+  # Uncomment this to filter the contents of submitted sensitive data parameters
+  # from your application log (in this case, all fields with names like "password"). 
+  # filter_parameter_logging :password
+end
Index: /ruby/tags/release-0.5.0/app/controllers/application_controller.rb
===================================================================
--- /ruby/tags/release-0.5.0/app/controllers/application_controller.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/app/controllers/application_controller.rb	(revision 367)
@@ -0,0 +1,15 @@
+# Filters added to this controller apply to all controllers in the application.
+# Likewise, all the methods added will be available for all controllers.
+
+class ApplicationController < ActionController::Base
+  helper :all # include all helpers, all the time
+
+  # See ActionController::RequestForgeryProtection for details
+  # Uncomment the :secret if you're not using the cookie session store
+  protect_from_forgery # :secret => 'dae0f1d0aa66bc5a354be9b4211bf67a'
+  
+  # See ActionController::Base for details 
+  # Uncomment this to filter the contents of submitted sensitive data parameters
+  # from your application log (in this case, all fields with names like "password"). 
+  # filter_parameter_logging :password
+end
Index: /ruby/tags/release-0.5.0/app/controllers/terminology_controller.rb
===================================================================
--- /ruby/tags/release-0.5.0/app/controllers/terminology_controller.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/app/controllers/terminology_controller.rb	(revision 367)
@@ -0,0 +1,14 @@
+class TerminologyController < ApplicationController
+  def show
+    @terminology = Terminology.find(:first,:conditions => {
+                                           :name => params[:name],
+                                           :lang => params[:lang],
+                                           :code => params[:code]})
+    if @terminology.nil?
+      render :text => '404 not found.', :status => 404
+    else
+      render :xml => @terminology.to_xml(
+                           :skip_types => true, :only => [:rubric])
+    end
+  end
+end
Index: /ruby/tags/release-0.5.0/app/helpers/application_helper.rb
===================================================================
--- /ruby/tags/release-0.5.0/app/helpers/application_helper.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/app/helpers/application_helper.rb	(revision 367)
@@ -0,0 +1,3 @@
+# Methods added to this helper will be available to all templates in the application.
+module ApplicationHelper
+end
Index: /ruby/tags/release-0.5.0/app/helpers/terminology_helper.rb
===================================================================
--- /ruby/tags/release-0.5.0/app/helpers/terminology_helper.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/app/helpers/terminology_helper.rb	(revision 367)
@@ -0,0 +1,2 @@
+module TerminologyHelper
+end
Index: /ruby/tags/release-0.5.0/app/models/encoding.rb
===================================================================
--- /ruby/tags/release-0.5.0/app/models/encoding.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/app/models/encoding.rb	(revision 367)
@@ -0,0 +1,12 @@
+class Encoding < ActiveRecord::Base
+  has_many :encoding_aliases
+
+  def valid_encoding?(enc)
+    if Encoding.find_by_name(enc) ||
+        Encoding.find_by_alias(enc)
+      return true
+    else
+      return false
+    end
+  end
+end
Index: /ruby/tags/release-0.5.0/app/models/encoding_alias.rb
===================================================================
--- /ruby/tags/release-0.5.0/app/models/encoding_alias.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/app/models/encoding_alias.rb	(revision 367)
@@ -0,0 +1,3 @@
+class EncodingAlias < ActiveRecord::Base
+  belongs_to :encoding, :foreign_key => 'mibenum'
+end
Index: /ruby/tags/release-0.5.0/app/models/terminology.rb
===================================================================
--- /ruby/tags/release-0.5.0/app/models/terminology.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/app/models/terminology.rb	(revision 367)
@@ -0,0 +1,2 @@
+class Terminology < ActiveRecord::Base
+end
Index: /ruby/tags/release-0.5.0/app/views/terminology/show.html.erb
===================================================================
--- /ruby/tags/release-0.5.0/app/views/terminology/show.html.erb	(revision 367)
+++ /ruby/tags/release-0.5.0/app/views/terminology/show.html.erb	(revision 367)
@@ -0,0 +1,5 @@
+<%= link_to "Terminology",
+    :controller => "terminology",
+    :action => "show",
+    :name => "name",
+    :id => "openehr_id" %>
Index: /ruby/tags/release-0.5.0/bin/adl_validator.rb
===================================================================
--- /ruby/tags/release-0.5.0/bin/adl_validator.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/bin/adl_validator.rb	(revision 367)
@@ -0,0 +1,84 @@
+#!/usr/bin/env ruby
+require 'rubygems'
+require "adl_parser"
+require 'readline'
+require 'optparse'
+require 'net/http'
+
+module OpenEhr
+  module CommandLine
+    class Arguments < Hash
+      def initialize(args)
+        super() # default values
+        opts = ::OptionParser.new do |opts|
+          opts.banner = "Usage: #$0 [file|http://location.to.adl]* [options]"
+          opts.on('-v', '--verbose', 'display verbose message(Not Implemented Yet)') do
+            self[:verbose] = true
+          end
+          opts.on_tail('-h', '--help', 'display this help') do
+            puts opts
+            exit
+          end
+        end
+        opts.parse!(args)
+      end
+    end
+
+    class ADLValidator
+      def initialize(arguments)
+        @debug = false
+        @adl_validator = ::OpenEHR::Application::ADLValidator.new(::OpenEHR::ADL::Validator.new(::OpenEHR::ADL::Parser.new))
+      end
+
+      def run
+        while argv = ARGV.shift
+          begin
+            input = nil
+            name = nil
+            case argv
+            when /\A(http:\/\/.*)/
+              name = $1
+              input = case response = Net::HTTP.get_response(Uri.parse($1))
+                      when Net::HTTPSuccess   
+                        response.body
+                      when Net::HTTPRedirection
+                        name = response['location']
+                        fetch(response['location'], limit - 1)
+                      else
+                        response.error!
+                      end
+            when /\A("[^"]*)"/
+              name = argv
+              input = argv
+            else # assumes file name
+              name = argv
+              input = File.new(argv)
+            end
+            @adl_validator.run(input, name)
+          rescue SocketError => message
+            puts "SocketError: #{message}"
+          rescue Racc::ParseError => message
+            puts "ParseError: #{message}"
+          else
+            puts "Accepted '#{argv}'"
+          ensure
+#            input.close if input.kind_of? IO
+          end
+        end
+      end
+    end
+  end # of CommandLine
+end # of OpenEHR
+
+if __FILE__ == $0
+  begin
+    arguments = OpenEhr::CommandLine::Arguments.new(ARGV)
+    validator = OpenEhr::CommandLine::ADLValidator.new(arguments)
+    validator.run
+  end
+end
+
+
+
+
+
Index: /ruby/tags/release-0.5.0/config/boot.rb
===================================================================
--- /ruby/tags/release-0.5.0/config/boot.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/config/boot.rb	(revision 367)
@@ -0,0 +1,110 @@
+# Don't change this file!
+# Configure your app in config/environment.rb and config/environments/*.rb
+
+RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
+
+module Rails
+  class << self
+    def boot!
+      unless booted?
+        preinitialize
+        pick_boot.run
+      end
+    end
+
+    def booted?
+      defined? Rails::Initializer
+    end
+
+    def pick_boot
+      (vendor_rails? ? VendorBoot : GemBoot).new
+    end
+
+    def vendor_rails?
+      File.exist?("#{RAILS_ROOT}/vendor/rails")
+    end
+
+    def preinitialize
+      load(preinitializer_path) if File.exist?(preinitializer_path)
+    end
+
+    def preinitializer_path
+      "#{RAILS_ROOT}/config/preinitializer.rb"
+    end
+  end
+
+  class Boot
+    def run
+      load_initializer
+      Rails::Initializer.run(:set_load_path)
+    end
+  end
+
+  class VendorBoot < Boot
+    def load_initializer
+      require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
+      Rails::Initializer.run(:install_gem_spec_stubs)
+      Rails::GemDependency.add_frozen_gem_path
+    end
+  end
+
+  class GemBoot < Boot
+    def load_initializer
+      self.class.load_rubygems
+      load_rails_gem
+      require 'initializer'
+    end
+
+    def load_rails_gem
+      if version = self.class.gem_version
+        gem 'rails', version
+      else
+        gem 'rails'
+      end
+    rescue Gem::LoadError => load_error
+      $stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
+      exit 1
+    end
+
+    class << self
+      def rubygems_version
+        Gem::RubyGemsVersion rescue nil
+      end
+
+      def gem_version
+        if defined? RAILS_GEM_VERSION
+          RAILS_GEM_VERSION
+        elsif ENV.include?('RAILS_GEM_VERSION')
+          ENV['RAILS_GEM_VERSION']
+        else
+          parse_gem_version(read_environment_rb)
+        end
+      end
+
+      def load_rubygems
+        require 'rubygems'
+        min_version = '1.3.1'
+        unless rubygems_version >= min_version
+          $stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
+          exit 1
+        end
+
+      rescue LoadError
+        $stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
+        exit 1
+      end
+
+      def parse_gem_version(text)
+        $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
+      end
+
+      private
+        def read_environment_rb
+          File.read("#{RAILS_ROOT}/config/environment.rb")
+        end
+    end
+  end
+end
+
+# All that for this:
+Rails.boot!
Index: /ruby/tags/release-0.5.0/config/database.yml
===================================================================
--- /ruby/tags/release-0.5.0/config/database.yml	(revision 367)
+++ /ruby/tags/release-0.5.0/config/database.yml	(revision 367)
@@ -0,0 +1,19 @@
+# SQLite version 3.x
+#   gem install sqlite3-ruby (not necessary on OS X Leopard)
+development:
+  adapter: sqlite3
+  database: db/development.sqlite3
+  timeout: 5000
+
+# Warning: The database defined as "test" will be erased and
+# re-generated from your development database when you run "rake".
+# Do not set this db to the same as development or production.
+test:
+  adapter: sqlite3
+  database: db/test.sqlite3
+  timeout: 5000
+
+production:
+  adapter: sqlite3
+  database: db/production.sqlite3
+  timeout: 5000
Index: /ruby/tags/release-0.5.0/config/environment.rb
===================================================================
--- /ruby/tags/release-0.5.0/config/environment.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/config/environment.rb	(revision 367)
@@ -0,0 +1,67 @@
+# Be sure to restart your server when you modify this file
+
+# Uncomment below to force Rails into production mode when
+# you don't control web/app server and can't set it the proper way
+# ENV['RAILS_ENV'] ||= 'production'
+
+# Specifies gem version of Rails to use when vendor/rails is not present
+#RAILS_GEM_VERSION = '2.1.0' unless defined? RAILS_GEM_VERSION
+
+# Bootstrap the Rails environment, frameworks, and default configuration
+require File.join(File.dirname(__FILE__), 'boot')
+
+Rails::Initializer.run do |config|
+  # Settings in config/environments/* take precedence over those specified here.
+  # Application configuration should go into files in config/initializers
+  # -- all .rb files in that directory are automatically loaded.
+  # See Rails::Configuration for more options.
+
+  # Skip frameworks you're not going to use. To use Rails without a database
+  # you must remove the Active Record framework.
+  # config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
+
+  # Specify gems that this application depends on. 
+  # They can then be installed with "rake gems:install" on new installations.
+  # config.gem "bj"
+  # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
+  # config.gem "aws-s3", :lib => "aws/s3"
+
+  # Only load the plugins named here, in the order given. By default, all plugins 
+  # in vendor/plugins are loaded in alphabetical order.
+  # :all can be used as a placeholder for all plugins not explicitly named
+  # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
+
+  # Add additional load paths for your own custom dirs
+  # config.load_paths += %W( #{RAILS_ROOT}/extras )
+
+  # Force all environments to use the same logger level
+  # (by default production uses :info, the others :debug)
+  # config.log_level = :debug
+
+  # Make Time.zone default to the specified zone, and make Active Record store time values
+  # in the database in UTC, and return them converted to the specified local zone.
+  # Run "rake -D time" for a list of tasks for finding time zone names. Uncomment to use default local time.
+  config.time_zone = 'UTC'
+
+  # Your secret key for verifying cookie session data integrity.
+  # If you change this key, all old sessions will become invalid!
+  # Make sure the secret is at least 30 characters and all random, 
+  # no regular words or you'll be exposed to dictionary attacks.
+  config.action_controller.session = {
+    :session_key => '_terminology_session',
+    :secret      => '1ea0f287b0aff2a17c7118ce51c923ba7dbbb864484499aefa03b79b57488265f13445ba44b6c0d1abe411f7bc2c8417edabadd611190532e7051a1a7319b707'
+  }
+
+  # Use the database for sessions instead of the cookie-based default,
+  # which shouldn't be used to store highly confidential information
+  # (create the session table with "rake db:sessions:create")
+  # config.action_controller.session_store = :active_record_store
+
+  # Use SQL instead of Active Record's schema dumper when creating the test database.
+  # This is necessary if your schema can't be completely dumped by the schema dumper,
+  # like if you have constraints or database-specific column types
+  # config.active_record.schema_format = :sql
+
+  # Activate observers that should always be running
+  # config.active_record.observers = :cacher, :garbage_collector
+end
Index: /ruby/tags/release-0.5.0/config/environments/development.rb
===================================================================
--- /ruby/tags/release-0.5.0/config/environments/development.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/config/environments/development.rb	(revision 367)
@@ -0,0 +1,17 @@
+# Settings specified here will take precedence over those in config/environment.rb
+
+# In the development environment your application's code is reloaded on
+# every request.  This slows down response time but is perfect for development
+# since you don't have to restart the webserver when you make code changes.
+config.cache_classes = false
+
+# Log error messages when you accidentally call methods on nil.
+config.whiny_nils = true
+
+# Show full error reports and disable caching
+config.action_controller.consider_all_requests_local = true
+config.action_view.debug_rjs                         = true
+config.action_controller.perform_caching             = false
+
+# Don't care if the mailer can't send
+config.action_mailer.raise_delivery_errors = false
Index: /ruby/tags/release-0.5.0/config/environments/production.rb
===================================================================
--- /ruby/tags/release-0.5.0/config/environments/production.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/config/environments/production.rb	(revision 367)
@@ -0,0 +1,22 @@
+# Settings specified here will take precedence over those in config/environment.rb
+
+# The production environment is meant for finished, "live" apps.
+# Code is not reloaded between requests
+config.cache_classes = true
+
+# Use a different logger for distributed setups
+# config.logger = SyslogLogger.new
+
+# Full error reports are disabled and caching is turned on
+config.action_controller.consider_all_requests_local = false
+config.action_controller.perform_caching             = true
+config.action_view.cache_template_loading            = true
+
+# Use a different cache store in production
+# config.cache_store = :mem_cache_store
+
+# Enable serving of images, stylesheets, and javascripts from an asset server
+# config.action_controller.asset_host                  = "http://assets.example.com"
+
+# Disable delivery errors, bad email addresses will be ignored
+# config.action_mailer.raise_delivery_errors = false
Index: /ruby/tags/release-0.5.0/config/environments/test.rb
===================================================================
--- /ruby/tags/release-0.5.0/config/environments/test.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/config/environments/test.rb	(revision 367)
@@ -0,0 +1,22 @@
+# Settings specified here will take precedence over those in config/environment.rb
+
+# The test environment is used exclusively to run your application's
+# test suite.  You never need to work with it otherwise.  Remember that
+# your test database is "scratch space" for the test suite and is wiped
+# and recreated between test runs.  Don't rely on the data there!
+config.cache_classes = false
+
+# Log error messages when you accidentally call methods on nil.
+config.whiny_nils = true
+
+# Show full error reports and disable caching
+config.action_controller.consider_all_requests_local = true
+config.action_controller.perform_caching             = false
+
+# Disable request forgery protection in test environment
+config.action_controller.allow_forgery_protection    = false
+
+# Tell Action Mailer not to deliver emails to the real world.
+# The :test delivery method accumulates sent emails in the
+# ActionMailer::Base.deliveries array.
+config.action_mailer.delivery_method = :test
Index: /ruby/tags/release-0.5.0/config/initializers/inflections.rb
===================================================================
--- /ruby/tags/release-0.5.0/config/initializers/inflections.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/config/initializers/inflections.rb	(revision 367)
@@ -0,0 +1,10 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new inflection rules using the following format 
+# (all these examples are active by default):
+# Inflector.inflections do |inflect|
+#   inflect.plural /^(ox)$/i, '\1en'
+#   inflect.singular /^(ox)en/i, '\1'
+#   inflect.irregular 'person', 'people'
+#   inflect.uncountable %w( fish sheep )
+# end
Index: /ruby/tags/release-0.5.0/config/initializers/mime_types.rb
===================================================================
--- /ruby/tags/release-0.5.0/config/initializers/mime_types.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/config/initializers/mime_types.rb	(revision 367)
@@ -0,0 +1,5 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new mime types for use in respond_to blocks:
+# Mime::Type.register "text/richtext", :rtf
+# Mime::Type.register_alias "text/html", :iphone
Index: /ruby/tags/release-0.5.0/config/initializers/new_rails_defaults.rb
===================================================================
--- /ruby/tags/release-0.5.0/config/initializers/new_rails_defaults.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/config/initializers/new_rails_defaults.rb	(revision 367)
@@ -0,0 +1,15 @@
+# These settings change the behavior of Rails 2 apps and will be defaults
+# for Rails 3. You can remove this initializer when Rails 3 is released.
+
+# Include Active Record class name as root for JSON serialized output.
+ActiveRecord::Base.include_root_in_json = true
+
+# Store the full class name (including module namespace) in STI type column.
+ActiveRecord::Base.store_full_sti_class = true
+
+# Use ISO 8601 format for JSON serialized times and dates.
+ActiveSupport.use_standard_json_time_format = true
+
+# Don't escape HTML entities in JSON, leave that for the #json_escape helper.
+# if you're including raw json in an HTML page.
+ActiveSupport.escape_html_entities_in_json = false
Index: /ruby/tags/release-0.5.0/config/routes.rb
===================================================================
--- /ruby/tags/release-0.5.0/config/routes.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/config/routes.rb	(revision 367)
@@ -0,0 +1,46 @@
+ActionController::Routing::Routes.draw do |map|
+  # The priority is based upon order of creation: first created -> highest priority.
+
+  # Sample of regular route:
+  #   map.connect 'products/:id', :controller => 'catalog', :action => 'view'
+  # Keep in mind you can assign values other than :controller and :action
+
+  # Sample of named route:
+  #   map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
+  # This route can be invoked with purchase_url(:id => product.id)
+
+  # Sample resource route (maps HTTP verbs to controller actions automatically):
+  #   map.resources :products
+
+  # Sample resource route with options:
+  #   map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
+
+  # Sample resource route with sub-resources:
+  #   map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
+  
+  # Sample resource route with more complex sub-resources
+  #   map.resources :products do |products|
+  #     products.resources :comments
+  #     products.resources :sales, :collection => { :recent => :get }
+  #   end
+
+  # Sample resource route within a namespace:
+  #   map.namespace :admin do |admin|
+  #     # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
+  #     admin.resources :products
+  #   end
+
+  # You can have the root of your site routed with map.root -- just remember to delete public/index.html.
+  # map.root :controller => "welcome"
+
+  # See how all your routes lay out with "rake routes"
+  # RESTful terminology interface
+  map.terminology 'terminology/:name/:lang/:code',
+                  :controller => 'terminology',
+                  :action => 'show'
+
+  # Install the default routes as the lowest priority.
+  map.connect ':controller/:action/:id'
+  map.connect ':controller/:action/:id.:format'
+
+end
Index: /ruby/tags/release-0.5.0/db/migrate/20090725052538_create_terminologies.rb
===================================================================
--- /ruby/tags/release-0.5.0/db/migrate/20090725052538_create_terminologies.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/db/migrate/20090725052538_create_terminologies.rb	(revision 367)
@@ -0,0 +1,18 @@
+class CreateTerminologies < ActiveRecord::Migration
+  def self.up
+    create_table :terminologies do |t|
+      t.integer :id
+      t.string :code
+      t.string :name
+      t.string :lang
+      t.text :group
+      t.string :rubric
+      t.text :description
+      t.string :mappings
+    end
+  end
+
+  def self.down
+    drop_table :terminologies
+  end
+end
Index: /ruby/tags/release-0.5.0/db/migrate/20090824070828_create_encodings.rb
===================================================================
--- /ruby/tags/release-0.5.0/db/migrate/20090824070828_create_encodings.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/db/migrate/20090824070828_create_encodings.rb	(revision 367)
@@ -0,0 +1,13 @@
+class CreateEncodings < ActiveRecord::Migration
+  def self.up
+    create_table :encodings do |t|
+      t.string :name
+      t.integer :mibenum
+      t.text :source
+    end
+  end
+
+  def self.down
+    drop_table :encodings
+  end
+end
Index: /ruby/tags/release-0.5.0/db/migrate/20090824070846_create_encoding_aliases.rb
===================================================================
--- /ruby/tags/release-0.5.0/db/migrate/20090824070846_create_encoding_aliases.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/db/migrate/20090824070846_create_encoding_aliases.rb	(revision 367)
@@ -0,0 +1,12 @@
+class CreateEncodingAliases < ActiveRecord::Migration
+  def self.up
+    create_table :encoding_aliases do |t|
+      t.string :alias
+      t.integer :mibenum
+    end
+  end
+
+  def self.down
+    drop_table :encoding_aliases
+  end
+end
Index: /ruby/tags/release-0.5.0/db/schema.rb
===================================================================
--- /ruby/tags/release-0.5.0/db/schema.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/db/schema.rb	(revision 367)
@@ -0,0 +1,35 @@
+# This file is auto-generated from the current state of the database. Instead of editing this file, 
+# please use the migrations feature of Active Record to incrementally modify your database, and
+# then regenerate this schema definition.
+#
+# Note that this schema.rb definition is the authoritative source for your database schema. If you need
+# to create the application database on another system, you should be using db:schema:load, not running
+# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
+# you'll amass, the slower it'll run and the greater likelihood for issues).
+#
+# It's strongly recommended to check this file into your version control system.
+
+ActiveRecord::Schema.define(:version => 20090824070846) do
+
+  create_table "encoding_aliases", :force => true do |t|
+    t.string  "alias"
+    t.integer "mibenum"
+  end
+
+  create_table "encodings", :force => true do |t|
+    t.string  "name"
+    t.integer "mibenum"
+    t.text    "source"
+  end
+
+  create_table "terminologies", :force => true do |t|
+    t.string "code"
+    t.string "name"
+    t.string "lang"
+    t.text   "group"
+    t.string "rubric"
+    t.text   "description"
+    t.string "mappings"
+  end
+
+end
Index: /ruby/tags/release-0.5.0/doc/README_FOR_APP
===================================================================
--- /ruby/tags/release-0.5.0/doc/README_FOR_APP	(revision 367)
+++ /ruby/tags/release-0.5.0/doc/README_FOR_APP	(revision 367)
@@ -0,0 +1,2 @@
+Use this README file to introduce your application and point to useful places in the API for learning more.
+Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
Index: /ruby/tags/release-0.5.0/doc/api
===================================================================
--- /ruby/tags/release-0.5.0/doc/api	(revision 367)
+++ /ruby/tags/release-0.5.0/doc/api	(revision 367)
@@ -0,0 +1,1 @@
+link /usr/share/doc/rails/html
Index: /ruby/tags/release-0.5.0/doc/open_ehr/Common_RM.ntriple
===================================================================
--- /ruby/tags/release-0.5.0/doc/open_ehr/Common_RM.ntriple	(revision 367)
+++ /ruby/tags/release-0.5.0/doc/open_ehr/Common_RM.ntriple	(revision 367)
@@ -0,0 +1,254 @@
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#ISO_OID> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#UID> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#ISO_OID> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA15 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA15 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA15 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#domain_concept> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#participations> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#participations> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#ATTESTATION> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#participations> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#PARTICIPATION> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#links> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#links> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#LINK> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#links> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#value> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#OBJECT_ID> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#value> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#value> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#FunctionalProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#value> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#function> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#PARTICIPATION> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#function> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#FunctionalProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#function> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#function> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> .
+_:AX5fXX3aXX40XX5fXX3aXA24 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#proof> .
+_:AX5fXX3aXX40XX5fXX3aXA24 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA24 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#version_id> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#OBJECT_ID> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#version_id> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#version_id> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA4 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA4 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#name> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#status> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#ATTESTATION> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#status> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CODED_TEXT> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#status> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#FunctionalProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#status> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#specialisation> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#HIER_OBJECT_ID> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#specialisation> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#specialisation> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#FunctionalProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#specialisation> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#performer> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#PARTICIPATION> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#performer> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#PARTY_REF> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#performer> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#FunctionalProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#performer> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA16 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA16 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#qualified_rm_entity> .
+_:AX5fXX3aXX40XX5fXX3aXA16 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA25 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA25 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#status> .
+_:AX5fXX3aXX40XX5fXX3aXA25 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#OBJECT_ID> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#OBJECT_ID> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA19 .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#OBJECT_ID> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2002/07/owl#Thing> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#OBJECT_ID> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA18 .
+_:AX5fXX3aXX40XX5fXX3aXA5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA5 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#id> .
+_:AX5fXX3aXX40XX5fXX3aXA5 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#name> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#FunctionalProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#name> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#name> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#name> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#ARCHETYPED> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA17 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA17 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#specialisation> .
+_:AX5fXX3aXX40XX5fXX3aXA17 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#rm_name> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#HIER_OBJECT_ID> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#rm_name> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#FunctionalProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#rm_name> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#rm_name> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#archetype_details> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#ARCHETYPED> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#archetype_details> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#archetype_details> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> .
+_:AX5fXX3aXX40XX5fXX3aXA26 <http://www.w3.org/2002/07/owl#minCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA26 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA26 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#participations> .
+_:AX5fXX3aXX40XX5fXX3aXA6 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#item> .
+_:AX5fXX3aXX40XX5fXX3aXA6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA6 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_EHR_URI> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#relationship> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CODED_TEXT> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#relationship> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#FunctionalProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#relationship> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#relationship> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#RELATED_PARTY> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#SET_DV_EHR_URI> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#SET_DV_EHR_URI> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#SET_T> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#SET_DV_EHR_URI> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA6 .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#meaning> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#FunctionalProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#meaning> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#meaning> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#meaning> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#rm_entity> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#FunctionalProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#rm_entity> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#rm_entity> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#rm_entity> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#HIER_OBJECT_ID> .
+_:AX5fXX3aXX40XX5fXX3aXA18 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA18 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#version_id> .
+_:AX5fXX3aXX40XX5fXX3aXA18 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#mode> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CODED_TEXT> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#mode> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#PARTICIPATION> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#mode> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#FunctionalProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#mode> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#id> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#OBJECT_REF> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#id> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#FunctionalProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#id> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#id> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#OBJECT_ID> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#LINK> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#VERSION_AUDIT> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#VERSION_AUDIT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#AUDIT_DETAILS> .
+_:AX5fXX3aXX40XX5fXX3aXA27 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA28 .
+_:AX5fXX3aXX40XX5fXX3aXA27 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Ontology> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl> <http://www.w3.org/2002/07/owl#imports> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl> .
+_:AX5fXX3aXX40XX5fXX3aXA7 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA7 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#time> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#UUID> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#UUID> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#UID> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#ACCESS_GROUP_REF> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#ACCESS_GROUP_REF> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#OBJECT_REF> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#PARTY_REF> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#PARTY_REF> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#OBJECT_REF> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#ARCHETYPE_ID> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#ARCHETYPE_ID> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#OBJECT_ID> .
+_:AX5fXX3aXX40XX5fXX3aXA19 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA19 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#value> .
+_:AX5fXX3aXX40XX5fXX3aXA19 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#domain_concept> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#HIER_OBJECT_ID> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#domain_concept> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#FunctionalProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#domain_concept> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#domain_concept> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA28 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#ATTESTATION> .
+_:AX5fXX3aXX40XX5fXX3aXA28 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA29 .
+_:AX5fXX3aXX40XX5fXX3aXA8 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#mode> .
+_:AX5fXX3aXX40XX5fXX3aXA8 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#HIER_OBJECT_ID> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA17 .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#HIER_OBJECT_ID> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA16 .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#HIER_OBJECT_ID> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA15 .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#HIER_OBJECT_ID> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA14 .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#HIER_OBJECT_ID> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA13 .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#HIER_OBJECT_ID> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#OBJECT_ID> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#HIER_OBJECT_ID> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA12 .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#HIER_OBJECT_ID> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#qualified_rm_entity> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#FunctionalProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#qualified_rm_entity> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#qualified_rm_entity> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#qualified_rm_entity> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#HIER_OBJECT_ID> .
+_:AX5fXX3aXX40XX5fXX3aXA10 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA10 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#function> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#feeder_audit> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#feeder_audit> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#feeder_audit> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#FEEDER_AUDIT> .
+_:AX5fXX3aXX40XX5fXX3aXA29 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#PARTICIPATION> .
+_:AX5fXX3aXX40XX5fXX3aXA29 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA9 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_DV_DATE_TIME> .
+_:AX5fXX3aXX40XX5fXX3aXA9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA9 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#time> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#items> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#SET_DV_EHR_URI> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#items> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#ATTESTATION> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#items> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#FunctionalProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#items> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#namespace> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#OBJECT_REF> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#namespace> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#namespace> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#FunctionalProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#namespace> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#uid> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#OBJECT_ID> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#uid> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#uid> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA11 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#performer> .
+_:AX5fXX3aXX40XX5fXX3aXA11 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#AUDIT_DETAILS> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#rm_originator> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#HIER_OBJECT_ID> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#rm_originator> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#FunctionalProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#rm_originator> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#rm_originator> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA20 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#relationship> .
+_:AX5fXX3aXX40XX5fXX3aXA20 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA20 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA0 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA0 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#feeder_audit> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#ATTESTATION> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#ATTESTATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA26 .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#ATTESTATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA25 .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#ATTESTATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA24 .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#ATTESTATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA23 .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#ATTESTATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA22 .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#ATTESTATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2002/07/owl#Thing> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#proof> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#ATTESTATION> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#proof> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#proof> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ENCAPSULATED> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#RELATED_PARTY> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#RELATED_PARTY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2002/07/owl#Thing> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#RELATED_PARTY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA21 .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#RELATED_PARTY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA20 .
+_:AX5fXX3aXX40XX5fXX3aXA12 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#rm_originator> .
+_:AX5fXX3aXX40XX5fXX3aXA12 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#time> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#FunctionalProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#time> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#time> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#time> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA27 .
+_:AX5fXX3aXX40XX5fXX3aXA21 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA21 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA21 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#party> .
+_:AX5fXX3aXX40XX5fXX3aXA1 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#meaning> .
+_:AX5fXX3aXX40XX5fXX3aXA1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#PARTICIPATION> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#PARTICIPATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA11 .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#PARTICIPATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA10 .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#PARTICIPATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA9 .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#PARTICIPATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA8 .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#PARTICIPATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA7 .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#PARTICIPATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2002/07/owl#Thing> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#type> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#type> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#OBJECT_REF> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#InverseFunctionalProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#party> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#RELATED_PARTY> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#party> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#PARTY_REF> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#party> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA13 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA13 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA13 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#rm_name> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#CONTRIBUTION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#AUDIT_DETAILS> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#CONTRIBUTION> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA22 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA22 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA22 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#time> .
+_:AX5fXX3aXX40XX5fXX3aXA2 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#archetype_details> .
+_:AX5fXX3aXX40XX5fXX3aXA2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#TERMINOLOGY_ID> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#TERMINOLOGY_ID> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#OBJECT_ID> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2002/07/owl#Thing> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA4 .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA3 .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2 .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1 .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA0 .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#FEEDER_AUDIT> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#OBJECT_REF> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA5 .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#OBJECT_REF> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2002/07/owl#Thing> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#OBJECT_REF> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA14 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#rm_entity> .
+_:AX5fXX3aXX40XX5fXX3aXA14 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA14 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#VERSION_REPOSITORY_T> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA23 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#items> .
+_:AX5fXX3aXX40XX5fXX3aXA23 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA23 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA3 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#uid> .
+_:AX5fXX3aXX40XX5fXX3aXA3 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#UID> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
Index: /ruby/tags/release-0.5.0/doc/open_ehr/Data_Structures_RM.ntriple
===================================================================
--- /ruby/tags/release-0.5.0/doc/open_ehr/Data_Structures_RM.ntriple	(revision 367)
+++ /ruby/tags/release-0.5.0/doc/open_ehr/Data_Structures_RM.ntriple	(revision 367)
@@ -0,0 +1,344 @@
+_:AX5fXX3aXX40XX5fXX3aXA649 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA649 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA649 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#item> .
+_:AX5fXX3aXX40XX5fXX3aXA613 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA613 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#origin> .
+_:AX5fXX3aXX40XX5fXX3aXA613 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA658 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#EVENT_SERIES_T> .
+_:AX5fXX3aXX40XX5fXX3aXA658 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA659 .
+_:AX5fXX3aXX40XX5fXX3aXA622 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#items> .
+_:AX5fXX3aXX40XX5fXX3aXA622 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA622 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#math_function> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CODED_TEXT> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#math_function> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#math_function> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_EVENT_T> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#duration> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#duration> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#duration> <http://www.w3.org/2000/01/rdf-schema#label> "duracion"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#duration> <http://www.w3.org/2000/01/rdf-schema#label> "duration"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#LIST_ITEM> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA612 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#LIST_ITEM> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#LIST_T> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#LIST_ITEM> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA631 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA631 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#representation> .
+_:AX5fXX3aXX40XX5fXX3aXA631 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#row_count> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_TABLE> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#row_count> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#row_count> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#integer> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA644 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "the abstract parent of COMPOUND and ELEMENT representation classes"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "n/a"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_HIERARCHICAL_ITEM"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM> <http://www.w3.org/2000/01/rdf-schema#label> "item"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM> <http://www.w3.org/2000/01/rdf-schema#label> "item"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM> <http://www.w3.org/2002/07/owl#equivalentClass> _:AX5fXX3aXX40XX5fXX3aXA645 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM> <http://protege.stanford.edu/plugins/owl/protege#abstract> "true"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> "Item"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#OMGHDTF> "COAS::Observation"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA640 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#period> .
+_:AX5fXX3aXX40XX5fXX3aXA640 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA640 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#CLUSTER> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA623 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#CLUSTER> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_HIERARCHICAL_GROUP"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#CLUSTER> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "ClusterOCC"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#CLUSTER> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "The grouping variant of ITEM, which may contain ffurther instances of ITEM, in an ordered list"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#CLUSTER> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> "Compound class"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#CLUSTER> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA622 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#CLUSTER> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#CLUSTER> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "Act_context"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#CLUSTER> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#OMGHDTF> "COAS::CompositeObservation"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#CLUSTER> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA614 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA615 .
+_:AX5fXX3aXX40XX5fXX3aXA614 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ELEMENT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_HIERARCHICAL_VALUE"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ELEMENT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA627 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ELEMENT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "DataItem"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ELEMENT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ELEMENT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA628 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ELEMENT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA629 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ELEMENT> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ELEMENT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> "Element"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ELEMENT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "The leaf variant of ITEM, to which a DATA_VALUE instance is attached."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ELEMENT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "Act"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ELEMENT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#OMGHDTF> "COAS::AtomicObservation"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA659 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_LIST> .
+_:AX5fXX3aXX40XX5fXX3aXA659 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA623 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA623 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#items> .
+_:AX5fXX3aXX40XX5fXX3aXA623 <http://www.w3.org/2002/07/owl#minCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#is_periodic> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#boolean> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#is_periodic> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#is_periodic> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#EVENT_SERIES_T> .
+_:AX5fXX3aXX40XX5fXX3aXA632 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM> .
+_:AX5fXX3aXX40XX5fXX3aXA632 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA632 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#representation> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_LIST> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#MisUse> "Not to be used for time-based lists, which should be represented with the proper termporal class"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_LIST> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA621 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_LIST> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA619 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_LIST> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Used to represent any data which is logically a list of values, \nsuch as blood presure, most protocols, many blood tests etc...\n"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_LIST> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA618 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_LIST> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA620 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_LIST> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/1999/02/22-rdf-syntax-ns#List> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_LIST> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Logical list data structure, where each item has a value and can be referred to by a name and a positional index in the list"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_LIST> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA617 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_LIST> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_LIST> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_LIST_PROPOSITION"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_LIST> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_STRUCTURE> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_LIST> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "CDA List Entry"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#column_count> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#integer> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#column_count> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#column_count> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_TABLE> .
+_:AX5fXX3aXX40XX5fXX3aXA641 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA641 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#EVENT_T> .
+_:AX5fXX3aXX40XX5fXX3aXA641 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#items> .
+_:AX5fXX3aXX40XX5fXX3aXA615 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#SINGLE_EVENT_T> .
+_:AX5fXX3aXX40XX5fXX3aXA615 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA616 .
+_:AX5fXX3aXX40XX5fXX3aXA650 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA650 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#representation> .
+_:AX5fXX3aXX40XX5fXX3aXA650 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ELEMENT> .
+_:AX5fXX3aXX40XX5fXX3aXA624 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#item> .
+_:AX5fXX3aXX40XX5fXX3aXA624 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_EVENT_T> .
+_:AX5fXX3aXX40XX5fXX3aXA624 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#DATA_STRUCTURE> <http://protege.stanford.edu/plugins/owl/protege#abstract> "true"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#DATA_STRUCTURE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Abstract parent class of all spatial data types"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#DATA_STRUCTURE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#DATA_STRUCTURE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "CDA Structure"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#DATA_STRUCTURE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA631 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#DATA_STRUCTURE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#DATA_STRUCTURE> <http://www.w3.org/2000/01/rdf-schema#label> "structure"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#DATA_STRUCTURE> <http://www.w3.org/2000/01/rdf-schema#label> "estructura"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#DATA_STRUCTURE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA630 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#DATA_STRUCTURE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_HIERARCHICAL_PROPOSITION"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA633 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA633 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#math_function> .
+_:AX5fXX3aXX40XX5fXX3aXA633 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA642 <http://www.w3.org/2002/07/owl#minCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA642 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA642 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#items> .
+_:AX5fXX3aXX40XX5fXX3aXA616 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#EVENT_SERIES_T> .
+_:AX5fXX3aXX40XX5fXX3aXA616 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA651 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA651 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ELEMENT> .
+_:AX5fXX3aXX40XX5fXX3aXA651 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#item> .
+_:AX5fXX3aXX40XX5fXX3aXA625 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#duration> .
+_:AX5fXX3aXX40XX5fXX3aXA625 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA625 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#HISTORY_T_STRUCTURE> <http://protege.stanford.edu/plugins/owl/protege#abstract> "true"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#HISTORY_T_STRUCTURE> <http://www.w3.org/2000/01/rdf-schema#label> "estructura de historia"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#HISTORY_T_STRUCTURE> <http://www.w3.org/2002/07/owl#equivalentClass> _:AX5fXX3aXX40XX5fXX3aXA614 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#HISTORY_T_STRUCTURE> <http://www.w3.org/2000/01/rdf-schema#label> "history structure"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#HISTORY_T_STRUCTURE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA613 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#HISTORY_T_STRUCTURE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "The abstract parent class of various concrete historical structures,\ncurrently including discrete series and series of states, either\nof chich may be periodic."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#HISTORY_T_STRUCTURE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#HISTORY_T_STRUCTURE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "Time was encoded as part of the G1_HIERARCHICAL_PROPOSITION structure"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#HISTORY_T_STRUCTURE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "The data type Histori HIST_T is equivalent in intention"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#HISTORY_T_STRUCTURE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#DATA_STRUCTURE> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#HISTORY_T_STRUCTURE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "Time was encoded as part of the Item structure"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA634 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#width> .
+_:AX5fXX3aXX40XX5fXX3aXA634 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA634 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#is_instantaneous> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#is_instantaneous> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_EVENT_T> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#is_instantaneous> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#boolean> .
+_:AX5fXX3aXX40XX5fXX3aXA643 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA643 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#is_periodic> .
+_:AX5fXX3aXX40XX5fXX3aXA643 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA617 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA617 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#names> .
+_:AX5fXX3aXX40XX5fXX3aXA617 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#displayed> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#displayed> <http://www.w3.org/2000/01/rdf-schema#comment> "Indicates whether this item should be displayed"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#displayed> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#BOOLEAN> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#displayed> <http://www.w3.org/2000/01/rdf-schema#label> "displayed"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#displayed> <http://www.w3.org/2000/01/rdf-schema#label> "mostrable"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#displayed> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA652 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA653 .
+_:AX5fXX3aXX40XX5fXX3aXA652 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA626 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#item> .
+_:AX5fXX3aXX40XX5fXX3aXA626 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA626 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA635 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA635 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA635 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#item> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#period> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#period> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#period> <http://www.w3.org/2000/01/rdf-schema#comment> "period between samples in this segment if periodic"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#period> <http://www.w3.org/2000/01/rdf-schema#label> "period"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#period> <http://www.w3.org/2000/01/rdf-schema#label> "periodo"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#representation> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#DATA_STRUCTURE> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#representation> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#representation> <http://www.w3.org/2000/01/rdf-schema#label> "representation"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#representation> <http://www.w3.org/2000/01/rdf-schema#label> "representacion"@es .
+_:AX5fXX3aXX40XX5fXX3aXA644 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#displayed> .
+_:AX5fXX3aXX40XX5fXX3aXA644 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA644 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#item> <http://www.w3.org/2000/01/rdf-schema#label> "item"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#item> <http://www.w3.org/2000/01/rdf-schema#label> "item"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#item> <http://www.w3.org/2000/01/rdf-schema#comment> "The data of this event"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#item> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#item> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA652 .
+_:AX5fXX3aXX40XX5fXX3aXA618 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA618 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#item_count> .
+_:AX5fXX3aXX40XX5fXX3aXA618 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA653 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA654 .
+_:AX5fXX3aXX40XX5fXX3aXA653 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#SINGLE_EVENT_T> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl> <http://www.w3.org/2002/07/owl#imports> <http://trajano.us.es/~isabel/EHR/Common_RM.owl> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl> <http://www.w3.org/2002/07/owl#imports> <http://protege.stanford.edu/plugins/owl/protege> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl> <http://www.w3.org/2000/01/rdf-schema#comment> "This ontology is based on the openEHR Data Structures Reference Model Revision: 1.4 written in owl by Isabel Roman in July 2004"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Ontology> .
+_:AX5fXX3aXX40XX5fXX3aXA627 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA627 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#null_flavor> .
+_:AX5fXX3aXX40XX5fXX3aXA627 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA636 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#representation> .
+_:AX5fXX3aXX40XX5fXX3aXA636 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#CLUSTER> .
+_:AX5fXX3aXX40XX5fXX3aXA636 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#null_flavor> <http://www.w3.org/2000/01/rdf-schema#label> "motivo de valor nulo"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#null_flavor> <http://www.w3.org/2000/01/rdf-schema#label> "null flavor"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#null_flavor> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CODED_TEXT> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#null_flavor> <http://www.w3.org/2000/01/rdf-schema#comment> "Flavour of null value, e.g. indeterminate, not asked etc"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#null_flavor> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ELEMENT> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#null_flavor> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#origin> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#HISTORY_T_STRUCTURE> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#origin> <http://www.w3.org/2000/01/rdf-schema#label> "origen"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#origin> <http://www.w3.org/2000/01/rdf-schema#label> "origin"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#origin> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#origin> <http://www.w3.org/2000/01/rdf-schema#comment> "Time origin of this event history. The first event is not necessarily at the origin point."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#origin> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA645 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA645 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA646 .
+_:AX5fXX3aXX40XX5fXX3aXA619 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA619 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#items> .
+_:AX5fXX3aXX40XX5fXX3aXA619 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ELEMENT> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#items> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#items> <http://www.w3.org/2000/01/rdf-schema#label> "items"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#items> <http://www.w3.org/2000/01/rdf-schema#label> "items"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#items> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA656 .
+_:AX5fXX3aXX40XX5fXX3aXA654 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA655 .
+_:AX5fXX3aXX40XX5fXX3aXA654 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_EVENT_T> .
+_:AX5fXX3aXX40XX5fXX3aXA628 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA628 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA628 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#value> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#item_count> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#item_count> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#integer> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#item_count> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_LIST> .
+_:AX5fXX3aXX40XX5fXX3aXA637 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA637 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA637 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#row_count> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_STRUCTURE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_STRUCTURE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA632 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_STRUCTURE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#DATA_STRUCTURE> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_STRUCTURE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "CDA Structure"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_STRUCTURE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Abstract parent class of all spatial dta types\n"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_STRUCTURE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_HIERARCHICAL_PROPOSITION"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#names> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_LIST> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#names> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#LIST_EVENT_T> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#LIST_EVENT_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#LIST_T> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#LIST_EVENT_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA624 .
+_:AX5fXX3aXX40XX5fXX3aXA646 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ELEMENT> .
+_:AX5fXX3aXX40XX5fXX3aXA646 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA647 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#row_names> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#row_names> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_TABLE> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#row_names> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#is_null> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#is_null> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ELEMENT> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#is_null> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#boolean> .
+_:AX5fXX3aXX40XX5fXX3aXA655 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_SINGLE> .
+_:AX5fXX3aXX40XX5fXX3aXA655 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#offset> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#offset> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#offset> <http://www.w3.org/2000/01/rdf-schema#label> "offset"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#offset> <http://www.w3.org/2000/01/rdf-schema#label> "offset"@en .
+_:AX5fXX3aXX40XX5fXX3aXA629 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA629 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA629 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#is_null> .
+_:AX5fXX3aXX40XX5fXX3aXA638 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA638 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA638 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#column_count> .
+_:AX5fXX3aXX40XX5fXX3aXA647 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA647 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#CLUSTER> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#value> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ELEMENT> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#value> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DATA_VALUE> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#value> <http://www.w3.org/2000/01/rdf-schema#label> "valor"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#value> <http://www.w3.org/2000/01/rdf-schema#label> "value"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#value> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#value> <http://www.w3.org/2000/01/rdf-schema#comment> "Data value of this leaf"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA656 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA656 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA657 .
+_:AX5fXX3aXX40XX5fXX3aXA620 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#items> .
+_:AX5fXX3aXX40XX5fXX3aXA620 <http://www.w3.org/2002/07/owl#minCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA620 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#column_names> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_TABLE> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#column_names> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#column_names> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#EVENT_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA648 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#EVENT_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_EVENT_T> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#EVENT_T> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_SINGLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA651 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_SINGLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_STRUCTURE> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_SINGLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA650 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_SINGLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA649 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_SINGLE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Used to represent any data which is logically a single value, suc as a person\u00B4s height or weight"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_SINGLE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "CDA Item"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_SINGLE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Logical single value data structure"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_SINGLE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_SIMPLE_PROPOSITION"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_SINGLE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA639 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#CLUSTER> .
+_:AX5fXX3aXX40XX5fXX3aXA639 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#representation> .
+_:AX5fXX3aXX40XX5fXX3aXA639 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_TREE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA636 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_TREE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_STRUCTURE> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_TREE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_TREE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Logicla tree data structure"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_TREE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "List"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_TREE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_TREE_PROPOSITION"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_TREE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "cluster"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_TREE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Used to represent data which are logically a tree such as audiotology results, microbilogy results, biochemistry results..."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#EVENT_SERIES_T> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#EVENT_SERIES_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA643 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#EVENT_SERIES_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#HISTORY_T_STRUCTURE> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#EVENT_SERIES_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA642 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#EVENT_SERIES_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA641 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#EVENT_SERIES_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA640 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#EVENT_SERIES_T> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Defines the semantics of a time segment which consists of events\nwhich occur at known instants of time, and which may be\nperiodically spaced. This class is generic, allowing types to be\ngenerated which are locked to particular structure types, such as\nEVENT_SERIES_LIST_S"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA648 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#offset> .
+_:AX5fXX3aXX40XX5fXX3aXA648 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA648 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA612 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA612 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM> .
+_:AX5fXX3aXX40XX5fXX3aXA612 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#item> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_EVENT_T> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Defines the time point corrsponding to a single event in a series.\nThis class is generic, allowing types to be generated which are locked to\nparticular spatial types, such as EVENT_LIST_S. In cases where samples\nare missing, ther will corerespondingly be missing EVENT instances.\nEvery EVENT instance that is supplied must have an item."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_EVENT_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA635 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_EVENT_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA634 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_EVENT_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA633 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_EVENT_T> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_EVENT_T> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "The data type HistoryItem HXIT_T is close to EVENT_T"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA657 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA658 .
+_:AX5fXX3aXX40XX5fXX3aXA657 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#CLUSTER> .
+_:AX5fXX3aXX40XX5fXX3aXA621 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#CLUSTER> .
+_:AX5fXX3aXX40XX5fXX3aXA621 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#representation> .
+_:AX5fXX3aXX40XX5fXX3aXA621 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#width> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#width> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#width> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_EVENT_T> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#SINGLE_EVENT_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA626 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#SINGLE_EVENT_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_EVENT_T> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#SINGLE_EVENT_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA625 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#SINGLE_EVENT_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#HISTORY_T_STRUCTURE> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#SINGLE_EVENT_T> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#SINGLE_EVENT_T> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "a subtype of HISTORY_T catering for the very common case of single events. \nThe motivation for this class is to reduce the number of temporal\nobjects associtaed with a datum to one"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA630 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#representation> .
+_:AX5fXX3aXX40XX5fXX3aXA630 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA630 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_TABLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA639 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_TABLE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "RIM Table_structure, Table_cell, Table..."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_TABLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_STRUCTURE> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_TABLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA637 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_TABLE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_TABLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA638 .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_TABLE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Used to representa nay data which is logically a table of values, such as blood pressure, most protocols, many blood tests etc."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_TABLE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#MisUse> "Not used for time-based data, which should be represented with te temporal class JISTORY"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_TABLE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_TABLE_PROPOSITON, G1_MATRIX_PROPOSITION"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#ITEM_TABLE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Logical table data structure, in which columns are named and ordered. Some columns may be designated 'key' columns, containing key data for each row, in the manner of relational tables. This allows row-naming, where each row represents a body site, ablood antige etc... all values in a column have the same data type"^^<http://www.w3.org/2001/XMLSchema#string> .
Index: /ruby/tags/release-0.5.0/doc/open_ehr/Data_Types_RM.ntriple
===================================================================
--- /ruby/tags/release-0.5.0/doc/open_ehr/Data_Types_RM.ntriple	(revision 367)
+++ /ruby/tags/release-0.5.0/doc/open_ehr/Data_Types_RM.ntriple	(revision 367)
@@ -0,0 +1,1664 @@
+_:AX5fXX3aXX40XX5fXX3aXA1514 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1515 .
+_:AX5fXX3aXX40XX5fXX3aXA1514 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "12"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1180 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1180 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_GENERAL_TIME_SPECIFICATION> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#value> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#value> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1486 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#value> <http://www.w3.org/2000/01/rdf-schema#label> "valor"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#value> <http://www.w3.org/2000/01/rdf-schema#label> "value"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#value> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#period> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#period> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#period> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PERIODIC_TIME_SPECIFICATION> .
+_:AX5fXX3aXX40XX5fXX3aXA1241 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1241 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#uri> .
+_:AX5fXX3aXX40XX5fXX3aXA1241 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1302 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1303 .
+_:AX5fXX3aXX40XX5fXX3aXA1302 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "17"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1199 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1199 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#magnitude> .
+_:AX5fXX3aXX40XX5fXX3aXA1199 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#event_alignment> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#event_alignment> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1412 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#event_alignment> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#target_is_section> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_EHR_URI> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#target_is_section> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#boolean> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#target_is_section> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA1296 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1297 .
+_:AX5fXX3aXX40XX5fXX3aXA1296 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "11"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1357 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "30"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1357 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1358 .
+_:AX5fXX3aXX40XX5fXX3aXA1418 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1418 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#CODE_PHRASE> .
+_:AX5fXX3aXX40XX5fXX3aXA1145 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1146 .
+_:AX5fXX3aXX40XX5fXX3aXA1145 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_WORLD_TIME> .
+_:AX5fXX3aXX40XX5fXX3aXA1393 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1393 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1394 .
+_:AX5fXX3aXX40XX5fXX3aXA1206 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#units> .
+_:AX5fXX3aXX40XX5fXX3aXA1206 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1206 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1454 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "32"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1454 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1455 .
+_:AX5fXX3aXX40XX5fXX3aXA1515 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1516 .
+_:AX5fXX3aXX40XX5fXX3aXA1515 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "13"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1242 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#media_type> .
+_:AX5fXX3aXX40XX5fXX3aXA1242 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1242 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1181 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1181 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#value> .
+_:AX5fXX3aXX40XX5fXX3aXA1181 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1490 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1491 .
+_:AX5fXX3aXX40XX5fXX3aXA1490 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_URI> .
+_:AX5fXX3aXX40XX5fXX3aXA1303 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1304 .
+_:AX5fXX3aXX40XX5fXX3aXA1303 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "18"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1400 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1400 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "12"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1297 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "12"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1297 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1298 .
+_:AX5fXX3aXX40XX5fXX3aXA1358 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1359 .
+_:AX5fXX3aXX40XX5fXX3aXA1358 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "31"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1419 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1420 .
+_:AX5fXX3aXX40XX5fXX3aXA1419 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PERIODIC_TIME_SPECIFICATION> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PERIODIC_TIME_SPECIFICATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Specifies periodic points in time, linked to the calendar (phase-linked), \nor a real world event, such as 'breakfast'. Based on the HL7v3 data types\nPIVL<T> and EIVL<T>"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PERIODIC_TIME_SPECIFICATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "PIVL<T>, EIVL<T>"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PERIODIC_TIME_SPECIFICATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME_SPECIFICATION> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PERIODIC_TIME_SPECIFICATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> "STR 3.9"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PERIODIC_TIME_SPECIFICATION> <http://www.w3.org/2000/01/rdf-schema#label> "ESPECIFICACION DE INSTANTES PERIODICOS"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PERIODIC_TIME_SPECIFICATION> <http://www.w3.org/2000/01/rdf-schema#label> "PERIODIC TIME SPECIFICATION"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PERIODIC_TIME_SPECIFICATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "The Duration data value class privdes for the specification of time \nintervals, and also for a simple string description of the periodicity"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PERIODIC_TIME_SPECIFICATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Used in therapeutic prescriptions, expressed as INSTRUCTIONS \nin the openEHR"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MEASURABLE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "QTY"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MEASURABLE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "unit"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MEASURABLE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Abcstract class defining the concept of true quantified values. \nValues which are not only ordered, but whose magnitude is \nmeaningful as well. Units were inspired by the Unified Code for \nUnits of Measure"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MEASURABLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1206 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MEASURABLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTIFIED> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MEASURABLE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> "Attributes in the Quantity class for unit and accuracy"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MEASURABLE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#OMGHDTF> "COAS::Measurements"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MEASURABLE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1394 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1394 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1395 .
+_:AX5fXX3aXX40XX5fXX3aXA1146 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE> .
+_:AX5fXX3aXX40XX5fXX3aXA1146 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1147 .
+_:AX5fXX3aXX40XX5fXX3aXA1207 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1207 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#charset> .
+_:AX5fXX3aXX40XX5fXX3aXA1207 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1455 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1456 .
+_:AX5fXX3aXX40XX5fXX3aXA1455 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "33"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1516 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "14"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1516 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1517 .
+_:AX5fXX3aXX40XX5fXX3aXA1491 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1492 .
+_:AX5fXX3aXX40XX5fXX3aXA1491 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_STATE> .
+_:AX5fXX3aXX40XX5fXX3aXA1182 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1182 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#accuracy_is_percent> .
+_:AX5fXX3aXX40XX5fXX3aXA1182 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1243 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1243 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#minute> .
+_:AX5fXX3aXX40XX5fXX3aXA1243 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1304 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "19"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1304 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1305 .
+_:AX5fXX3aXX40XX5fXX3aXA1340 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1341 .
+_:AX5fXX3aXX40XX5fXX3aXA1340 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "13"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1401 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1401 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1402 .
+_:AX5fXX3aXX40XX5fXX3aXA1298 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "13"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1298 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1299 .
+_:AX5fXX3aXX40XX5fXX3aXA1359 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1360 .
+_:AX5fXX3aXX40XX5fXX3aXA1359 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "32"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#symbol> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDINAL> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#symbol> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#symbol> <http://www.w3.org/2000/01/rdf-schema#comment> "Coded textual representation of this value in the enumaration, which may be strings made from \"+\" symbols, or other enumerations of the terms such as \"mild\", \"moderate\", \"sever\", or even the same number series as the values"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#symbol> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CODED_TEXT> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "Roughly equivalent to CWE (coded with extensions)-e.e. tesxt value which may optionally be coded."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1154 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> "the Text data value class can contain either plain text or a term taken from a terminology system"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "A plain text item, which may contain any amount of legal characters arranged as e.g. words, sentences etc. Any DV_TEXT may be coded by adding mappings to it"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> <http://www.w3.org/2000/01/rdf-schema#label> "TEXT"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1156 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> "STR 2.6, 2.9"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1157 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1155 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1158 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DATA_VALUE> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1159 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Fragments of text, whether coded or not are used on their own as values, or to make up larger gtracts of text which may be marked up in some way, eventually going to make up paragraphs."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1152 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> <http://www.w3.org/2000/01/rdf-schema#label> "TEXTO"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1153 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARTIAL_TIME> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Represents a partially known time. All partial time have an unknown second, \nby definition, else they would be reprsented as normal times. The minute_known\nflag indictes whether the minute is also unknown."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARTIAL_TIME> <http://www.w3.org/2000/01/rdf-schema#label> "HORA PARCIAL"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARTIAL_TIME> <http://www.w3.org/2000/01/rdf-schema#label> "PARTIAL TIME"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARTIAL_TIME> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARTIAL_TIME> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1205 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARTIAL_TIME> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME> .
+_:AX5fXX3aXX40XX5fXX3aXA1208 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#size> .
+_:AX5fXX3aXX40XX5fXX3aXA1208 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1208 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#day> <http://www.w3.org/2000/01/rdf-schema#range> _:AX5fXX3aXX40XX5fXX3aXA1286 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#day> <http://www.w3.org/2000/01/rdf-schema#label> "day"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#day> <http://www.w3.org/2000/01/rdf-schema#label> "dia"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#day> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1317 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#day> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA1147 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1147 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> .
+_:AX5fXX3aXX40XX5fXX3aXA1395 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1396 .
+_:AX5fXX3aXX40XX5fXX3aXA1395 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1456 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "34"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1456 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1457 .
+_:AX5fXX3aXX40XX5fXX3aXA1517 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "15"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1517 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1518 .
+_:AX5fXX3aXX40XX5fXX3aXA1305 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1306 .
+_:AX5fXX3aXX40XX5fXX3aXA1305 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "20"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1183 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1183 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1183 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#accuracy> .
+_:AX5fXX3aXX40XX5fXX3aXA1244 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1244 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> .
+_:AX5fXX3aXX40XX5fXX3aXA1244 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#diff_type> .
+_:AX5fXX3aXX40XX5fXX3aXA1492 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1493 .
+_:AX5fXX3aXX40XX5fXX3aXA1492 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY> .
+_:AX5fXX3aXX40XX5fXX3aXA1280 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1280 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1281 .
+_:AX5fXX3aXX40XX5fXX3aXA1341 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "14"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1341 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1342 .
+_:AX5fXX3aXX40XX5fXX3aXA1402 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1403 .
+_:AX5fXX3aXX40XX5fXX3aXA1402 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> .
+_:AX5fXX3aXX40XX5fXX3aXA1299 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1300 .
+_:AX5fXX3aXX40XX5fXX3aXA1299 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "14"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1396 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1396 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1397 .
+_:AX5fXX3aXX40XX5fXX3aXA1209 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1209 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1209 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#language> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#reference_ranges> <http://www.w3.org/2000/01/rdf-schema#label> "reference ranges"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#reference_ranges> <http://www.w3.org/2000/01/rdf-schema#label> "rangos de referencia"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#reference_ranges> <http://www.w3.org/2000/01/rdf-schema#comment> "Optional tagged ranges for this value in its particular measurement context"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#reference_ranges> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#LIST_REFERENCE_RANGE> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#reference_ranges> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#reference_ranges> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDERED> .
+_:AX5fXX3aXX40XX5fXX3aXA1148 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1148 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1148 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#formalism> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ENCAPSULATED> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#OMGHDTF> "COAS::Multimedia"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ENCAPSULATED> <http://www.w3.org/2000/01/rdf-schema#label> "ENCAPSULATED"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ENCAPSULATED> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "TBD"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ENCAPSULATED> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1207 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ENCAPSULATED> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ENCAPSULATED> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DATA_VALUE> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ENCAPSULATED> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Abstract class defining the common meta-data of all types \nof encapsulated data"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ENCAPSULATED> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1208 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ENCAPSULATED> <http://protege.stanford.edu/plugins/owl/protege#abstract> "true"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ENCAPSULATED> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "Encapsulated_data (ED)"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ENCAPSULATED> <http://www.w3.org/2000/01/rdf-schema#label> "ENCAPSULADOS"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ENCAPSULATED> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> "STR 2.6"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ENCAPSULATED> <http://www.w3.org/2002/07/owl#equivalentClass> _:AX5fXX3aXX40XX5fXX3aXA1210 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ENCAPSULATED> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1209 .
+_:AX5fXX3aXX40XX5fXX3aXA1457 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "35"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1457 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1458 .
+_:AX5fXX3aXX40XX5fXX3aXA1518 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1519 .
+_:AX5fXX3aXX40XX5fXX3aXA1518 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "16"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1493 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDINAL> .
+_:AX5fXX3aXX40XX5fXX3aXA1493 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1494 .
+_:AX5fXX3aXX40XX5fXX3aXA1184 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTIFIED> .
+_:AX5fXX3aXX40XX5fXX3aXA1184 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1184 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#diff_type> .
+_:AX5fXX3aXX40XX5fXX3aXA1245 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#second> .
+_:AX5fXX3aXX40XX5fXX3aXA1245 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1245 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1306 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "21"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1306 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1307 .
+_:AX5fXX3aXX40XX5fXX3aXA1281 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#COORDINATED_TERM> .
+_:AX5fXX3aXX40XX5fXX3aXA1281 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1282 .
+_:AX5fXX3aXX40XX5fXX3aXA1342 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1343 .
+_:AX5fXX3aXX40XX5fXX3aXA1342 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "15"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1403 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1403 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#target_is_transaction> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#boolean> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#target_is_transaction> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA1130 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1130 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1130 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#value> .
+_:AX5fXX3aXX40XX5fXX3aXA1519 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "17"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1519 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1520 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "TOCD choice Quantifiable Observation Data ITem"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1223 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_WORLD_TIME> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_DATE_TIME"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> "DTValue attribute of DateTime"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1226 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#OMGHDTF> "COAS::DateTime"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> <http://www.w3.org/2000/01/rdf-schema#label> "FECHA Y HORA"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> "STR 3.7, 3.10"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1229 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Used for recording a precise point in real world time"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Represents an aboslute point in time, specified to the second. \nIn canonical form"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1231 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1225 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1228 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> <http://www.w3.org/2000/01/rdf-schema#label> "DATE TIME"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1230 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1224 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1227 .
+_:AX5fXX3aXX40XX5fXX3aXA1500 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1500 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1501 .
+_:AX5fXX3aXX40XX5fXX3aXA1149 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1149 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#value> .
+_:AX5fXX3aXX40XX5fXX3aXA1149 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1397 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1398 .
+_:AX5fXX3aXX40XX5fXX3aXA1397 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1458 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1459 .
+_:AX5fXX3aXX40XX5fXX3aXA1458 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "36"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#query> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#query> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_URI> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#query> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA1185 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1185 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1186 .
+_:AX5fXX3aXX40XX5fXX3aXA1494 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1494 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARSABLE> .
+_:AX5fXX3aXX40XX5fXX3aXA1246 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1246 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#fractional_second> .
+_:AX5fXX3aXX40XX5fXX3aXA1246 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1307 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "22"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1307 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1308 .
+_:AX5fXX3aXX40XX5fXX3aXA1282 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#CODE_PHRASE> .
+_:AX5fXX3aXX40XX5fXX3aXA1282 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1343 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1344 .
+_:AX5fXX3aXX40XX5fXX3aXA1343 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "16"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1404 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1405 .
+_:AX5fXX3aXX40XX5fXX3aXA1404 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1131 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CODED_TEXT> .
+_:AX5fXX3aXX40XX5fXX3aXA1131 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1131 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#value> .
+_:AX5fXX3aXX40XX5fXX3aXA1440 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "18"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1440 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1441 .
+_:AX5fXX3aXX40XX5fXX3aXA1501 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1501 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME_SPECIFICATION> .
+_:AX5fXX3aXX40XX5fXX3aXA1398 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1399 .
+_:AX5fXX3aXX40XX5fXX3aXA1398 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "10"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1459 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "37"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1459 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1460 .
+_:AX5fXX3aXX40XX5fXX3aXA1308 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1309 .
+_:AX5fXX3aXX40XX5fXX3aXA1308 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "23"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1186 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CUSTOMARY_QUANTITY> .
+_:AX5fXX3aXX40XX5fXX3aXA1186 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1187 .
+_:AX5fXX3aXX40XX5fXX3aXA1247 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#hour> .
+_:AX5fXX3aXX40XX5fXX3aXA1247 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1247 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1495 <http://www.w3.org/2002/07/owl#oneOf> _:AX5fXX3aXX40XX5fXX3aXA1496 .
+_:AX5fXX3aXX40XX5fXX3aXA1495 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DataRange> .
+_:AX5fXX3aXX40XX5fXX3aXA1283 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1284 .
+_:AX5fXX3aXX40XX5fXX3aXA1283 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1344 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1345 .
+_:AX5fXX3aXX40XX5fXX3aXA1344 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "17"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1405 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> .
+_:AX5fXX3aXX40XX5fXX3aXA1405 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1406 .
+_:AX5fXX3aXX40XX5fXX3aXA1132 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1132 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1132 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#denominator> .
+_:AX5fXX3aXX40XX5fXX3aXA1380 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "53"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1380 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1381 .
+_:AX5fXX3aXX40XX5fXX3aXA1441 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1442 .
+_:AX5fXX3aXX40XX5fXX3aXA1441 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "19"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1502 <http://www.w3.org/2002/07/owl#oneOf> _:AX5fXX3aXX40XX5fXX3aXA1503 .
+_:AX5fXX3aXX40XX5fXX3aXA1502 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DataRange> .
+_:AX5fXX3aXX40XX5fXX3aXA1399 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "11"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1399 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1400 .
+_:AX5fXX3aXX40XX5fXX3aXA1309 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "24"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1309 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1310 .
+_:AX5fXX3aXX40XX5fXX3aXA1187 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY> .
+_:AX5fXX3aXX40XX5fXX3aXA1187 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1248 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1248 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1249 .
+_:AX5fXX3aXX40XX5fXX3aXA1496 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> ">"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1496 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1497 .
+_:AX5fXX3aXX40XX5fXX3aXA1284 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1285 .
+_:AX5fXX3aXX40XX5fXX3aXA1284 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ENCAPSULATED> .
+_:AX5fXX3aXX40XX5fXX3aXA1345 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "18"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1345 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1346 .
+_:AX5fXX3aXX40XX5fXX3aXA1406 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1407 .
+_:AX5fXX3aXX40XX5fXX3aXA1406 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_WORLD_TIME> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_WORLD_TIME> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Used for recording dates and/or times in real world time"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_WORLD_TIME> <http://www.w3.org/2002/07/owl#equivalentClass> _:AX5fXX3aXX40XX5fXX3aXA1248 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_WORLD_TIME> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CUSTOMARY_QUANTITY> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_WORLD_TIME> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1251 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_WORLD_TIME> <http://www.w3.org/2000/01/rdf-schema#label> "WORLD TIME"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_WORLD_TIME> <http://www.w3.org/2000/01/rdf-schema#label> "HORA MUNDIAL"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_WORLD_TIME> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Abstract concept of time on the real world timeline. All dates assumed\nto be  in the Gregorian calendar"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_WORLD_TIME> <http://protege.stanford.edu/plugins/owl/protege#abstract> "true"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1133 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#numerator> .
+_:AX5fXX3aXX40XX5fXX3aXA1133 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1133 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1381 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1382 .
+_:AX5fXX3aXX40XX5fXX3aXA1381 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "54"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1442 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "20"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1442 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1443 .
+_:AX5fXX3aXX40XX5fXX3aXA1503 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1503 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1504 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#target> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#CODE_PHRASE> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#target> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#target> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1268 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#target> <http://www.w3.org/2000/01/rdf-schema#label> "target"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#target> <http://www.w3.org/2000/01/rdf-schema#label> "objetivo"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DATA_VALUE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Serves as a common ancestor of all data value types in openEHR models"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DATA_VALUE> <http://www.w3.org/2002/07/owl#equivalentClass> _:AX5fXX3aXX40XX5fXX3aXA1161 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DATA_VALUE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> "STR 3.1-3.13"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DATA_VALUE> <http://www.w3.org/2000/01/rdf-schema#label> "VALOR DE DATO"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DATA_VALUE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DATA_VALUE> <http://protege.stanford.edu/plugins/owl/protege#abstract> "true"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DATA_VALUE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "The Data_Item class in CEN is a mixture of DATA_VALUE and ELEMENT in openEHR"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DATA_VALUE> <http://www.w3.org/2000/01/rdf-schema#label> "DATA_VALUE"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DATA_VALUE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#OMGHDTF> "COAS::ObservationValue"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DATA_VALUE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "DataValue"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1230 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#year> .
+_:AX5fXX3aXX40XX5fXX3aXA1230 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1230 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1188 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1188 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#target_is_entry> .
+_:AX5fXX3aXX40XX5fXX3aXA1188 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME_SPECIFICATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1181 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME_SPECIFICATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "An abstract class of which all timing specifications are\nspecialisations. Specifies points in time, possibly linked to the calendar,\nor a real world repeating event, suc as \"breakfast\""^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME_SPECIFICATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DATA_VALUE> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME_SPECIFICATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> "STR 3.9"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME_SPECIFICATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1177 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME_SPECIFICATION> <http://www.w3.org/2000/01/rdf-schema#label> "ESPECIFICACION DE HORA"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME_SPECIFICATION> <http://www.w3.org/2002/07/owl#equivalentClass> _:AX5fXX3aXX40XX5fXX3aXA1178 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME_SPECIFICATION> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME_SPECIFICATION> <http://protege.stanford.edu/plugins/owl/protege#abstract> "true"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME_SPECIFICATION> <http://www.w3.org/2000/01/rdf-schema#label> "TIME SPECIFICATION"@en .
+_:AX5fXX3aXX40XX5fXX3aXA1249 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1250 .
+_:AX5fXX3aXX40XX5fXX3aXA1249 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> .
+_:AX5fXX3aXX40XX5fXX3aXA1497 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "="^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1497 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1498 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#target_is_composition> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_EHR_URI> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#target_is_composition> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#target_is_composition> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#boolean> .
+_:AX5fXX3aXX40XX5fXX3aXA1285 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1285 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> .
+_:AX5fXX3aXX40XX5fXX3aXA1346 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1347 .
+_:AX5fXX3aXX40XX5fXX3aXA1346 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "19"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1407 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> .
+_:AX5fXX3aXX40XX5fXX3aXA1407 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#range> <http://www.w3.org/2000/01/rdf-schema#label> "rango"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#range> <http://www.w3.org/2000/01/rdf-schema#label> "range"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#range> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_T> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#range> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#range> <http://www.w3.org/2000/01/rdf-schema#comment> "The data range for this meaning"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#range> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#REFERENCE_RANGE_T> .
+_:AX5fXX3aXX40XX5fXX3aXA1134 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#magnitude> .
+_:AX5fXX3aXX40XX5fXX3aXA1134 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1134 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1382 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "55"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1382 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1383 .
+_:AX5fXX3aXX40XX5fXX3aXA1443 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "21"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1443 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1444 .
+_:AX5fXX3aXX40XX5fXX3aXA1504 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1504 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1505 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#month_known> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARTIAL_DATE> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#month_known> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#month_known> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#boolean> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#month_known> <http://www.w3.org/2000/01/rdf-schema#label> "month known"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#month_known> <http://www.w3.org/2000/01/rdf-schema#label> "mes conocido"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_EHR_URI> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1190 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_EHR_URI> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1188 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_EHR_URI> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1192 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_EHR_URI> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_URI> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_EHR_URI> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1193 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_EHR_URI> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1189 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_EHR_URI> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1194 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_EHR_URI> <http://www.w3.org/2000/01/rdf-schema#label> "EHR_URI"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_EHR_URI> <http://www.w3.org/2000/01/rdf-schema#label> "EHR_URI"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_EHR_URI> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_EHR_URI> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1195 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_EHR_URI> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1191 .
+_:AX5fXX3aXX40XX5fXX3aXA1170 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1171 .
+_:AX5fXX3aXX40XX5fXX3aXA1170 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_STATE> .
+_:AX5fXX3aXX40XX5fXX3aXA1231 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1231 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#month> .
+_:AX5fXX3aXX40XX5fXX3aXA1231 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1189 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1189 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1189 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#target_is_ehr> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#hyperlink> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_URI> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#hyperlink> <http://www.w3.org/2000/01/rdf-schema#comment> "Optional link sitting behind a section of plain text or coded term item"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#hyperlink> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#hyperlink> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#hyperlink> <http://www.w3.org/2000/01/rdf-schema#label> "hipervinculo"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#hyperlink> <http://www.w3.org/2000/01/rdf-schema#label> "hyperlink"@en .
+_:AX5fXX3aXX40XX5fXX3aXA1498 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1499 .
+_:AX5fXX3aXX40XX5fXX3aXA1498 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "<"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#accuracy> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#float> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#accuracy> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTIFIED> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#accuracy> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA1286 <http://www.w3.org/2002/07/owl#oneOf> _:AX5fXX3aXX40XX5fXX3aXA1287 .
+_:AX5fXX3aXX40XX5fXX3aXA1286 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DataRange> .
+_:AX5fXX3aXX40XX5fXX3aXA1347 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1348 .
+_:AX5fXX3aXX40XX5fXX3aXA1347 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "20"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1408 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1409 .
+_:AX5fXX3aXX40XX5fXX3aXA1408 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#data> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#data> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA1135 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1135 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#sign> .
+_:AX5fXX3aXX40XX5fXX3aXA1135 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1505 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1506 .
+_:AX5fXX3aXX40XX5fXX3aXA1505 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1383 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "56"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1383 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1384 .
+_:AX5fXX3aXX40XX5fXX3aXA1444 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "22"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1444 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1445 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#formatting> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#formatting> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#formatting> <http://www.w3.org/2000/01/rdf-schema#label> "formatting"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#formatting> <http://www.w3.org/2000/01/rdf-schema#label> "cadena formateada"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#formatting> <http://www.w3.org/2000/01/rdf-schema#comment> "A format string of the form \"name:value; name:value...\"Values taken from W3C CSS2 properties lists"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#formatting> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> .
+_:AX5fXX3aXX40XX5fXX3aXA1171 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARAGRAPH> .
+_:AX5fXX3aXX40XX5fXX3aXA1171 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1172 .
+_:AX5fXX3aXX40XX5fXX3aXA1232 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1232 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://www.w3.org/2001/XMLSchema#boolean> .
+_:AX5fXX3aXX40XX5fXX3aXA1232 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#value> .
+_:AX5fXX3aXX40XX5fXX3aXA1480 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1481 .
+_:AX5fXX3aXX40XX5fXX3aXA1480 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "58"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1499 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1499 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "?"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1287 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1288 .
+_:AX5fXX3aXX40XX5fXX3aXA1287 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1348 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1349 .
+_:AX5fXX3aXX40XX5fXX3aXA1348 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "21"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1409 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_COUNT> .
+_:AX5fXX3aXX40XX5fXX3aXA1409 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1410 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#scheme> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#scheme> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#scheme> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_URI> .
+_:AX5fXX3aXX40XX5fXX3aXA1136 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1136 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1136 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#minutes> .
+_:AX5fXX3aXX40XX5fXX3aXA1384 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1385 .
+_:AX5fXX3aXX40XX5fXX3aXA1384 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "57"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1445 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "23"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1445 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1446 .
+_:AX5fXX3aXX40XX5fXX3aXA1506 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1506 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1507 .
+_:AX5fXX3aXX40XX5fXX3aXA1172 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY_RATIO> .
+_:AX5fXX3aXX40XX5fXX3aXA1172 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1233 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#value> .
+_:AX5fXX3aXX40XX5fXX3aXA1233 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1233 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1481 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1482 .
+_:AX5fXX3aXX40XX5fXX3aXA1481 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "59"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#thumbnail> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#thumbnail> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#thumbnail> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> .
+_:AX5fXX3aXX40XX5fXX3aXA1330 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1331 .
+_:AX5fXX3aXX40XX5fXX3aXA1330 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1288 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1289 .
+_:AX5fXX3aXX40XX5fXX3aXA1288 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1349 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "22"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1349 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1350 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARAGRAPH> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "is the standrad way for constructing longer text items in summaries, reports and so on"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARAGRAPH> <http://www.w3.org/2000/01/rdf-schema#label> "PARAGRAPH"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARAGRAPH> <http://www.w3.org/2000/01/rdf-schema#label> "PARRAFO"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARAGRAPH> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "A logical composite text value consisting of a series of DV_TEXTs, i.e. plain text potentially with simple formatting, to form a larger tract of prose, which may be interpreted for display purposes as a pargraph."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARAGRAPH> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> "STR 2.6"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARAGRAPH> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_PARAGRAPH"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARAGRAPH> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1143 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARAGRAPH> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DATA_VALUE> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARAGRAPH> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#fragment_id> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#fragment_id> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_URI> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#fragment_id> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#uri> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_URI> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#uri> <http://www.w3.org/2000/01/rdf-schema#label> "uri"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#uri> <http://www.w3.org/2000/01/rdf-schema#label> "uri"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#uri> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#uri> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA1137 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> .
+_:AX5fXX3aXX40XX5fXX3aXA1137 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#diff_type> .
+_:AX5fXX3aXX40XX5fXX3aXA1137 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1385 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "58"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1385 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1386 .
+_:AX5fXX3aXX40XX5fXX3aXA1446 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1447 .
+_:AX5fXX3aXX40XX5fXX3aXA1446 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "24"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1507 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1508 .
+_:AX5fXX3aXX40XX5fXX3aXA1507 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1173 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1173 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1173 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#code_string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CODED_TEXT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "A text item whose value must be a rubric drawn from a controlled terminology, the key of which is the definition attribute"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CODED_TEXT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#OMGHDTF> "COAS::CodedElement,, LooselyCodedElement"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CODED_TEXT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1160 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CODED_TEXT> <http://www.w3.org/2000/01/rdf-schema#label> "TEXTO CODIFICADO"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CODED_TEXT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "CD,CV,CS"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CODED_TEXT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> "STR 4.1,4.2,4.3"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CODED_TEXT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CODED_TEXT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_TERM_TEXT"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CODED_TEXT> <http://www.w3.org/2000/01/rdf-schema#label> "CODED TEXT"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CODED_TEXT> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CODED_TEXT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "Text"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CODED_TEXT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Can be used in place of DV_TEXT, effectively allowing the type DV_TEXT to mean a text item, which may optionally be coded."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CODED_TEXT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> "Text"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1234 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1234 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#compression_algorithm> .
+_:AX5fXX3aXX40XX5fXX3aXA1234 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1482 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1482 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "0"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#terminology_id> <http://www.w3.org/2000/01/rdf-schema#comment> "Identifier of the distinct terminology from which the code_string was extracted\nRange must be added in the common_RM because terminology_ID is defined there"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#terminology_id> <http://www.w3.org/2000/01/rdf-schema#label> "identificador de terminologia"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#terminology_id> <http://www.w3.org/2000/01/rdf-schema#label> "terminology id"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#terminology_id> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1280 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#terminology_id> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA1270 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_EHR_URI> .
+_:AX5fXX3aXX40XX5fXX3aXA1270 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_DV_DATE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1202 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_DV_DATE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_T> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_DV_DATE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1201 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_DV_DATE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_DV_DATE> <http://www.w3.org/2000/01/rdf-schema#label> "INTERVALO DE FECHA"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_DV_DATE> <http://www.w3.org/2000/01/rdf-schema#label> "INTERVAL DATE"@en .
+_:AX5fXX3aXX40XX5fXX3aXA1331 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1332 .
+_:AX5fXX3aXX40XX5fXX3aXA1331 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#COORDINATED_TERM> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> "STR 4.2"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#COORDINATED_TERM> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#COORDINATED_TERM> <http://www.w3.org/2000/01/rdf-schema#label> "COORDINATED TERM"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#COORDINATED_TERM> <http://www.w3.org/2000/01/rdf-schema#label> "TERMINO COORDINADO"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#COORDINATED_TERM> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "A fully coordinated term from a terminology service"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#COORDINATED_TERM> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1174 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#COORDINATED_TERM> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1173 .
+_:AX5fXX3aXX40XX5fXX3aXA1289 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1290 .
+_:AX5fXX3aXX40XX5fXX3aXA1289 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#target_is_ehr> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#target_is_ehr> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#boolean> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#target_is_ehr> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_EHR_URI> .
+_:AX5fXX3aXX40XX5fXX3aXA1138 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1138 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1138 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#hours> .
+_:AX5fXX3aXX40XX5fXX3aXA1386 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1387 .
+_:AX5fXX3aXX40XX5fXX3aXA1386 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "59"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1447 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1448 .
+_:AX5fXX3aXX40XX5fXX3aXA1447 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "25"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1508 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1509 .
+_:AX5fXX3aXX40XX5fXX3aXA1508 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1174 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1174 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#terminology_id> .
+_:AX5fXX3aXX40XX5fXX3aXA1174 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#CODE_PHRASE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> "STR 4.2"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#CODE_PHRASE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1142 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#CODE_PHRASE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#CODE_PHRASE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "A fully coordinated term from a terminology service"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1235 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1235 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1235 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#size> .
+_:AX5fXX3aXX40XX5fXX3aXA1483 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1484 .
+_:AX5fXX3aXX40XX5fXX3aXA1483 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1271 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1272 .
+_:AX5fXX3aXX40XX5fXX3aXA1271 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1332 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1333 .
+_:AX5fXX3aXX40XX5fXX3aXA1332 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1139 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1139 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#fractional_second> .
+_:AX5fXX3aXX40XX5fXX3aXA1139 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1387 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "0"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1387 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1448 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "26"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1448 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1449 .
+_:AX5fXX3aXX40XX5fXX3aXA1509 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1510 .
+_:AX5fXX3aXX40XX5fXX3aXA1509 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#section_id> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#section_id> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_EHR_URI> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#section_id> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA1175 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1175 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> .
+_:AX5fXX3aXX40XX5fXX3aXA1175 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#item> .
+_:AX5fXX3aXX40XX5fXX3aXA1236 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1236 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#integrity_check> .
+_:AX5fXX3aXX40XX5fXX3aXA1236 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1484 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> .
+_:AX5fXX3aXX40XX5fXX3aXA1484 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1485 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#items> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#LIST_DV_TEXT> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#items> <http://www.w3.org/2000/01/rdf-schema#comment> "Items making up the paragraph, each of which is a text item"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#items> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#items> <http://www.w3.org/2000/01/rdf-schema#label> "elementos"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#items> <http://www.w3.org/2000/01/rdf-schema#label> "items"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#items> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARAGRAPH> .
+_:AX5fXX3aXX40XX5fXX3aXA1272 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_WORLD_TIME> .
+_:AX5fXX3aXX40XX5fXX3aXA1272 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1333 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1334 .
+_:AX5fXX3aXX40XX5fXX3aXA1333 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARSABLE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Used ofr representing values which are formal textural representations (e.g. guidelines)"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARSABLE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARSABLE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Encapsulated data expressed as a parsable STRING. The internal \nmodel of the data item is not described in the openEHR model in \ncommon with other encapsulated types, but in this case, the form \nof the data is assumed to be plaintext, rather than compressed or \nother types or large binary data"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARSABLE> <http://www.w3.org/2000/01/rdf-schema#label> "MANEJABLE"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARSABLE> <http://www.w3.org/2000/01/rdf-schema#label> "PARSABLE"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARSABLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1150 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARSABLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1149 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARSABLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1148 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARSABLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ENCAPSULATED> .
+_:AX5fXX3aXX40XX5fXX3aXA1430 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1431 .
+_:AX5fXX3aXX40XX5fXX3aXA1430 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1388 <http://www.w3.org/2002/07/owl#oneOf> _:AX5fXX3aXX40XX5fXX3aXA1389 .
+_:AX5fXX3aXX40XX5fXX3aXA1388 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DataRange> .
+_:AX5fXX3aXX40XX5fXX3aXA1449 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1450 .
+_:AX5fXX3aXX40XX5fXX3aXA1449 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "27"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1176 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#month_known> .
+_:AX5fXX3aXX40XX5fXX3aXA1176 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1176 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1237 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#thumbnail> .
+_:AX5fXX3aXX40XX5fXX3aXA1237 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1237 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1485 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE> .
+_:AX5fXX3aXX40XX5fXX3aXA1485 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#LIST_TERM_MAPPING> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#LIST_T> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#LIST_TERM_MAPPING> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1222 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#LIST_TERM_MAPPING> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1273 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1273 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1274 .
+_:AX5fXX3aXX40XX5fXX3aXA1334 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1335 .
+_:AX5fXX3aXX40XX5fXX3aXA1334 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#size> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ENCAPSULATED> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#size> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#integer> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#size> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#size> <http://www.w3.org/2000/01/rdf-schema#label> "tama\u00F1o"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#size> <http://www.w3.org/2000/01/rdf-schema#label> "size"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#path> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#path> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#path> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_URI> .
+_:AX5fXX3aXX40XX5fXX3aXA1370 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "43"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1370 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1371 .
+_:AX5fXX3aXX40XX5fXX3aXA1431 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1432 .
+_:AX5fXX3aXX40XX5fXX3aXA1431 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1389 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1389 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1390 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#purpose> <http://www.w3.org/2000/01/rdf-schema#label> "purpose"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#purpose> <http://www.w3.org/2000/01/rdf-schema#label> "proposito"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#purpose> <http://www.w3.org/2000/01/rdf-schema#comment> "Purpose of the mapping. e.g. automated data mining, billing, interoperability..."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#purpose> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CODED_TEXT> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#purpose> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#TERM_MAPPING> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#purpose> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA1177 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARSABLE> .
+_:AX5fXX3aXX40XX5fXX3aXA1177 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1177 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#value> .
+_:AX5fXX3aXX40XX5fXX3aXA1238 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#alternate_text> .
+_:AX5fXX3aXX40XX5fXX3aXA1238 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1238 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1486 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1486 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1487 .
+_:AX5fXX3aXX40XX5fXX3aXA1274 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1275 .
+_:AX5fXX3aXX40XX5fXX3aXA1274 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ENCAPSULATED> .
+_:AX5fXX3aXX40XX5fXX3aXA1335 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1336 .
+_:AX5fXX3aXX40XX5fXX3aXA1335 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1371 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1372 .
+_:AX5fXX3aXX40XX5fXX3aXA1371 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "44"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1432 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "10"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1432 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1433 .
+_:AX5fXX3aXX40XX5fXX3aXA1220 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1220 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_COUNT> .
+_:AX5fXX3aXX40XX5fXX3aXA1220 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#diff_type> .
+_:AX5fXX3aXX40XX5fXX3aXA1178 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1179 .
+_:AX5fXX3aXX40XX5fXX3aXA1178 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1239 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1239 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1239 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#integrity_check_algorithm> .
+_:AX5fXX3aXX40XX5fXX3aXA1487 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME_SPECIFICATION> .
+_:AX5fXX3aXX40XX5fXX3aXA1487 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1488 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#is_simple> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1320 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#is_simple> <http://www.w3.org/2000/01/rdf-schema#comment> "True if this quantity has no reference ranges, or accuracy"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#is_simple> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#boolean> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#is_simple> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA1275 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> .
+_:AX5fXX3aXX40XX5fXX3aXA1275 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1336 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1337 .
+_:AX5fXX3aXX40XX5fXX3aXA1336 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#month> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1401 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#month> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#month> <http://www.w3.org/2000/01/rdf-schema#range> _:AX5fXX3aXX40XX5fXX3aXA1388 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#month> <http://www.w3.org/2000/01/rdf-schema#label> "month"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#month> <http://www.w3.org/2000/01/rdf-schema#label> "mes"@es .
+_:AX5fXX3aXX40XX5fXX3aXA1372 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "45"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1372 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1373 .
+_:AX5fXX3aXX40XX5fXX3aXA1433 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1434 .
+_:AX5fXX3aXX40XX5fXX3aXA1433 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "11"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#year> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#year> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#integer> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#year> <http://www.w3.org/2000/01/rdf-schema#label> ""@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#year> <http://www.w3.org/2000/01/rdf-schema#label> "year"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#year> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1483 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#is_normal> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#is_normal> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#boolean> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#is_normal> <http://www.w3.org/2000/01/rdf-schema#comment> "Value is in the normal range if ther is one, otherwise True"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#is_normal> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1322 .
+_:AX5fXX3aXX40XX5fXX3aXA1221 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#item> .
+_:AX5fXX3aXX40XX5fXX3aXA1221 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> .
+_:AX5fXX3aXX40XX5fXX3aXA1221 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1160 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#defining_code> .
+_:AX5fXX3aXX40XX5fXX3aXA1160 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1160 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1179 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PERIODIC_TIME_SPECIFICATION> .
+_:AX5fXX3aXX40XX5fXX3aXA1179 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1180 .
+_:AX5fXX3aXX40XX5fXX3aXA1530 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1531 .
+_:AX5fXX3aXX40XX5fXX3aXA1530 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#seconds> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#seconds> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#seconds> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#seconds> <http://www.w3.org/2000/01/rdf-schema#label> "segundos"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#seconds> <http://www.w3.org/2000/01/rdf-schema#label> "seconds"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#institution_specified> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1500 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#institution_specified> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#institution_specified> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#boolean> .
+_:AX5fXX3aXX40XX5fXX3aXA1488 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1489 .
+_:AX5fXX3aXX40XX5fXX3aXA1488 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_BOOLEAN> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#code_string> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#code_string> <http://www.w3.org/2000/01/rdf-schema#label> "cadena codificada"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#code_string> <http://www.w3.org/2000/01/rdf-schema#label> "code string"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#code_string> <http://www.w3.org/2000/01/rdf-schema#comment> "The key used by the terminology service to identify a concept or coordination of concepts. Is most likely parsable inside the terminology service, but nothing can be assumed about its syntax outside that context."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#code_string> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1416 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#code_string> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA1276 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1277 .
+_:AX5fXX3aXX40XX5fXX3aXA1276 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1337 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1338 .
+_:AX5fXX3aXX40XX5fXX3aXA1337 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "10"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PHYSICAL_DATA> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PHYSICAL_DATA> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DATA_VALUE> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#SET_DV_TEXT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1175 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#SET_DV_TEXT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#SET_T> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#SET_DV_TEXT> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1373 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1374 .
+_:AX5fXX3aXX40XX5fXX3aXA1373 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "46"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1434 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "12"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1434 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1435 .
+_:AX5fXX3aXX40XX5fXX3aXA1161 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1161 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1162 .
+_:AX5fXX3aXX40XX5fXX3aXA1222 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#TERM_MAPPING> .
+_:AX5fXX3aXX40XX5fXX3aXA1222 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1222 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#item> .
+_:AX5fXX3aXX40XX5fXX3aXA1470 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1471 .
+_:AX5fXX3aXX40XX5fXX3aXA1470 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "48"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1531 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MEASURABLE> .
+_:AX5fXX3aXX40XX5fXX3aXA1531 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1532 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDERED> <http://protege.stanford.edu/plugins/owl/protege#abstract> "true"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDERED> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDERED> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Abstract class defining the concept of ordered values, which includes ordinals as well as true quantities. It defines the functions less_tan and is_strictly_comparable_to, the latter of which must evaluate to True for isntances being compared with the less_than function, or used as limits in the DV_INTERVAL_T"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDERED> <http://www.w3.org/2000/01/rdf-schema#label> "VALORES DE ORDEN"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDERED> <http://www.w3.org/2000/01/rdf-schema#label> "ORDERED"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDERED> <http://www.w3.org/2002/07/owl#equivalentClass> _:AX5fXX3aXX40XX5fXX3aXA1261 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDERED> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1260 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDERED> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DATA_VALUE> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDERED> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Data value types which are to be used as limits in the DV_INTERVAL_T\nclass must inherit from this class, and implement the function \nis_strictly_comparable_to to ensure that instances compare meaningfully."^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1489 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1490 .
+_:AX5fXX3aXX40XX5fXX3aXA1489 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1243 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME> <http://www.w3.org/2000/01/rdf-schema#label> "HORA"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1244 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Used ofr recording real world times, rather than scientically measured fine amounts of time"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "TS"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> "STR 3.7, 3.10"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_WORLD_TIME> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1245 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> "DTValue attribute of DateTime"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1246 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Represents an aboslute point in time from an origin usually interpreted\nas meaning the start of the cuyrrent day, specified to the second"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1247 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "TOCD choice Quantifiable Observation Data Item"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME> <http://www.w3.org/2000/01/rdf-schema#label> "TIME"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#defining_code> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#CODE_PHRASE> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#defining_code> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#defining_code> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CODED_TEXT> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#defining_code> <http://www.w3.org/2000/01/rdf-schema#comment> "The term which the value attribute is the textual rendition of"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#defining_code> <http://www.w3.org/2000/01/rdf-schema#label> "definicion"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#defining_code> <http://www.w3.org/2000/01/rdf-schema#label> "definition"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_BOOLEAN> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "For such data, it is important to devise the meanings (usually questions in subjective data) carefully, so that the only allowed results are in fact true or false"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_BOOLEAN> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "BL"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_BOOLEAN> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Items which are truly boolean data, such as true/false of yes/no answers"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_BOOLEAN> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> "A special use of the Numeric class is defined to represent the Boolean data type, limiting the permitted values to zero or one."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_BOOLEAN> <http://www.w3.org/2000/01/rdf-schema#label> "LOGICO"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_BOOLEAN> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1232 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_BOOLEAN> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1233 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_BOOLEAN> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "Not provided as a subtype of Data Item"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_BOOLEAN> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#MisUse> "Should not be used as a replacement for naively modelled enumerated types such as male/female etc... Such values whould be coded, and in any case the enumeration often has more than two values."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_BOOLEAN> <http://www.w3.org/2000/01/rdf-schema#label> "BOOLEAN"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_BOOLEAN> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DATA_VALUE> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_BOOLEAN> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1277 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1278 .
+_:AX5fXX3aXX40XX5fXX3aXA1277 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_COUNT> .
+_:AX5fXX3aXX40XX5fXX3aXA1338 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "11"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1338 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1339 .
+_:AX5fXX3aXX40XX5fXX3aXA1126 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1126 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1126 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#match> .
+_:AX5fXX3aXX40XX5fXX3aXA1374 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "47"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1374 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1375 .
+_:AX5fXX3aXX40XX5fXX3aXA1435 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "13"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1435 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1436 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#integrity_check> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#integrity_check> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#integrity_check> <http://www.w3.org/2000/01/rdf-schema#label> "chequeo de integridad"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#integrity_check> <http://www.w3.org/2000/01/rdf-schema#label> "integrity check"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#LIST_DV_TEXT> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#LIST_DV_TEXT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#LIST_T> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#LIST_DV_TEXT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1221 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#organiser_id> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#organiser_id> <http://www.w3.org/2000/01/rdf-schema#label> "organiser_id"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#organiser_id> <http://www.w3.org/2000/01/rdf-schema#label> "id de organizador"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#organiser_id> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA1162 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDERED> .
+_:AX5fXX3aXX40XX5fXX3aXA1162 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1163 .
+_:AX5fXX3aXX40XX5fXX3aXA1223 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1223 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1223 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#hour> .
+_:AX5fXX3aXX40XX5fXX3aXA1471 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "49"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1471 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1472 .
+_:AX5fXX3aXX40XX5fXX3aXA1532 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1532 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#LIST_REFERENCE_RANGE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#LIST_T> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#LIST_REFERENCE_RANGE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1151 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#LIST_REFERENCE_RANGE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1320 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1321 .
+_:AX5fXX3aXX40XX5fXX3aXA1320 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1278 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY> .
+_:AX5fXX3aXX40XX5fXX3aXA1278 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1279 .
+_:AX5fXX3aXX40XX5fXX3aXA1339 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "12"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1339 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1340 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#accuracy_is_percent> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#accuracy_is_percent> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#boolean> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#accuracy_is_percent> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTIFIED> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CUSTOMARY_QUANTITY> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Abstract parent class of quantity types which are expressed in a form other than the estandrad scientific"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CUSTOMARY_QUANTITY> <http://www.w3.org/2000/01/rdf-schema#label> "CANTIDAD PERSONALIZADA"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CUSTOMARY_QUANTITY> <http://www.w3.org/2000/01/rdf-schema#label> "CUSTOMARY QUANTITY"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CUSTOMARY_QUANTITY> <http://www.w3.org/2002/07/owl#equivalentClass> _:AX5fXX3aXX40XX5fXX3aXA1144 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CUSTOMARY_QUANTITY> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CUSTOMARY_QUANTITY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MEASURABLE> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CUSTOMARY_QUANTITY> <http://protege.stanford.edu/plugins/owl/protege#abstract> "true"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1127 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#purpose> .
+_:AX5fXX3aXX40XX5fXX3aXA1127 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1127 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1375 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1376 .
+_:AX5fXX3aXX40XX5fXX3aXA1375 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "48"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1436 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "14"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1436 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1437 .
+_:AX5fXX3aXX40XX5fXX3aXA1163 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1164 .
+_:AX5fXX3aXX40XX5fXX3aXA1163 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_T> .
+_:AX5fXX3aXX40XX5fXX3aXA1224 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1224 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1224 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#day> .
+_:AX5fXX3aXX40XX5fXX3aXA1472 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1473 .
+_:AX5fXX3aXX40XX5fXX3aXA1472 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "50"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1260 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1260 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1260 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#reference_ranges> .
+_:AX5fXX3aXX40XX5fXX3aXA1321 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDERED> .
+_:AX5fXX3aXX40XX5fXX3aXA1321 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1279 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1279 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTIFIED> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARTIAL_DATE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1176 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARTIAL_DATE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARTIAL_DATE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Used for approximate birth dates, dates of death, etc..."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARTIAL_DATE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Represents a partially known date. All partial dates have an unknown day,\nby definition, else they would be represented as normal dates. The mont_known\nflag indicates whether the month is also unknown"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARTIAL_DATE> <http://www.w3.org/2000/01/rdf-schema#label> "PARTIAL DATE"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARTIAL_DATE> <http://www.w3.org/2000/01/rdf-schema#label> "FECHA PARCIAL"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARTIAL_DATE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARTIAL_DATE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> "STR 3.8"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARTIAL_DATE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> "DateTime.FromDate"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1128 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1128 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#target> .
+_:AX5fXX3aXX40XX5fXX3aXA1128 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1376 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "49"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1376 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1377 .
+_:AX5fXX3aXX40XX5fXX3aXA1437 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1438 .
+_:AX5fXX3aXX40XX5fXX3aXA1437 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "15"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1164 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_BOOLEAN> .
+_:AX5fXX3aXX40XX5fXX3aXA1164 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1165 .
+_:AX5fXX3aXX40XX5fXX3aXA1225 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> .
+_:AX5fXX3aXX40XX5fXX3aXA1225 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1225 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#diff_type> .
+_:AX5fXX3aXX40XX5fXX3aXA1473 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "51"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1473 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1474 .
+_:AX5fXX3aXX40XX5fXX3aXA1261 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1261 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1262 .
+_:AX5fXX3aXX40XX5fXX3aXA1322 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1323 .
+_:AX5fXX3aXX40XX5fXX3aXA1322 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDINAL> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDERED> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDINAL> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1253 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDINAL> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "QTY"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDINAL> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> "STR 3.2"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDINAL> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1252 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDINAL> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "for recording any clinical datum which is customarily recorded using symbolic values. e.g. the results on a urinalysis strip ^neg, trace, +, ++,++++ are used for leucocytes, protein, nitrites etc..."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDINAL> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDINAL> <http://www.w3.org/2000/01/rdf-schema#label> "ORDINAL"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDINAL> <http://www.w3.org/2000/01/rdf-schema#label> "ORDINAL"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDINAL> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Models rankings and scores, e.g. pain, Apgar values, etc"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1129 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1129 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#is_terminal> .
+_:AX5fXX3aXX40XX5fXX3aXA1129 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1377 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1378 .
+_:AX5fXX3aXX40XX5fXX3aXA1377 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "50"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1438 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1439 .
+_:AX5fXX3aXX40XX5fXX3aXA1438 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "16"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#language> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#language> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1283 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#language> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#CODE_PHRASE> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#language> <http://www.w3.org/2000/01/rdf-schema#label> "idioma"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#language> <http://www.w3.org/2000/01/rdf-schema#label> "language"@en .
+_:AX5fXX3aXX40XX5fXX3aXA1165 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1166 .
+_:AX5fXX3aXX40XX5fXX3aXA1165 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ENCAPSULATED> .
+_:AX5fXX3aXX40XX5fXX3aXA1226 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1226 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#second> .
+_:AX5fXX3aXX40XX5fXX3aXA1226 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1474 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1475 .
+_:AX5fXX3aXX40XX5fXX3aXA1474 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "52"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_DV_DATE_TIME> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_DV_DATE_TIME> <http://www.w3.org/2000/01/rdf-schema#label> "INTERVAL DATE TIME"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_DV_DATE_TIME> <http://www.w3.org/2000/01/rdf-schema#label> "INTERVALO DE FECHA Y HORA"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_DV_DATE_TIME> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1204 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_DV_DATE_TIME> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_T> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_DV_DATE_TIME> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1203 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#days> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#days> <http://www.w3.org/2000/01/rdf-schema#label> ""@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#days> <http://www.w3.org/2000/01/rdf-schema#label> "days"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#days> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#days> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> .
+_:AX5fXX3aXX40XX5fXX3aXA1262 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTIFIED> .
+_:AX5fXX3aXX40XX5fXX3aXA1262 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1263 .
+_:AX5fXX3aXX40XX5fXX3aXA1323 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1323 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDERED> .
+_:AX5fXX3aXX40XX5fXX3aXA1420 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1421 .
+_:AX5fXX3aXX40XX5fXX3aXA1420 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> .
+_:AX5fXX3aXX40XX5fXX3aXA1439 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "17"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1439 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1440 .
+_:AX5fXX3aXX40XX5fXX3aXA1378 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1379 .
+_:AX5fXX3aXX40XX5fXX3aXA1378 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "51"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#match> <http://www.w3.org/2000/01/rdf-schema#comment> "The relative match of the target term with respect to the mapped text item. Result meanings\n+1: mapping is to a broader ter\n0: mapping is to a equivalent to the original item\n-1:the mapping is to a narrower term"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#match> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#match> <http://www.w3.org/2000/01/rdf-schema#range> _:AX5fXX3aXX40XX5fXX3aXA1495 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#match> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#TERM_MAPPING> .
+_:AX5fXX3aXX40XX5fXX3aXA1166 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> .
+_:AX5fXX3aXX40XX5fXX3aXA1166 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1167 .
+_:AX5fXX3aXX40XX5fXX3aXA1227 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#magnitude> .
+_:AX5fXX3aXX40XX5fXX3aXA1227 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1227 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1475 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1476 .
+_:AX5fXX3aXX40XX5fXX3aXA1475 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "53"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1263 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDINAL> .
+_:AX5fXX3aXX40XX5fXX3aXA1263 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1324 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1324 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1325 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#formalism> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARSABLE> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#formalism> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#formalism> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#formalism> <http://www.w3.org/2000/01/rdf-schema#label> "formato"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#formalism> <http://www.w3.org/2000/01/rdf-schema#label> "formalism"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_STATE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1131 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_STATE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "The component Annotation Life Cycle was intended to permit architectural components to include a reference to this aspect of state."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_STATE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DATA_VALUE> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_STATE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "For representing state values which obey a defined state machine, such as a variable representing the states of an instruction or care process"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_STATE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1129 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_STATE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1130 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_STATE> <http://www.w3.org/2000/01/rdf-schema#label> "STATE"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_STATE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> "The element class includes an attribute LifeCycle to indicate the lifecycle of an instruction or action, with permitted values taken from the ENV13606-2 Domain Termlist Component Annotation of the same name"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_STATE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Is expressed as a string but its values are driven by archetype-defined state machines. This provides a powerful way of capturing stateful complex processes in simple data"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_STATE> <http://www.w3.org/2000/01/rdf-schema#label> "ESTADO"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_STATE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1360 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "33"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1360 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1361 .
+_:AX5fXX3aXX40XX5fXX3aXA1421 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME> .
+_:AX5fXX3aXX40XX5fXX3aXA1421 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1379 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "52"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1379 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1380 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1234 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_MULTIMEDIA_DATA"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> "STR 3.1"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "A specialisation of DV_ENCAPSULATED for audiviosual and biosignal \ntypes. Includes further metadata relating to multimedia types which are\nnot applicalbe ot other subtypes of DV_ENCAPSULATED"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1239 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1240 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1241 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> "The Bulky Data class provides for the representation and storage of all binary data classified by its MIME type"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1235 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1237 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1236 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> <http://www.w3.org/2000/01/rdf-schema#label> "MULTIMEDIA"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> <http://www.w3.org/2000/01/rdf-schema#label> "MULTIMEDIA"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1238 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1242 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "ED"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ENCAPSULATED> .
+_:AX5fXX3aXX40XX5fXX3aXA1167 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1168 .
+_:AX5fXX3aXX40XX5fXX3aXA1167 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_URI> .
+_:AX5fXX3aXX40XX5fXX3aXA1228 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1228 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1228 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#fractional_second> .
+_:AX5fXX3aXX40XX5fXX3aXA1476 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1477 .
+_:AX5fXX3aXX40XX5fXX3aXA1476 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "54"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#meaning> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#REFERENCE_RANGE_T> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#meaning> <http://www.w3.org/2000/01/rdf-schema#comment> "Term whose value indicates the meaning of this range (normal, critical, therapeutic...)"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#meaning> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#meaning> <http://www.w3.org/2000/01/rdf-schema#label> "significado"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#meaning> <http://www.w3.org/2000/01/rdf-schema#label> "meaning"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#meaning> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> .
+_:AX5fXX3aXX40XX5fXX3aXA1264 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1264 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#range> .
+_:AX5fXX3aXX40XX5fXX3aXA1264 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#denominator> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY_RATIO> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#denominator> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTIFIED> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#denominator> <http://www.w3.org/2000/01/rdf-schema#label> "denominador"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#denominator> <http://www.w3.org/2000/01/rdf-schema#label> "denominator"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#denominator> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA1325 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> .
+_:AX5fXX3aXX40XX5fXX3aXA1325 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1326 .
+_:AX5fXX3aXX40XX5fXX3aXA1361 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1362 .
+_:AX5fXX3aXX40XX5fXX3aXA1361 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "34"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1422 <http://www.w3.org/2002/07/owl#oneOf> _:AX5fXX3aXX40XX5fXX3aXA1423 .
+_:AX5fXX3aXX40XX5fXX3aXA1422 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DataRange> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#magnitude> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1408 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#magnitude> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#magnitude> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#double> .
+_:AX5fXX3aXX40XX5fXX3aXA1210 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1211 .
+_:AX5fXX3aXX40XX5fXX3aXA1210 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#hours> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#integer> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#hours> <http://www.w3.org/2000/01/rdf-schema#label> "horas"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#hours> <http://www.w3.org/2000/01/rdf-schema#label> "hours"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#hours> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#hours> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> .
+_:AX5fXX3aXX40XX5fXX3aXA1168 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME_SPECIFICATION> .
+_:AX5fXX3aXX40XX5fXX3aXA1168 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1169 .
+_:AX5fXX3aXX40XX5fXX3aXA1229 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1229 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1229 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#minute> .
+_:AX5fXX3aXX40XX5fXX3aXA1477 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "55"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1477 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1478 .
+_:AX5fXX3aXX40XX5fXX3aXA1265 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1265 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1265 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#meaning> .
+_:AX5fXX3aXX40XX5fXX3aXA1326 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME> .
+_:AX5fXX3aXX40XX5fXX3aXA1326 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1362 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "35"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1362 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1363 .
+_:AX5fXX3aXX40XX5fXX3aXA1423 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1423 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1424 .
+_:AX5fXX3aXX40XX5fXX3aXA1150 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1150 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#value> .
+_:AX5fXX3aXX40XX5fXX3aXA1150 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#STRING> .
+_:AX5fXX3aXX40XX5fXX3aXA1211 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1212 .
+_:AX5fXX3aXX40XX5fXX3aXA1211 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> .
+_:AX5fXX3aXX40XX5fXX3aXA1169 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1170 .
+_:AX5fXX3aXX40XX5fXX3aXA1169 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PHYSICAL_DATA> .
+_:AX5fXX3aXX40XX5fXX3aXA1520 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1521 .
+_:AX5fXX3aXX40XX5fXX3aXA1520 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "18"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1478 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1479 .
+_:AX5fXX3aXX40XX5fXX3aXA1478 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "56"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#composition_id> <http://www.w3.org/2000/01/rdf-schema#label> "id de transaccion"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#composition_id> <http://www.w3.org/2000/01/rdf-schema#label> "transaction id"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#composition_id> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_EHR_URI> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#composition_id> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#composition_id> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA1266 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#lower> .
+_:AX5fXX3aXX40XX5fXX3aXA1266 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1266 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDERED> .
+_:AX5fXX3aXX40XX5fXX3aXA1327 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DataRange> .
+_:AX5fXX3aXX40XX5fXX3aXA1327 <http://www.w3.org/2002/07/owl#oneOf> _:AX5fXX3aXX40XX5fXX3aXA1328 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#minute> <http://www.w3.org/2000/01/rdf-schema#range> _:AX5fXX3aXX40XX5fXX3aXA1422 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#minute> <http://www.w3.org/2000/01/rdf-schema#label> "minuto"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#minute> <http://www.w3.org/2000/01/rdf-schema#label> "minute"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#minute> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1419 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#minute> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA1363 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1364 .
+_:AX5fXX3aXX40XX5fXX3aXA1363 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "36"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1424 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1425 .
+_:AX5fXX3aXX40XX5fXX3aXA1424 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#target_is_entry> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#target_is_entry> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#boolean> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#target_is_entry> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_EHR_URI> .
+_:AX5fXX3aXX40XX5fXX3aXA1460 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1461 .
+_:AX5fXX3aXX40XX5fXX3aXA1460 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "38"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1151 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#REFERENCE_RANGE_T> .
+_:AX5fXX3aXX40XX5fXX3aXA1151 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#item> .
+_:AX5fXX3aXX40XX5fXX3aXA1151 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1212 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1212 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARSABLE> .
+_:AX5fXX3aXX40XX5fXX3aXA1521 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1522 .
+_:AX5fXX3aXX40XX5fXX3aXA1521 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "19"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#alternate_text> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#alternate_text> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#alternate_text> <http://www.w3.org/2000/01/rdf-schema#label> "texto alternativo"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#alternate_text> <http://www.w3.org/2000/01/rdf-schema#label> "alternate text"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#alternate_text> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#fractional_second> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1404 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#fractional_second> <http://www.w3.org/2000/01/rdf-schema#label> "fractional second"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#fractional_second> <http://www.w3.org/2000/01/rdf-schema#label> "fraccion de segundo"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#fractional_second> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#fractional_second> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#double> .
+_:AX5fXX3aXX40XX5fXX3aXA1479 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1480 .
+_:AX5fXX3aXX40XX5fXX3aXA1479 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "57"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1267 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#upper> .
+_:AX5fXX3aXX40XX5fXX3aXA1267 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1267 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDERED> .
+_:AX5fXX3aXX40XX5fXX3aXA1328 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1328 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1329 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#calendar_alignment> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#calendar_alignment> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1414 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#calendar_alignment> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA1364 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1365 .
+_:AX5fXX3aXX40XX5fXX3aXA1364 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "37"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1425 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1426 .
+_:AX5fXX3aXX40XX5fXX3aXA1425 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#mappings> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#mappings> <http://www.w3.org/2000/01/rdf-schema#label> "mappings"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#mappings> <http://www.w3.org/2000/01/rdf-schema#label> "mapeos"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#mappings> <http://www.w3.org/2000/01/rdf-schema#comment> "terms from other terminologis most closely matching this term, typically used where the originator of information uses a local terminology but also supplies one or more equivalents from well-know terminologies"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#mappings> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#LIST_TERM_MAPPING> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#mappings> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY_RATIO> <http://www.w3.org/2000/01/rdf-schema#label> "RAZON DE CANTIDADES"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY_RATIO> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Models a ratio of quantities"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY_RATIO> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Used for recording specified administration dosages (e.g. 5mg/100ml),\ndrug amounts based on body weight (e.g. 1 tabledt/10kg),\nand titers (e.g. 1:128)\nNote that the units representation in sigle QUANTITYs caters for any ratio\nin which the units are expressible in unitary form.\nSo a QUANTITY_RATIO of 2g/250ml could be expressed as a \nQUANTITY of 8g/l"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY_RATIO> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#OMGHDTF> "COAS::Ratio"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY_RATIO> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1132 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY_RATIO> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY_RATIO> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1133 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY_RATIO> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#MisUse> "Should not be used to represent thigs like blood pressure\nwhich are often written using a '/' character, giving the misleading\nimpression that the item is a ratio, when in fact it is a structured value."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY_RATIO> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_QUANTITY_RATIO"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY_RATIO> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "Ratio (RTO)"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY_RATIO> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DATA_VALUE> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY_RATIO> <http://www.w3.org/2000/01/rdf-schema#label> "QUANTITY RATIO"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY_RATIO> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> "STR 3.6"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY_RATIO> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> "Numeric"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1152 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#language> .
+_:AX5fXX3aXX40XX5fXX3aXA1152 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1152 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#CODE_PHRASE> .
+_:AX5fXX3aXX40XX5fXX3aXA1213 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#value> .
+_:AX5fXX3aXX40XX5fXX3aXA1213 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1213 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#STRING> .
+_:AX5fXX3aXX40XX5fXX3aXA1461 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "39"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1461 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1462 .
+_:AX5fXX3aXX40XX5fXX3aXA1522 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1523 .
+_:AX5fXX3aXX40XX5fXX3aXA1522 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "20"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1310 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "25"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1310 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1311 .
+_:AX5fXX3aXX40XX5fXX3aXA1268 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1268 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1269 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#REFERENCE_RANGE_T> <http://www.w3.org/2000/01/rdf-schema#label> "RANGO DE REFERENCIA"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#REFERENCE_RANGE_T> <http://www.w3.org/2000/01/rdf-schema#label> "REFERENCE RANGE"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#REFERENCE_RANGE_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1265 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#REFERENCE_RANGE_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1264 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#REFERENCE_RANGE_T> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Defines a named range to be associate with any ORDERED datum Each such range is particular to the patient and context, and any other factor which affects ranges "^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#REFERENCE_RANGE_T> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "May be used to represent normal, therapeutic, dangerous, critical etc ranges"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#REFERENCE_RANGE_T> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> "STR 3.13"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#REFERENCE_RANGE_T> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1329 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1330 .
+_:AX5fXX3aXX40XX5fXX3aXA1329 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1365 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "38"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1365 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1366 .
+_:AX5fXX3aXX40XX5fXX3aXA1426 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1426 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1427 .
+_:AX5fXX3aXX40XX5fXX3aXA1153 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#hyperlink> .
+_:AX5fXX3aXX40XX5fXX3aXA1153 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1153 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1523 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "21"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1523 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1524 .
+_:AX5fXX3aXX40XX5fXX3aXA1214 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1214 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1214 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#value> .
+_:AX5fXX3aXX40XX5fXX3aXA1462 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1463 .
+_:AX5fXX3aXX40XX5fXX3aXA1462 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "40"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#charset> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#charset> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#CODE_PHRASE> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#charset> <http://www.w3.org/2000/01/rdf-schema#label> "charset"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#charset> <http://www.w3.org/2000/01/rdf-schema#label> ""@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#charset> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1273 .
+_:AX5fXX3aXX40XX5fXX3aXA1250 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME> .
+_:AX5fXX3aXX40XX5fXX3aXA1250 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1311 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1312 .
+_:AX5fXX3aXX40XX5fXX3aXA1311 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "26"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1269 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#TERM_MAPPING> .
+_:AX5fXX3aXX40XX5fXX3aXA1269 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1270 .
+_:AX5fXX3aXX40XX5fXX3aXA1366 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1367 .
+_:AX5fXX3aXX40XX5fXX3aXA1366 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "39"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1427 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1428 .
+_:AX5fXX3aXX40XX5fXX3aXA1427 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1154 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1154 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1154 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#language> .
+_:AX5fXX3aXX40XX5fXX3aXA1215 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1215 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#scheme> .
+_:AX5fXX3aXX40XX5fXX3aXA1215 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1463 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "41"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1463 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1464 .
+_:AX5fXX3aXX40XX5fXX3aXA1524 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "22"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1524 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1525 .
+_:AX5fXX3aXX40XX5fXX3aXA1190 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1190 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#target_is_composition> .
+_:AX5fXX3aXX40XX5fXX3aXA1190 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1251 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1251 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#timezone> .
+_:AX5fXX3aXX40XX5fXX3aXA1251 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1312 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1313 .
+_:AX5fXX3aXX40XX5fXX3aXA1312 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "27"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_COUNT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1220 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_COUNT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1219 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_COUNT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTIFIED> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_COUNT> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_COUNT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "INT"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_COUNT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> "STR 3.2-3.4"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_COUNT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#MisUse> "Not used for amounts of physical entities (which all have units)"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_COUNT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Countable quantities"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_COUNT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Used for countable types such as pregnancies and steps (taken by a physiotherapy patient), number of cigarettes smoded in a day"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1367 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1368 .
+_:AX5fXX3aXX40XX5fXX3aXA1367 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "40"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1428 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1428 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1429 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DATA_VALUE> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_T> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_T> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> "STR 3.13"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_T> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_QUANTITY_RANGE"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_T> <http://www.w3.org/2000/01/rdf-schema#label> "INTERVALO DE T"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1266 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_T> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Generic class defining an interval of a comparable type.\nan interval is a contiguous subrange of a comparable base type"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1267 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTERVAL_T> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_T> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> "QuantityRange+ability to specify if the range is incusive or exclusive separately of the maximun and minimum values"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_T> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "IVL<T:QTY>"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_T> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "Time Interval"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_T> <http://www.w3.org/2000/01/rdf-schema#label> "INTERVAL T"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_T> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Used to define intervals"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1155 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#value> .
+_:AX5fXX3aXX40XX5fXX3aXA1155 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1155 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1216 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#query> .
+_:AX5fXX3aXX40XX5fXX3aXA1216 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1216 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1464 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1465 .
+_:AX5fXX3aXX40XX5fXX3aXA1464 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "42"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1525 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1526 .
+_:AX5fXX3aXX40XX5fXX3aXA1525 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "23"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#media_type> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#media_type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#media_type> <http://www.w3.org/2000/01/rdf-schema#label> "media type"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#media_type> <http://www.w3.org/2000/01/rdf-schema#label> "tipo de medio"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#media_type> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#CODE_PHRASE> .
+_:AX5fXX3aXX40XX5fXX3aXA1313 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "28"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1313 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1314 .
+_:AX5fXX3aXX40XX5fXX3aXA1191 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1191 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1191 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#entry_id> .
+_:AX5fXX3aXX40XX5fXX3aXA1252 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#value> .
+_:AX5fXX3aXX40XX5fXX3aXA1252 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1252 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl> <http://www.w3.org/2002/07/owl#imports> <http://protege.stanford.edu/plugins/owl/protege> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl> <http://www.w3.org/2002/07/owl#imports> <http://trajano.us.es/~isabel/EHR/Support_RM.owl> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl> <http://www.w3.org/2000/01/rdf-schema#comment> "The openEHR Data Types Reference Model\nBased on the Revision 1.7.3\nWritten in OWL by Isabel Rom\u00E1n\nNovember 2003"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Ontology> .
+_:AX5fXX3aXX40XX5fXX3aXA1410 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1411 .
+_:AX5fXX3aXX40XX5fXX3aXA1410 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY> .
+_:AX5fXX3aXX40XX5fXX3aXA1368 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "41"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1368 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1369 .
+_:AX5fXX3aXX40XX5fXX3aXA1429 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1429 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1430 .
+_:AX5fXX3aXX40XX5fXX3aXA1156 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1156 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#mappings> .
+_:AX5fXX3aXX40XX5fXX3aXA1156 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1217 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#fragment_id> .
+_:AX5fXX3aXX40XX5fXX3aXA1217 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1217 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1465 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "43"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1465 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1466 .
+_:AX5fXX3aXX40XX5fXX3aXA1526 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1526 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "24"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1192 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1192 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#composition_id> .
+_:AX5fXX3aXX40XX5fXX3aXA1192 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1253 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#value> .
+_:AX5fXX3aXX40XX5fXX3aXA1253 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1253 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1314 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "29"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1314 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1315 .
+_:AX5fXX3aXX40XX5fXX3aXA1350 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1351 .
+_:AX5fXX3aXX40XX5fXX3aXA1350 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "23"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1411 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1411 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTIFIED> .
+_:AX5fXX3aXX40XX5fXX3aXA1369 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "42"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1369 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1370 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#numerator> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTIFIED> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#numerator> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY_RATIO> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#numerator> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#numerator> <http://www.w3.org/2000/01/rdf-schema#label> "numerator"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#numerator> <http://www.w3.org/2000/01/rdf-schema#label> "numerador"@es .
+_:AX5fXX3aXX40XX5fXX3aXA1157 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#formatting> .
+_:AX5fXX3aXX40XX5fXX3aXA1157 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1157 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1218 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1218 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1218 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#path> .
+_:AX5fXX3aXX40XX5fXX3aXA1466 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1467 .
+_:AX5fXX3aXX40XX5fXX3aXA1466 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "44"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1527 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1527 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1528 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#sign> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#sign> <http://www.w3.org/2000/01/rdf-schema#comment> "direction of duration with respect to a notional reference point"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#sign> <http://www.w3.org/2000/01/rdf-schema#label> "sentido"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#sign> <http://www.w3.org/2000/01/rdf-schema#label> "sign"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#sign> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#integer> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#sign> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> .
+_:AX5fXX3aXX40XX5fXX3aXA1193 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1193 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#target_is_transaction> .
+_:AX5fXX3aXX40XX5fXX3aXA1193 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1254 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1254 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1254 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#magnitude> .
+_:AX5fXX3aXX40XX5fXX3aXA1315 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1316 .
+_:AX5fXX3aXX40XX5fXX3aXA1315 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "30"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1290 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1291 .
+_:AX5fXX3aXX40XX5fXX3aXA1290 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1351 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "24"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1351 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1352 .
+_:AX5fXX3aXX40XX5fXX3aXA1412 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1413 .
+_:AX5fXX3aXX40XX5fXX3aXA1412 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#units> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#units> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#units> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1530 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#units> <http://www.w3.org/2000/01/rdf-schema#comment> "stringified units, expressed in UCUM unit syntax, e.g. dg/m2, km/h..."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#units> <http://www.w3.org/2000/01/rdf-schema#label> "unidades"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#units> <http://www.w3.org/2000/01/rdf-schema#label> "units"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#timezone> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#timezone> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1271 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#timezone> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#timezone> <http://www.w3.org/2000/01/rdf-schema#comment> "offset from Universal Coordinated Time, in the range -1200 +1200"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1200 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1200 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#day> .
+_:AX5fXX3aXX40XX5fXX3aXA1200 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1158 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#charset> .
+_:AX5fXX3aXX40XX5fXX3aXA1158 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1158 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1219 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1219 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#magnitude> .
+_:AX5fXX3aXX40XX5fXX3aXA1219 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1467 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "45"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1467 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1468 .
+_:AX5fXX3aXX40XX5fXX3aXA1528 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1529 .
+_:AX5fXX3aXX40XX5fXX3aXA1528 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> .
+_:AX5fXX3aXX40XX5fXX3aXA1194 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1194 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1194 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#ehr_id> .
+_:AX5fXX3aXX40XX5fXX3aXA1255 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1255 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1255 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#precision> .
+_:AX5fXX3aXX40XX5fXX3aXA1316 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1316 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "31"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTIFIED> <http://protege.stanford.edu/plugins/owl/protege#abstract> "true"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTIFIED> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1183 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTIFIED> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Abstract class defining the concept  of true quantified\nvalues, e.e. values which are not only ordered, but whose \nmagnitude is meaningful as well. The defining characteristic of the\ntype is the attribute property - what is being quantified, and that the \ndifference operation is defined."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTIFIED> <http://www.w3.org/2000/01/rdf-schema#label> "QUANTIFIED"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTIFIED> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1184 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTIFIED> <http://www.w3.org/2002/07/owl#equivalentClass> _:AX5fXX3aXX40XX5fXX3aXA1185 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTIFIED> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTIFIED> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1182 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTIFIED> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDERED> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTIFIED> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> "Attributes in the Quantity class for unit and accuracy"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTIFIED> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#OMGHDTF> "COAS::Measurement"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTIFIED> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "QTY"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTIFIED> <http://www.w3.org/2000/01/rdf-schema#label> "CUANTIFICADO"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTIFIED> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "unit exists as ann attribute of the measurement data value class, but there is no representation of accuracy"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1291 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1291 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1292 .
+_:AX5fXX3aXX40XX5fXX3aXA1352 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1353 .
+_:AX5fXX3aXX40XX5fXX3aXA1352 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "25"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1413 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME_SPECIFICATION> .
+_:AX5fXX3aXX40XX5fXX3aXA1413 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1510 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1511 .
+_:AX5fXX3aXX40XX5fXX3aXA1510 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1140 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#days> .
+_:AX5fXX3aXX40XX5fXX3aXA1140 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1140 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#minute_known> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#boolean> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#minute_known> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_PARTIAL_TIME> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#minute_known> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#minute_known> <http://www.w3.org/2000/01/rdf-schema#label> "minute known"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#minute_known> <http://www.w3.org/2000/01/rdf-schema#label> "minuto conocido"@es .
+_:AX5fXX3aXX40XX5fXX3aXA1201 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#upper> .
+_:AX5fXX3aXX40XX5fXX3aXA1201 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE> .
+_:AX5fXX3aXX40XX5fXX3aXA1201 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1159 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#value> .
+_:AX5fXX3aXX40XX5fXX3aXA1159 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1159 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "PhysicalQuantity (PQ)"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY> <http://www.w3.org/2000/01/rdf-schema#label> "QUANTITY"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> "STR 3.2-3.4"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1259 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Can be used for time durations, where it is more convenient to treat these\nas simply a number of seconds rather than days, months, years."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> "Quantity"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_QUANTITY"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY> <http://www.w3.org/2000/01/rdf-schema#label> "CANTIDAD"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#OMGHDTF> "COAS::Numeric"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MEASURABLE> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1254 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1258 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Concrete type representing scientific quantities, i.e. quentities expressed\nas a single value and a single, optional units."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "Quantifiable Data Item; Measurement data value class"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1256 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1257 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1255 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#integrity_check_algorithm> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#integrity_check_algorithm> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#CODE_PHRASE> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#integrity_check_algorithm> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#integrity_check_algorithm> <http://www.w3.org/2000/01/rdf-schema#label> "integrity check algorithm"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#integrity_check_algorithm> <http://www.w3.org/2000/01/rdf-schema#label> "chequeo de comprobacion de integridad"@es .
+_:AX5fXX3aXX40XX5fXX3aXA1468 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1469 .
+_:AX5fXX3aXX40XX5fXX3aXA1468 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "46"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1529 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1529 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME> .
+_:AX5fXX3aXX40XX5fXX3aXA1317 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1317 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1318 .
+_:AX5fXX3aXX40XX5fXX3aXA1195 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1195 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1195 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#organiser_id> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#is_terminal> <http://www.w3.org/2000/01/rdf-schema#label> "es terminal"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#is_terminal> <http://www.w3.org/2000/01/rdf-schema#label> "is terminal"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#is_terminal> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#is_terminal> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_STATE> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#is_terminal> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#boolean> .
+_:AX5fXX3aXX40XX5fXX3aXA1256 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1256 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1256 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#units> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#TERM_MAPPING> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#TERM_MAPPING> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1128 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#TERM_MAPPING> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1127 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#TERM_MAPPING> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1126 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#TERM_MAPPING> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> "STR 4.5"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#TERM_MAPPING> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Used for adding classification terms, or mapping into equivalents in other terminologies"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#TERM_MAPPING> <http://www.w3.org/2000/01/rdf-schema#label> "TERM MAPPING"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#TERM_MAPPING> <http://www.w3.org/2000/01/rdf-schema#label> "TERMINO MAPEADO"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#TERM_MAPPING> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Represents a coded term mapped to a DV_TEXT. and the relative match of the target term with respect to the maped item."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#entry_id> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#entry_id> <http://www.w3.org/2000/01/rdf-schema#label> "entry id"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#entry_id> <http://www.w3.org/2000/01/rdf-schema#label> "id de entrada"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#entry_id> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#entry_id> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_EHR_URI> .
+_:AX5fXX3aXX40XX5fXX3aXA1292 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1293 .
+_:AX5fXX3aXX40XX5fXX3aXA1292 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1353 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1354 .
+_:AX5fXX3aXX40XX5fXX3aXA1353 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "26"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_GENERAL_TIME_SPECIFICATION> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_GENERAL_TIME_SPECIFICATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME_SPECIFICATION> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_GENERAL_TIME_SPECIFICATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "The Duration data value class provides for the specification of time intervals, and also for a simple string description of the priodicity"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_GENERAL_TIME_SPECIFICATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> "STR 3.9"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_GENERAL_TIME_SPECIFICATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "GTS"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_GENERAL_TIME_SPECIFICATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Specifies points in time in a general syntax. Based on the HL7v3 \nGTS data type"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_GENERAL_TIME_SPECIFICATION> <http://www.w3.org/2000/01/rdf-schema#label> "GENERAL TIME SPECIFICATION"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_GENERAL_TIME_SPECIFICATION> <http://www.w3.org/2000/01/rdf-schema#label> "ESPECIFICACION GENERAL DE TIEMPO"@es .
+_:AX5fXX3aXX40XX5fXX3aXA1414 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1415 .
+_:AX5fXX3aXX40XX5fXX3aXA1414 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1141 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#seconds> .
+_:AX5fXX3aXX40XX5fXX3aXA1141 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1141 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1202 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE> .
+_:AX5fXX3aXX40XX5fXX3aXA1202 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#lower> .
+_:AX5fXX3aXX40XX5fXX3aXA1202 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1450 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1451 .
+_:AX5fXX3aXX40XX5fXX3aXA1450 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "28"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1511 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1511 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1512 .
+_:AX5fXX3aXX40XX5fXX3aXA1469 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "47"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1469 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1470 .
+_:AX5fXX3aXX40XX5fXX3aXA1196 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1196 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1196 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#year> .
+_:AX5fXX3aXX40XX5fXX3aXA1257 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#NUMERIC> .
+_:AX5fXX3aXX40XX5fXX3aXA1257 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1257 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#value> .
+_:AX5fXX3aXX40XX5fXX3aXA1318 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1319 .
+_:AX5fXX3aXX40XX5fXX3aXA1318 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#hour> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#hour> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1527 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#hour> <http://www.w3.org/2000/01/rdf-schema#label> "hora"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#hour> <http://www.w3.org/2000/01/rdf-schema#label> "hour"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#hour> <http://www.w3.org/2000/01/rdf-schema#range> _:AX5fXX3aXX40XX5fXX3aXA1502 .
+_:AX5fXX3aXX40XX5fXX3aXA1293 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1293 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1294 .
+_:AX5fXX3aXX40XX5fXX3aXA1354 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "27"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1354 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1355 .
+_:AX5fXX3aXX40XX5fXX3aXA1415 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1415 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TIME_SPECIFICATION> .
+_:AX5fXX3aXX40XX5fXX3aXA1390 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1391 .
+_:AX5fXX3aXX40XX5fXX3aXA1390 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1137 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CUSTOMARY_QUANTITY> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1134 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> <http://www.w3.org/2000/01/rdf-schema#label> "DURATION"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1140 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1135 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1138 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "IVL<TS>"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> "STR 3.10"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_DATE_TIME_DURATION"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1139 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Represents a period of time with respect to a notional point in time, \nwhich is not specified. A sign my be used to indicate the duration is\n'backwards' in time rather than forwards"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1141 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1136 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#MisUse> "Durations cannot be used to represent points in time, or intervals of time"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "Time Interval or Date Range or text description"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> <http://www.w3.org/2000/01/rdf-schema#label> "DURACION"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Used ofr recording the duration of something in the real world, particularly\nwhen there is a need:\nto represent the duration in customary format (days, hours, minutes...)\nif it will be used in computational operations with date/time quantities"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#compression_algorithm> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#CODE_PHRASE> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#compression_algorithm> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_MULTIMEDIA> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#compression_algorithm> <http://www.w3.org/2000/01/rdf-schema#label> "algoritmo de compresion"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#compression_algorithm> <http://www.w3.org/2000/01/rdf-schema#label> "compression algorithm"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#compression_algorithm> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA1142 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1142 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#terminology_id> .
+_:AX5fXX3aXX40XX5fXX3aXA1142 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1203 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> .
+_:AX5fXX3aXX40XX5fXX3aXA1203 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#lower> .
+_:AX5fXX3aXX40XX5fXX3aXA1203 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1451 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "29"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1451 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1452 .
+_:AX5fXX3aXX40XX5fXX3aXA1512 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1513 .
+_:AX5fXX3aXX40XX5fXX3aXA1512 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "10"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_CUSTOMARY_QUANTITY> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1197 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE> <http://www.w3.org/2000/01/rdf-schema#label> "FECHA"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE> <http://www.w3.org/2000/01/rdf-schema#label> "DATE"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1196 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_DATE"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1200 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Represents an absolute point in time, as measured on the Gregorian\ncalendar, and specified only to the day"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> "STR 3.7"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> "DTValue attribute of DateTime class"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1199 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Used ofr recording dates in real world time"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1198 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "TS"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "TOCD choice Quantifiable Observation Data Item"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1300 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1301 .
+_:AX5fXX3aXX40XX5fXX3aXA1300 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "15"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1197 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1197 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#diff_type> .
+_:AX5fXX3aXX40XX5fXX3aXA1197 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> .
+_:AX5fXX3aXX40XX5fXX3aXA1258 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1258 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1258 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#value> .
+_:AX5fXX3aXX40XX5fXX3aXA1319 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE> .
+_:AX5fXX3aXX40XX5fXX3aXA1319 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#diff_type> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1276 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#diff_type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA1294 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1295 .
+_:AX5fXX3aXX40XX5fXX3aXA1294 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#minutes> <http://www.w3.org/2000/01/rdf-schema#label> "minutos"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#minutes> <http://www.w3.org/2000/01/rdf-schema#label> "minutes"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#minutes> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#integer> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#minutes> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#minutes> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DURATION> .
+_:AX5fXX3aXX40XX5fXX3aXA1355 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "28"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1355 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1356 .
+_:AX5fXX3aXX40XX5fXX3aXA1416 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1417 .
+_:AX5fXX3aXX40XX5fXX3aXA1416 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1391 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1392 .
+_:AX5fXX3aXX40XX5fXX3aXA1391 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1143 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1143 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#items> .
+_:AX5fXX3aXX40XX5fXX3aXA1143 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#precision> <http://www.w3.org/2000/01/rdf-schema#comment> "precision to which the value of the quantity is expressed, in terms of number of significant figures. 0 implies no precision"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#precision> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#precision> <http://www.w3.org/2000/01/rdf-schema#label> "precision"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#precision> <http://www.w3.org/2000/01/rdf-schema#label> "precision"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#precision> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#precision> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#integer> .
+_:AX5fXX3aXX40XX5fXX3aXA1204 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> .
+_:AX5fXX3aXX40XX5fXX3aXA1204 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1204 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#upper> .
+_:AX5fXX3aXX40XX5fXX3aXA1452 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1453 .
+_:AX5fXX3aXX40XX5fXX3aXA1452 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "30"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1513 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "11"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1513 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1514 .
+_:AX5fXX3aXX40XX5fXX3aXA1240 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#data> .
+_:AX5fXX3aXX40XX5fXX3aXA1240 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1240 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1301 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1302 .
+_:AX5fXX3aXX40XX5fXX3aXA1301 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "16"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1198 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1198 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1198 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#month> .
+_:AX5fXX3aXX40XX5fXX3aXA1259 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1259 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#diff_type> .
+_:AX5fXX3aXX40XX5fXX3aXA1259 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_QUANTITY> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#second> <http://www.w3.org/2000/01/rdf-schema#range> _:AX5fXX3aXX40XX5fXX3aXA1327 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#second> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1324 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#second> <http://www.w3.org/2000/01/rdf-schema#label> "second"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#second> <http://www.w3.org/2000/01/rdf-schema#label> "segundo"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#second> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA1295 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "10"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1295 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1296 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#ehr_id> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_EHR_URI> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#ehr_id> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#ehr_id> <http://www.w3.org/2000/01/rdf-schema#label> "ehr_id"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#ehr_id> <http://www.w3.org/2000/01/rdf-schema#label> "id de ehr"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#ehr_id> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA1356 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1357 .
+_:AX5fXX3aXX40XX5fXX3aXA1356 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "29"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1417 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1418 .
+_:AX5fXX3aXX40XX5fXX3aXA1417 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#COORDINATED_TERM> .
+_:AX5fXX3aXX40XX5fXX3aXA1453 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1454 .
+_:AX5fXX3aXX40XX5fXX3aXA1453 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "31"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1144 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1145 .
+_:AX5fXX3aXX40XX5fXX3aXA1144 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1392 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1393 .
+_:AX5fXX3aXX40XX5fXX3aXA1392 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1205 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1205 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#minute_known> .
+_:AX5fXX3aXX40XX5fXX3aXA1205 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_URI> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1216 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_URI> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1217 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_URI> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_URI> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1215 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_URI> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#OMGHDTF> "COAS::TechnologyInstanceLocator"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_URI> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DATA_VALUE> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_URI> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1214 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_URI> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "A reference to an object which conforms to the Universal Resource\nIdentifier (URI) standarad, as defined by W3C RFC 2936"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_URI> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "TBD"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_URI> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1218 .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_URI> <http://www.w3.org/2000/01/rdf-schema#label> "URI"@es .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_URI> <http://www.w3.org/2000/01/rdf-schema#label> "URI"@en .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_URI> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Enables external resources to be referenced from within the \ncontent of the EHR. A number of functions return the logical\nsubparts of the URI string"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_URI> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1213 .
Index: /ruby/tags/release-0.5.0/doc/open_ehr/Demographic_RM.ntriple
===================================================================
--- /ruby/tags/release-0.5.0/doc/open_ehr/Demographic_RM.ntriple	(revision 367)
+++ /ruby/tags/release-0.5.0/doc/open_ehr/Demographic_RM.ntriple	(revision 367)
@@ -0,0 +1,343 @@
+_:AX5fXX3aXX40XX5fXX3aXA1595 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1595 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1596 .
+_:AX5fXX3aXX40XX5fXX3aXA1569 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1569 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#target> .
+_:AX5fXX3aXX40XX5fXX3aXA1569 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#reverse_relationships> <http://www.w3.org/2002/07/owl#inverseOf> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#target> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#reverse_relationships> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#reverse_relationships> <http://www.w3.org/2000/01/rdf-schema#comment> "Relationships in which this role takes part as target"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#reverse_relationships> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_RELATIONSHIP> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#reverse_relationships> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#reverse_relationships> <http://www.w3.org/2000/01/rdf-schema#label> "target relationship"@en .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#reverse_relationships> <http://www.w3.org/2000/01/rdf-schema#label> "relacion como destino"@es .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ADDRESS> <http://www.w3.org/2000/01/rdf-schema#label> "DIRECCION"@es .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ADDRESS> <http://www.w3.org/2000/01/rdf-schema#label> "ADDRESS"@en .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ADDRESS> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ADDRESS> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "Address (AD) (data type)"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ADDRESS> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Address of contact, which may be electronic or geographic"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ADDRESS> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ADDRESS> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1562 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ADDRESS> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "Address (data type)"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1578 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#AGENT> .
+_:AX5fXX3aXX40XX5fXX3aXA1578 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1579 .
+_:AX5fXX3aXX40XX5fXX3aXA1607 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1608 .
+_:AX5fXX3aXX40XX5fXX3aXA1607 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_RELATIONSHIP> .
+_:AX5fXX3aXX40XX5fXX3aXA1587 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#addresses> .
+_:AX5fXX3aXX40XX5fXX3aXA1587 <http://www.w3.org/2002/07/owl#minCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1587 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#SET_PARTY_IDENTITY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1589 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#SET_PARTY_IDENTITY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#SET_T> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#SET_PARTY_IDENTITY> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ROLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1583 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ROLE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Generic description of  a role performed by an actor. The role \ncorresponds to a competency of the party. Roles are used to define \nthe responsibalities undertaken by a party for a purpose. \nRoles should have credential qualifying the performer to perform \nthe role."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ROLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1584 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ROLE> <http://www.w3.org/2000/01/rdf-schema#label> "ROL"@es .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ROLE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "Healthcare agent in context"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ROLE> <http://www.w3.org/2000/01/rdf-schema#label> "ROLE"@en .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ROLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ROLE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Roles correspond to concepts like \"general parctitioner\", \"nurse\" and so on"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ROLE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ROLE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "ROLE"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1596 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1597 .
+_:AX5fXX3aXX40XX5fXX3aXA1596 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY> <http://protege.stanford.edu/plugins/owl/protege#abstract> "true"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1567 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY> <http://www.w3.org/2000/01/rdf-schema#label> "ENTIDAD"@es .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "healthcare agent"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1568 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY> <http://www.w3.org/2002/07/owl#equivalentClass> _:AX5fXX3aXX40XX5fXX3aXA1564 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "Entity"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY> <http://www.w3.org/2000/01/rdf-schema#label> "PARTY"@en .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Ancestor of all party types, including real world entities and their roles.\nA party is any entity which can participate in an activity. The meaning \nattribute inherited from LOCATABLE is used to indicate the actual type \nof party"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#roles> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ROLE> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#roles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#roles> <http://www.w3.org/2000/01/rdf-schema#label> "roles"@en .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#roles> <http://www.w3.org/2000/01/rdf-schema#label> "roles"@es .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#roles> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ACTOR> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#roles> <http://www.w3.org/2000/01/rdf-schema#comment> "roles played by this party"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#AGENT> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#AGENT> <http://www.w3.org/2000/01/rdf-schema#label> "AGENTE"@es .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#AGENT> <http://www.w3.org/2000/01/rdf-schema#label> "AGENT"@en .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#AGENT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ACTOR> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#AGENT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "Healthcare software, healthcare device"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#AGENT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "DEVICE"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#AGENT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Generic concepto of any kind of agent including devices, software \nsystems, but not humas or organisations."^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1579 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ORGANISATION> .
+_:AX5fXX3aXX40XX5fXX3aXA1579 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1580 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#SET_PARTY_RELATIONSHIP> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1588 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#SET_PARTY_RELATIONSHIP> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#SET_T> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#SET_PARTY_RELATIONSHIP> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1588 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1588 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#item> .
+_:AX5fXX3aXX40XX5fXX3aXA1588 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_RELATIONSHIP> .
+_:AX5fXX3aXX40XX5fXX3aXA1608 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ROLE> .
+_:AX5fXX3aXX40XX5fXX3aXA1608 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1609 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#capabilities> <http://www.w3.org/2000/01/rdf-schema#label> "capabilities"@en .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#capabilities> <http://www.w3.org/2000/01/rdf-schema#label> "capacidades"@es .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#capabilities> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#capabilities> <http://www.w3.org/2000/01/rdf-schema#comment> "The capabilities of this role"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#capabilities> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#CAPABILITY> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#capabilities> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ROLE> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#addresses> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#addresses> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ADDRESS> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#addresses> <http://www.w3.org/2000/01/rdf-schema#comment> "A set of address alternatives for this purpose and time validity"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#addresses> <http://www.w3.org/2000/01/rdf-schema#label> "addresses"@en .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#addresses> <http://www.w3.org/2000/01/rdf-schema#label> "direcciones"@es .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#addresses> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#CONTACT> .
+_:AX5fXX3aXX40XX5fXX3aXA1597 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_RELATIONSHIP> .
+_:AX5fXX3aXX40XX5fXX3aXA1597 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1570 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#type> .
+_:AX5fXX3aXX40XX5fXX3aXA1570 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1570 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#relationships> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#relationships> <http://www.w3.org/2002/07/owl#inverseOf> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#source> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#relationships> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#relationships> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_RELATIONSHIP> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#relationships> <http://www.w3.org/2000/01/rdf-schema#label> "relacion como origen"@es .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#relationships> <http://www.w3.org/2000/01/rdf-schema#label> "source relationship"@en .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#relationships> <http://www.w3.org/2000/01/rdf-schema#comment> "Relationships in hich this role takes part as source"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1609 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#CAPABILITY> .
+_:AX5fXX3aXX40XX5fXX3aXA1609 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1610 .
+_:AX5fXX3aXX40XX5fXX3aXA1589 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#item> .
+_:AX5fXX3aXX40XX5fXX3aXA1589 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_IDENTITY> .
+_:AX5fXX3aXX40XX5fXX3aXA1589 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#languages> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#languages> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ACTOR> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#languages> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#languages> <http://www.w3.org/2000/01/rdf-schema#comment> "Languages which can be used to communicate with this actor"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#source> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#source> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#source> <http://www.w3.org/2002/07/owl#inverseOf> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#relationships> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#source> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_RELATIONSHIP> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#source> <http://www.w3.org/2000/01/rdf-schema#comment> "Source of relationship"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#source> <http://www.w3.org/2000/01/rdf-schema#label> "origen"@es .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#source> <http://www.w3.org/2000/01/rdf-schema#label> "source"@en .
+_:AX5fXX3aXX40XX5fXX3aXA1598 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1599 .
+_:AX5fXX3aXX40XX5fXX3aXA1598 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1562 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#details> .
+_:AX5fXX3aXX40XX5fXX3aXA1562 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1562 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1571 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#details> .
+_:AX5fXX3aXX40XX5fXX3aXA1571 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1571 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#credentials> <http://www.w3.org/2000/01/rdf-schema#label> "credentials"@en .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#credentials> <http://www.w3.org/2000/01/rdf-schema#label> "credenciales"@es .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#credentials> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#credentials> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#CAPABILITY> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#credentials> <http://www.w3.org/2000/01/rdf-schema#comment> "the qualifications of the performer of the role for this capability. This might include professional qualifications and official identifications such as provider numbers etc..."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#credentials> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#DATA_STRUCTURE> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_RELATIONSHIP> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_RELATIONSHIP> <http://www.w3.org/2000/01/rdf-schema#label> "RELACION ENTRE ENTIDADES"@es .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_RELATIONSHIP> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1569 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_RELATIONSHIP> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1570 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_RELATIONSHIP> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1572 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_RELATIONSHIP> <http://www.w3.org/2000/01/rdf-schema#label> "PARTY RELATIONSHIP"@en .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_RELATIONSHIP> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1571 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_RELATIONSHIP> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "RELATIONSHIP_LINK"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_RELATIONSHIP> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_RELATIONSHIP> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "generic description of a relationship between parties"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1600 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_IDENTITY> .
+_:AX5fXX3aXX40XX5fXX3aXA1600 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1601 .
+_:AX5fXX3aXX40XX5fXX3aXA1580 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1580 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#GROUP> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#identities> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_IDENTITY> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#identities> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#identities> <http://www.w3.org/2000/01/rdf-schema#label> "identities"@en .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#identities> <http://www.w3.org/2000/01/rdf-schema#label> "identidades"@es .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#identities> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#identities> <http://www.w3.org/2000/01/rdf-schema#comment> "Identities used by the party to identify itself, such as legal name, stage names, aliases, nicknames and so on"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1599 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY> .
+_:AX5fXX3aXX40XX5fXX3aXA1599 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1600 .
+_:AX5fXX3aXX40XX5fXX3aXA1563 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#item> .
+_:AX5fXX3aXX40XX5fXX3aXA1563 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY> .
+_:AX5fXX3aXX40XX5fXX3aXA1563 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1572 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#time_validity> .
+_:AX5fXX3aXX40XX5fXX3aXA1572 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1572 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1601 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_RELATIONSHIP> .
+_:AX5fXX3aXX40XX5fXX3aXA1601 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1602 .
+_:AX5fXX3aXX40XX5fXX3aXA1581 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#credentials> .
+_:AX5fXX3aXX40XX5fXX3aXA1581 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1581 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1590 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ADDRESS> .
+_:AX5fXX3aXX40XX5fXX3aXA1590 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1590 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#item> .
+_:AX5fXX3aXX40XX5fXX3aXA1610 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#CONTACT> .
+_:AX5fXX3aXX40XX5fXX3aXA1610 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#CAPABILITY> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#CAPABILITY> <http://www.w3.org/2000/01/rdf-schema#label> "CAPACIDADES"@es .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#CAPABILITY> <http://www.w3.org/2000/01/rdf-schema#label> "CAPABILITY"@en .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#CAPABILITY> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Capability of a role, such as \"ehr modifier\", \"health care provider\". \nCapability should be backed up by credentials."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#CAPABILITY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1582 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#CAPABILITY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#CAPABILITY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1581 .
+_:AX5fXX3aXX40XX5fXX3aXA1564 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1564 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1565 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#time_validity> <http://www.w3.org/2000/01/rdf-schema#label> "time validity"@en .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#time_validity> <http://www.w3.org/2000/01/rdf-schema#label> "intervalo de validez"@es .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#time_validity> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_DV_DATE> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#time_validity> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#time_validity> <http://www.w3.org/2000/01/rdf-schema#comment> "Valid time interval fot this relationship"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#time_validity> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1606 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#LIST_CAPABILITY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1573 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#LIST_CAPABILITY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#LIST_T> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#LIST_CAPABILITY> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1573 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1573 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#item> .
+_:AX5fXX3aXX40XX5fXX3aXA1573 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#CAPABILITY> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#SET_PARTY> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#SET_PARTY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1563 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#SET_PARTY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#SET_T> .
+_:AX5fXX3aXX40XX5fXX3aXA1602 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1602 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ADDRESS> .
+_:AX5fXX3aXX40XX5fXX3aXA1582 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1582 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1582 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#time_validity> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#SET_ROLE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#SET_ROLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#SET_T> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#SET_ROLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1574 .
+_:AX5fXX3aXX40XX5fXX3aXA1591 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1591 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#as_string> .
+_:AX5fXX3aXX40XX5fXX3aXA1591 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1565 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ACTOR> .
+_:AX5fXX3aXX40XX5fXX3aXA1565 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1566 .
+_:AX5fXX3aXX40XX5fXX3aXA1574 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#item> .
+_:AX5fXX3aXX40XX5fXX3aXA1574 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1574 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ROLE> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#perfomer> <http://www.w3.org/2000/01/rdf-schema#comment> "Actor playing the role"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#perfomer> <http://www.w3.org/2000/01/rdf-schema#label> "interprete"@es .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#perfomer> <http://www.w3.org/2000/01/rdf-schema#label> "performer"@en .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#perfomer> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ACTOR> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#perfomer> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ROLE> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#perfomer> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl> <http://www.w3.org/2000/01/rdf-schema#comment> "Ontology based in the openEHR Demographic Reference Model\nRevision:1.4.1\nWritten in owl by Isabel Rom\u00E1n"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl> <http://www.w3.org/2002/07/owl#imports> <http://protege.stanford.edu/plugins/owl/protege> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl> <http://www.w3.org/2002/07/owl#imports> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Ontology> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#purpose> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#purpose> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1603 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#purpose> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#purpose> <http://www.w3.org/2000/01/rdf-schema#comment> "Purpose of identity, e.g. \"legal\", \"stagename\", \"nickname\", \"tibal name\"... taken from value of inherited name attribute."^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1603 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1603 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1604 .
+_:AX5fXX3aXX40XX5fXX3aXA1583 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1583 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#perfomer> .
+_:AX5fXX3aXX40XX5fXX3aXA1583 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#SET_CONTACT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1594 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#SET_CONTACT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#SET_T> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#SET_CONTACT> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#details> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1598 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#details> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#details> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#DATA_STRUCTURE> .
+_:AX5fXX3aXX40XX5fXX3aXA1592 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#details> .
+_:AX5fXX3aXX40XX5fXX3aXA1592 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1592 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1566 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1566 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ROLE> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#GROUP> <http://www.w3.org/2000/01/rdf-schema#label> "GROUP"@en .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#GROUP> <http://www.w3.org/2000/01/rdf-schema#label> "GRUPO"@es .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#GROUP> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ACTOR> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#GROUP> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "A group is a real world group of parties which is created by another \nparty, usually an organisation, for some specific purpose. A typical \nclinical example is that of the specialist care tea, e.g. \"cardilogy team\". \nThe members of the group usually work together."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#GROUP> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1575 <http://www.w3.org/2002/07/owl#minCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1575 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1575 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#languages> .
+_:AX5fXX3aXX40XX5fXX3aXA1604 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1605 .
+_:AX5fXX3aXX40XX5fXX3aXA1604 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#CONTACT> .
+_:AX5fXX3aXX40XX5fXX3aXA1584 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#time_validity> .
+_:AX5fXX3aXX40XX5fXX3aXA1584 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA1584 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ACTOR> <http://www.w3.org/2000/01/rdf-schema#label> "ACTOR"@es .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ACTOR> <http://www.w3.org/2000/01/rdf-schema#label> "ACTOR"@en .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ACTOR> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "Entity"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ACTOR> <http://www.w3.org/2002/07/owl#equivalentClass> _:AX5fXX3aXX40XX5fXX3aXA1576 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ACTOR> <http://protege.stanford.edu/plugins/owl/protege#abstract> "true"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ACTOR> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Ancestor of all real-world types, including people and organisations. \nAn actor is any real-world entity capable of taking on a role"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ACTOR> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "Healthcare party"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ACTOR> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ACTOR> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ACTOR> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1575 .
+_:AX5fXX3aXX40XX5fXX3aXA1593 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#as_string> .
+_:AX5fXX3aXX40XX5fXX3aXA1593 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#STRING> .
+_:AX5fXX3aXX40XX5fXX3aXA1593 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PERSON> <http://www.w3.org/2000/01/rdf-schema#label> "PERSON"@en .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PERSON> <http://www.w3.org/2000/01/rdf-schema#label> "PERSONA"@es .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PERSON> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_PERSON"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PERSON> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "healthcare person"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PERSON> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PERSON> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Generic description of persons. Provides a dedicated type to which\nPerson archetypes can be targeted"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PERSON> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "Person"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PERSON> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ACTOR> .
+_:AX5fXX3aXX40XX5fXX3aXA1567 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1567 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#details> .
+_:AX5fXX3aXX40XX5fXX3aXA1567 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#LIST_ADDRESS> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#LIST_ADDRESS> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1590 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#LIST_ADDRESS> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#LIST_T> .
+_:AX5fXX3aXX40XX5fXX3aXA1576 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1577 .
+_:AX5fXX3aXX40XX5fXX3aXA1576 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#target> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_RELATIONSHIP> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#target> <http://www.w3.org/2000/01/rdf-schema#comment> "Target of relationship"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#target> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#target> <http://www.w3.org/2000/01/rdf-schema#label> "destino"@es .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#target> <http://www.w3.org/2000/01/rdf-schema#label> "target"@en .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#target> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#target> <http://www.w3.org/2002/07/owl#inverseOf> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#reverse_relationships> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#type> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA1595 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#type> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> .
+_:AX5fXX3aXX40XX5fXX3aXA1605 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_IDENTITY> .
+_:AX5fXX3aXX40XX5fXX3aXA1605 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA1585 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1585 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#purpose> .
+_:AX5fXX3aXX40XX5fXX3aXA1585 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#as_string> <http://www.w3.org/2000/01/rdf-schema#comment> "Identity in the form of a single string"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#as_string> <http://www.w3.org/2000/01/rdf-schema#label> "como cadena"@es .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#as_string> <http://www.w3.org/2000/01/rdf-schema#label> "as string"@en .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#as_string> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#as_string> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_IDENTITY> .
+_:AX5fXX3aXX40XX5fXX3aXA1594 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#item> .
+_:AX5fXX3aXX40XX5fXX3aXA1594 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#CONTACT> .
+_:AX5fXX3aXX40XX5fXX3aXA1594 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#CONTACT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Description of a means of contact of a party. \nActual structure is archetyped."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#CONTACT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1587 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#CONTACT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1586 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#CONTACT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1585 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#CONTACT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#CONTACT> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1568 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1568 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#identities> .
+_:AX5fXX3aXX40XX5fXX3aXA1568 <http://www.w3.org/2002/07/owl#minCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#contacts> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#contacts> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#CONTACT> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#contacts> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#contacts> <http://www.w3.org/2000/01/rdf-schema#label> "contacts"@en .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#contacts> <http://www.w3.org/2000/01/rdf-schema#label> "contactos"@es .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#contacts> <http://www.w3.org/2000/01/rdf-schema#comment> "Contacts for this party"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA1577 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA1578 .
+_:AX5fXX3aXX40XX5fXX3aXA1577 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PERSON> .
+_:AX5fXX3aXX40XX5fXX3aXA1606 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA1607 .
+_:AX5fXX3aXX40XX5fXX3aXA1606 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA1586 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#time_validity> .
+_:AX5fXX3aXX40XX5fXX3aXA1586 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA1586 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_IDENTITY> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "Person Name (PN) (data type)"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_IDENTITY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1593 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_IDENTITY> <http://www.w3.org/2000/01/rdf-schema#label> "IDENTIDAD DE LA ENTIDAD"@es .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_IDENTITY> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_IDENTITY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1592 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_IDENTITY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_IDENTITY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA1591 .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_IDENTITY> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "An identity \"owned\" by a PARTY, such as a person name or company \nname, and which is used by the party to identify itself. Actual structure \nis archetyped."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_IDENTITY> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "Person Name (data type)"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#PARTY_IDENTITY> <http://www.w3.org/2000/01/rdf-schema#label> "PARTY IDENTITY"@en .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ORGANISATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "ORGANIZATION"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ORGANISATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_HCF"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ORGANISATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "healthcare organisation"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ORGANISATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Generic description of organisations. \nAn organisation is a legally constituted body whose existence \n(in general) outlives the existence of parties considered to be part of it."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ORGANISATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ACTOR> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ORGANISATION> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ORGANISATION> <http://www.w3.org/2000/01/rdf-schema#label> "ORGANISATION"@en .
+<http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#ORGANISATION> <http://www.w3.org/2000/01/rdf-schema#label> "ORGANISMO"@es .
Index: /ruby/tags/release-0.5.0/doc/open_ehr/EHR_EXTRACT_RM.ntriple
===================================================================
--- /ruby/tags/release-0.5.0/doc/open_ehr/EHR_EXTRACT_RM.ntriple	(revision 367)
+++ /ruby/tags/release-0.5.0/doc/open_ehr/EHR_EXTRACT_RM.ntriple	(revision 367)
@@ -0,0 +1,329 @@
+_:AX5fXX3aXX40XX5fXX3aXA2141 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2141 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#receiver> .
+_:AX5fXX3aXX40XX5fXX3aXA2141 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE_CONTENT> <http://www.w3.org/2000/01/rdf-schema#label> "MESSAGE_CONTENT"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE_CONTENT> <http://www.w3.org/2000/01/rdf-schema#label> "CONTENIDO DEL MENSAJE"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE_CONTENT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE_CONTENT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> ""^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE_CONTENT> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA2150 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2150 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#is_primary> .
+_:AX5fXX3aXX40XX5fXX3aXA2150 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl> <http://www.w3.org/2002/07/owl#imports> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl> <http://www.w3.org/2002/07/owl#imports> <http://protege.stanford.edu/plugins/owl/protege> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Ontology> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl> <http://www.w3.org/2000/01/rdf-schema#comment> "Ontology based in the openEHR EHR_EXTRACT Reference model\nRevision: 1.3.2\nWritten in owl by Isabel Roman"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA2133 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2133 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#details> .
+_:AX5fXX3aXX40XX5fXX3aXA2133 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#sender_node> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#sender_node> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#sender_node> <http://www.w3.org/2000/01/rdf-schema#label> ""@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#sender_node> <http://www.w3.org/2000/01/rdf-schema#label> "sender node"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#sender_node> <http://www.w3.org/2000/01/rdf-schema#comment> "EHR node from which the message is sent"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#sender_node> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#PARTY_REF> .
+_:AX5fXX3aXX40XX5fXX3aXA2142 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2142 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2142 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#parties> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#follow_links> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#follow_links> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#follow_links> <http://www.w3.org/2000/01/rdf-schema#label> "follow links"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#follow_links> <http://www.w3.org/2000/01/rdf-schema#label> "siguientes enlaces"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#follow_links> <http://www.w3.org/2000/01/rdf-schema#comment> "Degree of link following DV_LINKS emanating from Transactions originally determined to be required for the extract . All transactions at the target end of followed links are also included in the extract.\n0 don\u00B4t follow\n1 follow first degree links\n2 follow second degree links...\nnfollow nth degree links"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#follow_links> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTEGER> .
+_:AX5fXX3aXX40XX5fXX3aXA2151 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2151 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2151 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#original_path> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#terminology> <http://www.w3.org/2000/01/rdf-schema#comment> "List of full terminology identification details for all terms used in transactions appearing in this extract"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#terminology> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#terminology> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_TERMINOLOGY> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#terminology> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> .
+_:AX5fXX3aXX40XX5fXX3aXA2125 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#item> .
+_:AX5fXX3aXX40XX5fXX3aXA2125 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_TRANSACTION> .
+_:AX5fXX3aXX40XX5fXX3aXA2125 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#subject_of_care> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#subject_of_care> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#PARTY_REF> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#subject_of_care> <http://www.w3.org/2000/01/rdf-schema#comment> "Id of the subject of care to whom the extract relates."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#subject_of_care> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#subject_of_care> <http://www.w3.org/2000/01/rdf-schema#label> "sujeto de cuidados"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#subject_of_care> <http://www.w3.org/2000/01/rdf-schema#label> "subject of care"@en .
+_:AX5fXX3aXX40XX5fXX3aXA2134 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#details> .
+_:AX5fXX3aXX40XX5fXX3aXA2134 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2134 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_FOLDER> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_FOLDER> <http://www.w3.org/2000/01/rdf-schema#label> "X FOLDER"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_FOLDER> <http://www.w3.org/2000/01/rdf-schema#label> "X CARPETA"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_FOLDER> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_FOLDER> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2136 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_FOLDER> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2135 .
+_:AX5fXX3aXX40XX5fXX3aXA2143 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#senders_reference> .
+_:AX5fXX3aXX40XX5fXX3aXA2143 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2143 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#time_sent> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#time_sent> <http://www.w3.org/2000/01/rdf-schema#label> "time sent"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#time_sent> <http://www.w3.org/2000/01/rdf-schema#label> "instante del envio"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#time_sent> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#time_sent> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#time_sent> <http://www.w3.org/2000/01/rdf-schema#comment> "Date/time the message was sent"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA2152 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_FOLDER> .
+_:AX5fXX3aXX40XX5fXX3aXA2152 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#item> .
+_:AX5fXX3aXX40XX5fXX3aXA2152 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2126 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2126 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#ehr_id> .
+_:AX5fXX3aXX40XX5fXX3aXA2126 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2135 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2135 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#folders> .
+_:AX5fXX3aXX40XX5fXX3aXA2135 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_DEMOGRAPHICS> <http://www.w3.org/2000/01/rdf-schema#label> "X DEMOGRAPHICS"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_DEMOGRAPHICS> <http://www.w3.org/2000/01/rdf-schema#label> "X DATOS DEMOGRAFICOS"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_DEMOGRAPHICS> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Container class for all demographic data required in an EHR Extract. \nThe list of Parties must be supplied except in the case when an EHR \nextract is sent within the one environment, and the receiver system has\naccess to the same demographic server as the sender."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_DEMOGRAPHICS> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2134 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_DEMOGRAPHICS> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "The message envelope for an extract, indicating the sender and the\nreceiver details, time and any other details required."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2140 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2146 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "Various messages classes"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2143 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2137 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2147 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2144 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2141 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2145 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> <http://www.w3.org/2000/01/rdf-schema#label> "MENSAJE"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2148 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2142 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2138 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "MESSAGE"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2139 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> <http://www.w3.org/2000/01/rdf-schema#label> "MESSAGE"@en .
+_:AX5fXX3aXX40XX5fXX3aXA2144 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2144 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#receiver_node> .
+_:AX5fXX3aXX40XX5fXX3aXA2144 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2153 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA2154 .
+_:AX5fXX3aXX40XX5fXX3aXA2153 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#receiver_node> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#receiver_node> <http://www.w3.org/2000/01/rdf-schema#comment> "EHR node receiving the message"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#receiver_node> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#receiver_node> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#PARTY_REF> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#receiver_node> <http://www.w3.org/2000/01/rdf-schema#label> "nodo receptor"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#receiver_node> <http://www.w3.org/2000/01/rdf-schema#label> "receiver node"@en .
+_:AX5fXX3aXX40XX5fXX3aXA2127 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#subject_of_care> .
+_:AX5fXX3aXX40XX5fXX3aXA2127 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2127 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#other_participations> <http://www.w3.org/2000/01/rdf-schema#label> "otros participantes"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#other_participations> <http://www.w3.org/2000/01/rdf-schema#label> "other participations"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#other_participations> <http://www.w3.org/2000/01/rdf-schema#comment> "Any other participations in the extract creation process"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#other_participations> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#other_participations> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#groups> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_ACCESS_CONTROL> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#groups> <http://www.w3.org/2000/01/rdf-schema#label> "grupos"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#groups> <http://www.w3.org/2000/01/rdf-schema#label> "groups"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#groups> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#groups> <http://www.w3.org/2000/01/rdf-schema#comment> "Access groups referred to in this extract"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA2136 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2136 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2136 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#transactions> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_ACCESS_CONTROL> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_ACCESS_CONTROL> <http://www.w3.org/2000/01/rdf-schema#label> "X CONTROL DE ACCESO"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_ACCESS_CONTROL> <http://www.w3.org/2000/01/rdf-schema#label> "X ACCESS CONTROL"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_ACCESS_CONTROL> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "continer class for all access control data required in an EHR Extract. \nThe list of access groups must be supplied except in the case when \nan EHR extract is sent within the one environment, and the receiver \nsystem has access to the same acces control server as the sender."^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA2145 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#signature> .
+_:AX5fXX3aXX40XX5fXX3aXA2145 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2145 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#urgency> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#urgency> <http://www.w3.org/2000/01/rdf-schema#comment> "Urgency with which receiver should deal with message"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#urgency> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_ORDINAL> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#urgency> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#urgency> <http://www.w3.org/2000/01/rdf-schema#label> "urgencia"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#urgency> <http://www.w3.org/2000/01/rdf-schema#label> "urgency"@en .
+_:AX5fXX3aXX40XX5fXX3aXA2154 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_ACCESS_CONTROL> .
+_:AX5fXX3aXX40XX5fXX3aXA2154 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA2155 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#include_multimedia> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#BOOLEAN> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#include_multimedia> <http://www.w3.org/2000/01/rdf-schema#label> "include multimedia"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#include_multimedia> <http://www.w3.org/2000/01/rdf-schema#label> "incluye multimedia"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#include_multimedia> <http://www.w3.org/2000/01/rdf-schema#comment> "Indicates hether multimedia content referred to by instances of DV_MULTIMEDIA is included or not"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#include_multimedia> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#include_multimedia> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_TRANSACTION> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_TRANSACTION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2151 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_TRANSACTION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2150 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_TRANSACTION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2149 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_TRANSACTION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Container for Transaction in extract. Indicates whether it was part of the \nprimary set and what it\u00B4s original path was"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#originator> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#PARTY_REF> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#originator> <http://www.w3.org/2000/01/rdf-schema#comment> "Health care agent authorising the extract to be created and sent"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#originator> <http://www.w3.org/2000/01/rdf-schema#label> "autorizador"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#originator> <http://www.w3.org/2000/01/rdf-schema#label> "originator"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#originator> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#originator> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#is_primary> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_TRANSACTION> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#is_primary> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#is_primary> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#BOOLEAN> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#is_primary> <http://www.w3.org/2000/01/rdf-schema#comment> "True if the transaction in this conatiner was part of the primary set for the extract, i.e. not added due to link-following"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#is_primary> <http://www.w3.org/2000/01/rdf-schema#label> "is primary"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#is_primary> <http://www.w3.org/2000/01/rdf-schema#label> ""@es .
+_:AX5fXX3aXX40XX5fXX3aXA2128 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2128 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#time_created> .
+_:AX5fXX3aXX40XX5fXX3aXA2128 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#initiator> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#initiator> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#initiator> <http://www.w3.org/2000/01/rdf-schema#comment> "Indicates which party- sender or receiver\ncaused the message to be created\nand sent. If the receiver (initiator =\"R\"), htere was an EHR_REQUEST. If the sender (niiator=\"S\"), there is no request, and the extract is being sent unsolicited."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#initiator> <http://www.w3.org/2000/01/rdf-schema#label> "initiator"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#initiator> <http://www.w3.org/2000/01/rdf-schema#label> "iniciador"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#initiator> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#STRING> .
+_:AX5fXX3aXX40XX5fXX3aXA2137 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#initiator> .
+_:AX5fXX3aXX40XX5fXX3aXA2137 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2137 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#demographis> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#demographis> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_DEMOGRAPHICS> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#demographis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#demographis> <http://www.w3.org/2000/01/rdf-schema#comment> "List of snapshots of all demographic entities reference from the transactions in this extract."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#signature> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#signature> <http://www.w3.org/2000/01/rdf-schema#label> "signature"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#signature> <http://www.w3.org/2000/01/rdf-schema#label> "firma"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#signature> <http://www.w3.org/2000/01/rdf-schema#comment> "Signature of message content"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#signature> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#ATTESTATION> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#signature> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA2146 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2146 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2146 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#sender_node> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#content> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE_CONTENT> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#content> <http://www.w3.org/2000/01/rdf-schema#label> "contenido"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#content> <http://www.w3.org/2000/01/rdf-schema#label> "content"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#content> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#content> <http://www.w3.org/2000/01/rdf-schema#comment> "The content of the message"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA2155 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_DEMOGRAPHICS> .
+_:AX5fXX3aXX40XX5fXX3aXA2155 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA2156 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#sender> <http://www.w3.org/2000/01/rdf-schema#label> "emisor"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#sender> <http://www.w3.org/2000/01/rdf-schema#label> "sender"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#sender> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#PARTY_REF> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#sender> <http://www.w3.org/2000/01/rdf-schema#comment> "Party sending the extract"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#sender> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#sender> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> .
+_:AX5fXX3aXX40XX5fXX3aXA2129 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2129 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#originator> .
+_:AX5fXX3aXX40XX5fXX3aXA2129 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#parties> <http://www.w3.org/2000/01/rdf-schema#label> "partes"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#parties> <http://www.w3.org/2000/01/rdf-schema#label> "parties"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#parties> <http://www.w3.org/2000/01/rdf-schema#comment> "Parties referred to by all PARTY_REF and ATTESTATION instances in this message instance"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#parties> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA2157 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#parties> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#senders_reference> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#senders_reference> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#senders_reference> <http://www.w3.org/2000/01/rdf-schema#label> "referencia en el emisor"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#senders_reference> <http://www.w3.org/2000/01/rdf-schema#label> "senders reference"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#senders_reference> <http://www.w3.org/2000/01/rdf-schema#comment> "Identification of message at sender\u00B4s end"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#senders_reference> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#STRING> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#transaction> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_TRANSACTION> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#transaction> <http://www.w3.org/2000/01/rdf-schema#comment> "The transaction content"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#transaction> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#transaction> <http://www.w3.org/2000/01/rdf-schema#label> "transaccion"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#transaction> <http://www.w3.org/2000/01/rdf-schema#label> "transaction"@en .
+_:AX5fXX3aXX40XX5fXX3aXA2138 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#urgency> .
+_:AX5fXX3aXX40XX5fXX3aXA2138 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2138 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#details> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA2153 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#details> <http://www.w3.org/2000/01/rdf-schema#label> "detalles"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#details> <http://www.w3.org/2000/01/rdf-schema#label> "details"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#details> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#details> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#DATA_STRUCTURE> .
+_:AX5fXX3aXX40XX5fXX3aXA2147 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#time_sent> .
+_:AX5fXX3aXX40XX5fXX3aXA2147 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2147 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2156 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_TERMINOLOGY> .
+_:AX5fXX3aXX40XX5fXX3aXA2156 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA2139 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2139 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#parties> .
+_:AX5fXX3aXX40XX5fXX3aXA2139 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl#SET_PARTY> .
+_:AX5fXX3aXX40XX5fXX3aXA2148 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2148 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#content> .
+_:AX5fXX3aXX40XX5fXX3aXA2148 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#LIST_X_FOLDER> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#LIST_X_FOLDER> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#LIST_T> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#LIST_X_FOLDER> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2152 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#transactions> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#transactions> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_FOLDER> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#transactions> <http://www.w3.org/2000/01/rdf-schema#label> "transacciones"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#transactions> <http://www.w3.org/2000/01/rdf-schema#label> "transactions"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#transactions> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#LIST_X_TRANSACTION> .
+_:AX5fXX3aXX40XX5fXX3aXA2157 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA2158 .
+_:AX5fXX3aXX40XX5fXX3aXA2157 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_TERMINOLOGY> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> ""^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_TERMINOLOGY> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_TERMINOLOGY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2133 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#access_control> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#access_control> <http://www.w3.org/2000/01/rdf-schema#comment> "List of all access_control settings relevant to the Transactions in this extract"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#access_control> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#access_control> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_ACCESS_CONTROL> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> <http://www.w3.org/2000/01/rdf-schema#label> "EXTRACTO DE HISTORIA CLINICA"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2130 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_EHR_EXTRACT"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2127 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE_CONTENT> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "The outer package for information extracted from an EHR by another \nEHR system"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2126 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2132 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2129 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "EHCR_EXTRACT"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2131 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2128 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> "TBD"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> <http://www.w3.org/2000/01/rdf-schema#label> "EHR EXTRACT"@en .
+_:AX5fXX3aXX40XX5fXX3aXA2130 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2130 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#follow_links> .
+_:AX5fXX3aXX40XX5fXX3aXA2130 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2149 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#transaction> .
+_:AX5fXX3aXX40XX5fXX3aXA2149 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#VERSION_TRANSACTION> .
+_:AX5fXX3aXX40XX5fXX3aXA2149 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#receiver> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#receiver> <http://www.w3.org/2000/01/rdf-schema#label> "receiver"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#receiver> <http://www.w3.org/2000/01/rdf-schema#label> ""@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#receiver> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#receiver> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#PARTY_REF> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#receiver> <http://www.w3.org/2000/01/rdf-schema#comment> "Party the extract is sent to"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA2158 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_DEMOGRAPHICS> .
+_:AX5fXX3aXX40XX5fXX3aXA2158 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA2159 .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#folders> <http://www.w3.org/2000/01/rdf-schema#comment> "sub-folders of this folder, including distinct folder trees, which may be separately archetyped"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#folders> <http://www.w3.org/2000/01/rdf-schema#label> "carpetas"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#folders> <http://www.w3.org/2000/01/rdf-schema#label> "folders"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#folders> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#folders> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#LIST_X_FOLDER> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#folders> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_FOLDER> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#original_path> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_EHR_URI> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#original_path> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_TRANSACTION> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#original_path> <http://www.w3.org/2000/01/rdf-schema#label> "camino origen"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#original_path> <http://www.w3.org/2000/01/rdf-schema#label> "original path"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#original_path> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#original_path> <http://www.w3.org/2000/01/rdf-schema#comment> "The original path of the transaction in the cource EHR, used for matching transactions in the receiver\u00B4s EHR"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#time_created> <http://www.w3.org/2000/01/rdf-schema#label> "instante de creacion"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#time_created> <http://www.w3.org/2000/01/rdf-schema#label> "time created"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#time_created> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#time_created> <http://www.w3.org/2000/01/rdf-schema#comment> "Date/time the extract was created"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#time_created> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#time_created> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA2131 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2131 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2131 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#other_participations> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#ehr_id> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#ehr_id> <http://www.w3.org/2000/01/rdf-schema#comment> "Id of the EHR from which the extract was created"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#ehr_id> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#STRING> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#ehr_id> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#ehr_id> <http://www.w3.org/2000/01/rdf-schema#label> ""@es .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#ehr_id> <http://www.w3.org/2000/01/rdf-schema#label> "ehr id"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#LIST_X_TRANSACTION> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#LIST_X_TRANSACTION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#LIST_T> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#LIST_X_TRANSACTION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2125 .
+_:AX5fXX3aXX40XX5fXX3aXA2140 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#sender> .
+_:AX5fXX3aXX40XX5fXX3aXA2140 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2140 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2159 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#MESSAGE> .
+_:AX5fXX3aXX40XX5fXX3aXA2159 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#directory> <http://www.w3.org/2000/01/rdf-schema#comment> "Directory structure of this extract, in shich transactions are contained"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#directory> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#directory> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#EHR_EXTRACT> .
+<http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#directory> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#X_FOLDER> .
+_:AX5fXX3aXX40XX5fXX3aXA2132 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_EXTRACT_RM.owl#include_multimedia> .
+_:AX5fXX3aXX40XX5fXX3aXA2132 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2132 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
Index: /ruby/tags/release-0.5.0/doc/open_ehr/EHR_RM.ntriple
===================================================================
--- /ruby/tags/release-0.5.0/doc/open_ehr/EHR_RM.ntriple	(revision 367)
+++ /ruby/tags/release-0.5.0/doc/open_ehr/EHR_RM.ntriple	(revision 367)
@@ -0,0 +1,452 @@
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#LIST_CONTENT_ITEM> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#LIST_T> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#LIST_CONTENT_ITEM> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2814 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#LIST_CONTENT_ITEM> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA2821 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> .
+_:AX5fXX3aXX40XX5fXX3aXA2821 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#VERSION_REPOSITORY_TRANSACTION> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#VERSION_REPOSITORY_TRANSACTION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#VERSION_REPOSITORY_T> .
+_:AX5fXX3aXX40XX5fXX3aXA2804 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA2804 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#OBSERVATION> .
+_:AX5fXX3aXX40XX5fXX3aXA2784 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#context> .
+_:AX5fXX3aXX40XX5fXX3aXA2784 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2784 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2813 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#data> .
+_:AX5fXX3aXX40XX5fXX3aXA2813 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2813 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#DATA_STRUCTURE> .
+_:AX5fXX3aXX40XX5fXX3aXA2793 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2793 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#HISTORY_T_STRUCTURE> .
+_:AX5fXX3aXX40XX5fXX3aXA2793 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#data> .
+_:AX5fXX3aXX40XX5fXX3aXA2822 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA2822 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA2823 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#HISTORY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#HISTORY> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA2776 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#action> .
+_:AX5fXX3aXX40XX5fXX3aXA2776 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2776 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#time_created> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_DATE_TIME> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#time_created> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EHR> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#time_created> <http://www.w3.org/2000/01/rdf-schema#label> "time created"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#time_created> <http://www.w3.org/2000/01/rdf-schema#label> "instante de creacion"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#time_created> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#time_created> <http://www.w3.org/2000/01/rdf-schema#comment> "time of creation of the repository"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#CONTENT_ITEM> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#CONTENT_ITEM> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> .
+_:AX5fXX3aXX40XX5fXX3aXA2785 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2785 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2785 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#is_persistent> .
+_:AX5fXX3aXX40XX5fXX3aXA2805 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2805 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2805 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#time> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#participations> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#participations> <http://www.w3.org/2000/01/rdf-schema#comment> "Parties involved in the clinical session. These would normally include the physician and often the patient (but not the latter if the clincal session is a pathology test for example)"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#participations> <http://www.w3.org/2000/01/rdf-schema#label> "participations"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#participations> <http://www.w3.org/2000/01/rdf-schema#label> "participantes"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#participations> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#LIST_PARTICIPATION> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#participations> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#CLINICAL_CONTEXT> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#TRANSACTION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2784 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#TRANSACTION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> "Composition class"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#TRANSACTION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "One version in a VERSIONED_TRANSACTION. A transaction is \nconsidered the unit of modification of the record, the unit of \ntransmission in record extracts, and the unit of attestation by \nauthorising clinicians. In this latter sense, it may be considered \nequivalent to a signed document."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#TRANSACTION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2783 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#TRANSACTION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#TRANSACTION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "Composition"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#TRANSACTION> <http://www.w3.org/2000/01/rdf-schema#label> "TRANSACCION"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#TRANSACTION> <http://www.w3.org/2000/01/rdf-schema#label> "TRANSACTION"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#TRANSACTION> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#TRANSACTION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "CDA DOCUMENT"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#TRANSACTION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2782 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#TRANSACTION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_TRANSACTION_VERSION"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#TRANSACTION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2785 .
+_:AX5fXX3aXX40XX5fXX3aXA2814 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#item> .
+_:AX5fXX3aXX40XX5fXX3aXA2814 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#CONTENT_ITEM> .
+_:AX5fXX3aXX40XX5fXX3aXA2814 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2794 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2794 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#CONTRIBUTION> .
+_:AX5fXX3aXX40XX5fXX3aXA2794 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#item> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#VERSIONED_TRANSACTION> <http://www.w3.org/2000/01/rdf-schema#label> "TRANSACCION VERSIONADA"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#VERSIONED_TRANSACTION> <http://www.w3.org/2000/01/rdf-schema#label> "VERSIONED TRANSACTION"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#VERSIONED_TRANSACTION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_VERSIONED_TRANSACTION"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#VERSIONED_TRANSACTION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2811 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#VERSIONED_TRANSACTION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#VERSION_REPOSITORY_TRANSACTION> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#VERSIONED_TRANSACTION> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#VERSIONED_TRANSACTION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Version-controlled transaction abstraction, defined\nby inheriting VERSION_REPOSITORY_TRANSACTION"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EVALUATION> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EVALUATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "Cluster"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EVALUATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#MisUse> "Should not be used for actionable statements such as medication \norders these are represented with the INSTRUCTION type"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EVALUATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "Observation"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EVALUATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_SUBJECTIVE_CONTENT"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EVALUATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Used for all kinds of statements which evaluate other information, \nsuch as interpretations of observations, diagnoses, differential \ndiagnoses, hypotheses, problem assessments and plans"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EVALUATION> <http://www.w3.org/2000/01/rdf-schema#label> "EVALUATION"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EVALUATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2813 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EVALUATION> <http://www.w3.org/2000/01/rdf-schema#label> "EVALUACION"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EVALUATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2812 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EVALUATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EVALUATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Entry type for evaluation statements"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#CLINICAL_CONTEXT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2808 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#CLINICAL_CONTEXT> <http://www.w3.org/2000/01/rdf-schema#label> "CLINICAL CONTEXT"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#CLINICAL_CONTEXT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Documents the clinical context of the clinical session (or encounter).\nThe context information recorded here are independent of the \nattributes recorded in the version audit, which document the \n\"system interaction\" context, i.e. the context of a user interacting with \nthe health record system. Clinical sessions include patient contacts, \nand any other business activity, such aas pathology investigations \nwhich take place on behalf of the patient"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#CLINICAL_CONTEXT> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#CLINICAL_CONTEXT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2809 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#CLINICAL_CONTEXT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2810 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#CLINICAL_CONTEXT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> "Composition"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#CLINICAL_CONTEXT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2805 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#CLINICAL_CONTEXT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2807 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#CLINICAL_CONTEXT> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2806 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#CLINICAL_CONTEXT> <http://www.w3.org/2000/01/rdf-schema#label> "CONTEXTO CLINICO"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#CLINICAL_CONTEXT> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "TBD"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA2823 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA2824 .
+_:AX5fXX3aXX40XX5fXX3aXA2823 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#TRANSACTION> .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#LIST_PARTICIPATION> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#context> <http://www.w3.org/2000/01/rdf-schema#comment> "The clinical session context of this\ntransaction, i.e. the contextual attributes \nof the clinical session"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#context> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#TRANSACTION> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#context> <http://www.w3.org/2000/01/rdf-schema#label> "context"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#context> <http://www.w3.org/2000/01/rdf-schema#label> "contexto"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#context> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#CLINICAL_CONTEXT> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#context> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#folders> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#folders> <http://www.w3.org/2000/01/rdf-schema#comment> "Sub-folders of this FOLDER"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#folders> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#FOLDER> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#folders> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#LIST_FOLDER> .
+_:AX5fXX3aXX40XX5fXX3aXA2777 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2777 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2777 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#profile> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#FOLDER> <http://www.w3.org/2000/01/rdf-schema#label> "FOLDER"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#FOLDER> <http://www.w3.org/2000/01/rdf-schema#label> "CARPETA"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#FOLDER> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> "RecordFolder"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#FOLDER> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#FOLDER> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#FOLDER> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2816 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#FOLDER> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2815 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#FOLDER> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "FOLDER"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#FOLDER> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "The concept of a named folder"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#other_participations> <http://www.w3.org/2000/01/rdf-schema#comment> "Other participations at ENTRY level-archetypable"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#other_participations> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#other_participations> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#other_participations> <http://www.w3.org/2000/01/rdf-schema#label> "other participations"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#other_participations> <http://www.w3.org/2000/01/rdf-schema#label> "otras participaciones"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#other_participations> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#LIST_PARTICIPATION> .
+_:AX5fXX3aXX40XX5fXX3aXA2806 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2806 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#other_context> .
+_:AX5fXX3aXX40XX5fXX3aXA2806 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2786 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2786 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2786 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#contributions> .
+_:AX5fXX3aXX40XX5fXX3aXA2815 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2815 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2815 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#transactions> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#act_id> <http://www.w3.org/2000/01/rdf-schema#comment> "Optional act identifier used by e.g. a\nworkflow system for an act to\nwhich this ENTRY correspondes in\nsome way. This identifier might\nhave internal syntax and meaning to an external\nprocessor."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#act_id> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#act_id> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#act_id> <http://www.w3.org/2000/01/rdf-schema#label> "act id"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#act_id> <http://www.w3.org/2000/01/rdf-schema#label> "id del acto"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#act_id> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#STRING> .
+_:AX5fXX3aXX40XX5fXX3aXA2795 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2795 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#provider> .
+_:AX5fXX3aXX40XX5fXX3aXA2795 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#protocol> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#protocol> <http://www.w3.org/2000/01/rdf-schema#comment> "Description of how and/or why th\ninformation in this entry was arrived\nat. For OBSERVATIONS, this is a description\nof the method or instrument used.\nFor EVALUATIONS, how the evaluation\nwas arrived at. For INSTRUCTIONS, how\nto execute the instruction. This may\ntake the form of references to guidelines,\nincluding manually folowed and executable;\nknoledge references such as paper in Medline;\nclinical reasons within a largercare process"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#protocol> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#protocol> <http://www.w3.org/2000/01/rdf-schema#label> "protocol"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#protocol> <http://www.w3.org/2000/01/rdf-schema#label> "protocolo"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#protocol> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#DATA_STRUCTURE> .
+_:AX5fXX3aXX40XX5fXX3aXA2824 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#VERSIONED_TRANSACTION> .
+_:AX5fXX3aXX40XX5fXX3aXA2824 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA2778 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2778 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2778 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#state> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#subject> <http://www.w3.org/2000/01/rdf-schema#label> "sujeto"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#subject> <http://www.w3.org/2000/01/rdf-schema#label> "subject"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#subject> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA2819 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#subject> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#feeder_audit> <http://www.w3.org/2000/01/rdf-schema#comment> "Audit trail from non-openEHR system of\noriginal commit of information ofrming the\ncontent of the current item."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#feeder_audit> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#TRANSACTION> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#feeder_audit> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#feeder_audit> <http://www.w3.org/2000/01/rdf-schema#label> "auditor origen"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#feeder_audit> <http://www.w3.org/2000/01/rdf-schema#label> "feeder audit"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#feeder_audit> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#VERSION_AUDIT> .
+_:AX5fXX3aXX40XX5fXX3aXA2807 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2807 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#participations> .
+_:AX5fXX3aXX40XX5fXX3aXA2807 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2787 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2787 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2787 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#subject> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#VERSION_REPOSITORY_FOLDER> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#VERSION_REPOSITORY_T> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#VERSION_REPOSITORY_FOLDER> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA2816 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2816 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2816 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#folders> .
+_:AX5fXX3aXX40XX5fXX3aXA2796 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2796 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2796 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#protocol> .
+_:AX5fXX3aXX40XX5fXX3aXA2825 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA2826 .
+_:AX5fXX3aXX40XX5fXX3aXA2825 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA2779 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#DATA_STRUCTURE> .
+_:AX5fXX3aXX40XX5fXX3aXA2779 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#data> .
+_:AX5fXX3aXX40XX5fXX3aXA2779 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2808 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2808 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2808 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#practice_setting> .
+_:AX5fXX3aXX40XX5fXX3aXA2788 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#PARTY_REF> .
+_:AX5fXX3aXX40XX5fXX3aXA2788 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#subject> .
+_:AX5fXX3aXX40XX5fXX3aXA2788 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#LIST_FOLDER> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#LIST_FOLDER> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2817 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#LIST_FOLDER> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#LIST_T> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#action> <http://www.w3.org/2000/01/rdf-schema#comment> "description of the action to be executed"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#action> <http://www.w3.org/2000/01/rdf-schema#label> "action"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#action> <http://www.w3.org/2000/01/rdf-schema#label> "accion"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#action> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#INSTRUCTION> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#action> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#action> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#DATA_STRUCTURE> .
+_:AX5fXX3aXX40XX5fXX3aXA2817 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#FOLDER> .
+_:AX5fXX3aXX40XX5fXX3aXA2817 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2817 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#item> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#contributions> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#contributions> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#LIST_CONTRIBUTION> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#contributions> <http://www.w3.org/2000/01/rdf-schema#label> "contribuciones"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#contributions> <http://www.w3.org/2000/01/rdf-schema#label> "contributions"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#contributions> <http://www.w3.org/2000/01/rdf-schema#comment> "List of contributions causing changes to this EHR.\nEach contribution contains a list of versions, which may\ninclude paths pointing\nto any number of VERSIONABLE items\nitems of type TRANSACTION and FOLDER_TREE"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#contributions> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EHR> .
+_:AX5fXX3aXX40XX5fXX3aXA2797 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#RELATED_PARTY> .
+_:AX5fXX3aXX40XX5fXX3aXA2797 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2797 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#subject> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#LIST_CONTRIBUTION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2794 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#LIST_CONTRIBUTION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#LIST_T> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#LIST_CONTRIBUTION> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#health_care_facility> <http://www.w3.org/2000/01/rdf-schema#label> "health care facility"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#health_care_facility> <http://www.w3.org/2000/01/rdf-schema#label> "servicio del sistema sanitario"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#health_care_facility> <http://www.w3.org/2000/01/rdf-schema#comment> "The HCF in the health system which took\npart in the encounter; usually, this\nis where the encounter physically took place, but\nnot in the case of patinet home visits, internet\ncontacts or emergency care."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#health_care_facility> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#PARTY_REF> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#health_care_facility> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#CLINICAL_CONTEXT> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#health_care_facility> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ORGANISER> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#OMGHDTF> "COAS::CompositeObservation"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ORGANISER> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "Headed_section"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ORGANISER> <http://www.w3.org/2000/01/rdf-schema#label> "ORGANISER"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ORGANISER> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Created according to archetyped structures for typical headings \nsuch as SOAP, physical examination, but also pathology result heading \nstructures"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ORGANISER> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ORGANISER> <http://www.w3.org/2000/01/rdf-schema#label> "ORGANIZADOR"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ORGANISER> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#MisUse> "Should not be used instead of ENTRY hierarchical structures."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ORGANISER> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Represents a heading in a heading structure, or \"organiser tree\""^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ORGANISER> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#CONTENT_ITEM> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ORGANISER> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2818 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#provider> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#PARTICIPATION> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#provider> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#provider> <http://www.w3.org/2000/01/rdf-schema#comment> "Id of provider of statement in this ENTRY,\nwhich might be:\nthe patient\na patient agent (parent, guardian...)\nthe clinician\na device or software"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#provider> <http://www.w3.org/2000/01/rdf-schema#label> "proveedor"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#provider> <http://www.w3.org/2000/01/rdf-schema#label> "provider"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#provider> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA2826 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#INSTRUCTION> .
+_:AX5fXX3aXX40XX5fXX3aXA2826 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA2827 .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#OMGDTF> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
+_:AX5fXX3aXX40XX5fXX3aXA2789 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#directory> .
+_:AX5fXX3aXX40XX5fXX3aXA2789 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2789 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2809 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2809 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2809 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#location> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#profile> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#profile> <http://www.w3.org/2000/01/rdf-schema#comment> "configuration data mappings from archetyped model of action"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#profile> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#INSTRUCTION> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#profile> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#DATA_STRUCTURE> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#profile> <http://www.w3.org/2000/01/rdf-schema#label> "perfil"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#profile> <http://www.w3.org/2000/01/rdf-schema#label> "profile"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#VERSION_TRANSACTION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#VERSION_T> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#VERSION_TRANSACTION> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA2818 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2818 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#items> .
+_:AX5fXX3aXX40XX5fXX3aXA2818 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2798 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2798 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#act_id> .
+_:AX5fXX3aXX40XX5fXX3aXA2798 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> "The Item class is the clossest match for Entry as described here"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2797 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> <http://protege.stanford.edu/plugins/owl/protege#abstract> "true"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> <http://www.w3.org/2000/01/rdf-schema#label> "ENTRADA"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#OMGHDTF> "COAS::HealthRecordEntry and COAS::ObservationQualifier, a generic\nclass which is used to represent context attributes which are \nconcretely modelled here\n"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> <http://www.w3.org/2002/07/owl#equivalentClass> _:AX5fXX3aXX40XX5fXX3aXA2801 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> <http://www.w3.org/2000/01/rdf-schema#label> "ENTRY"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2800 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#OMGDTF> "COAS::HealthRecordEntry and COAS::ObservationQualifier"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#CONTENT_ITEM> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "*_CONTENT"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2795 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2798 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "Act"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2799 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "The abstract parent of all ENTRY subtypes. An ENTRY is the root of a \nlogical item of \"hard\" clinical information created in the \"clinical \nstatement\" context. It is also the minimal unit of information any query \nshould return."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2796 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "ClusterOCC"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#data> <http://www.w3.org/2000/01/rdf-schema#label> "datos"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#data> <http://www.w3.org/2000/01/rdf-schema#label> "data"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#data> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA2825 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#data> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#guideline_id> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#OBJECT_REF> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#guideline_id> <http://www.w3.org/2000/01/rdf-schema#comment> "Identifier guideline creating this action if relevant"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#guideline_id> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#guideline_id> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#INSTRUCTION> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#guideline_id> <http://www.w3.org/2000/01/rdf-schema#label> "guideline id"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#guideline_id> <http://www.w3.org/2000/01/rdf-schema#label> "identificador de la guia (protocolo)"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#practice_setting> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#practice_setting> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_TEXT> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#practice_setting> <http://www.w3.org/2000/01/rdf-schema#comment> "The practice setting, e.g. \"outpatient facility\", \"hospital unit\", \"general practice\" etc, which may be optionally coded. HL7 PracticeSetting domain may be useful for this."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#practice_setting> <http://www.w3.org/2000/01/rdf-schema#label> "catacteristicas practicas"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#practice_setting> <http://www.w3.org/2000/01/rdf-schema#label> "practice setting"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#practice_setting> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#CLINICAL_CONTEXT> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#INSTRUCTION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2779 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#INSTRUCTION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_INSTRUCTION"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#INSTRUCTION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2781 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#INSTRUCTION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "Used for any actionable statement such as medication and therapeutic \norders, monitoring, recall and review. Enoug details must be provided \nfor the specification to be excuted by an actor."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#INSTRUCTION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2778 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#INSTRUCTION> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#INSTRUCTION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2780 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#INSTRUCTION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2777 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#INSTRUCTION> <http://www.w3.org/2000/01/rdf-schema#label> "INSTRUCTION"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#INSTRUCTION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2776 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#INSTRUCTION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "n/a"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#INSTRUCTION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "Act subtype Substance_adminsitration, any Act type which is really an \naction specification (cf and Act in the past)"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#INSTRUCTION> <http://www.w3.org/2000/01/rdf-schema#label> "INSTRUCCION"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#INSTRUCTION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#INSTRUCTION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "The root of an action specification"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#INSTRUCTION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#MisUse> "Not to be used for plan items which are only specified in general terms, \ne.g. \"comence bronchodilator\""^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA2827 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA2828 .
+_:AX5fXX3aXX40XX5fXX3aXA2827 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EVALUATION> .
+_:AX5fXX3aXX40XX5fXX3aXA2800 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2800 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2800 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#other_participations> .
+_:AX5fXX3aXX40XX5fXX3aXA2780 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#data> .
+_:AX5fXX3aXX40XX5fXX3aXA2780 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2780 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2819 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA2819 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA2820 .
+_:AX5fXX3aXX40XX5fXX3aXA2799 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2799 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#subject> .
+_:AX5fXX3aXX40XX5fXX3aXA2799 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2828 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#OBSERVATION> .
+_:AX5fXX3aXX40XX5fXX3aXA2828 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#items> <http://www.w3.org/2000/01/rdf-schema#comment> "Ordered list of content items under this organiser, which may include:\nmore ORGANISERs\nENTRYs"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#items> <http://www.w3.org/2000/01/rdf-schema#label> "content items"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#items> <http://www.w3.org/2000/01/rdf-schema#label> "elementos contenidos"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#items> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#items> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ORGANISER> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#items> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#LIST_CONTENT_ITEM> .
+_:AX5fXX3aXX40XX5fXX3aXA2801 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA2801 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA2802 .
+_:AX5fXX3aXX40XX5fXX3aXA2781 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2781 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#guideline_id> .
+_:AX5fXX3aXX40XX5fXX3aXA2781 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EHR> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2788 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EHR> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EHR> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "The EHR class is the centre node of the EHR \"repository\" \nfor a subject of care"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EHR> <http://www.w3.org/2000/01/rdf-schema#label> "ehr"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EHR> <http://www.w3.org/2000/01/rdf-schema#label> "ehr"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EHR> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2789 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EHR> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> "RecordFolder class"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EHR> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "EHCR"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EHR> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2790 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EHR> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_EHR"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EHR> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2786 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EHR> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2787 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EHR> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2791 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EHR> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Common_RM.owl#LOCATABLE> .
+_:AX5fXX3aXX40XX5fXX3aXA2810 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2810 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2810 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#health_care_facility> .
+_:AX5fXX3aXX40XX5fXX3aXA2790 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2790 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#all_transactions> .
+_:AX5fXX3aXX40XX5fXX3aXA2790 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#time> <http://www.w3.org/2000/01/rdf-schema#label> "intervalo de la sesion"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#time> <http://www.w3.org/2000/01/rdf-schema#label> "session time"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#time> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#CLINICAL_CONTEXT> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#time> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_INTERVAL_DV_DATE_TIME> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#time> <http://www.w3.org/2000/01/rdf-schema#comment> "Start and endd times of the clinical sesion"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#time> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#OBSERVATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2793 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#OBSERVATION> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#OBSERVATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> "G1_OBSERVATION_CONTENT, G1_SUBJECTIVE_CONTENT"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#OBSERVATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> "Entry subtype for all clinical data in the past or present, i.e. which\n(by the time it is recorded) has already ocurred. OBSERVATION data\nis expressed using the class HISTORY_T, which guarantees that\nit is situated in time."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#OBSERVATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> "Cluster"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#OBSERVATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ENTRY> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#OBSERVATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> "OBSERVATION is used for all notional objective (i.e. measured in some\nway) observations of phenomenena as well as all statements or\nopinios (i.e. subjective data) about things in the past.\n"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#OBSERVATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#MisUse> "not used for future statements of any kind, including instructions, \nintentions, plans etc..."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#OBSERVATION> <http://www.w3.org/2000/01/rdf-schema#label> "OBSERVACION"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#OBSERVATION> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> "Observation"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#OBSERVATION> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA2792 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#OBSERVATION> <http://www.w3.org/2000/01/rdf-schema#label> "OBSERVATION"@en .
+<http://trajano.us.es/~isabel/EHR/Common_RM.owl#VERSION_T> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Ontology> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl> <http://www.w3.org/2002/07/owl#imports> <http://protege.stanford.edu/plugins/owl/protege> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl> <http://www.w3.org/2002/07/owl#imports> <http://trajano.us.es/~isabel/EHR/Demographic_RM.owl> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl> <http://www.w3.org/2000/01/rdf-schema#comment> "Ontology based on the openEHR EHR Reference Model\nRevision: 4.3.2\nWritten in owl by Isabel Roman"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#location> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#location> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#STRING> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#location> <http://www.w3.org/2000/01/rdf-schema#label> "location"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#location> <http://www.w3.org/2000/01/rdf-schema#label> "localizacion"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#location> <http://www.w3.org/2000/01/rdf-schema#comment> "The actual location where the session occurred, e.g. \"microbiol lab 2\", \"home\", \"ward A3\" and so on"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#location> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#CLINICAL_CONTEXT> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#other_context> <http://www.w3.org/2000/01/rdf-schema#label> "other context"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#other_context> <http://www.w3.org/2000/01/rdf-schema#label> "otros contextos"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#other_context> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Structures_RM.owl#DATA_STRUCTURE> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#other_context> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#CLINICAL_CONTEXT> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#other_context> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#other_context> <http://www.w3.org/2000/01/rdf-schema#comment> "Other optional context which will be archetyped."^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA2802 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#INSTRUCTION> .
+_:AX5fXX3aXX40XX5fXX3aXA2802 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA2803 .
+_:AX5fXX3aXX40XX5fXX3aXA2782 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#content> .
+_:AX5fXX3aXX40XX5fXX3aXA2782 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2782 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2811 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#is_persistent> .
+_:AX5fXX3aXX40XX5fXX3aXA2811 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2811 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2791 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2791 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#time_created> .
+_:AX5fXX3aXX40XX5fXX3aXA2791 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#is_persistent> <http://www.w3.org/2000/01/rdf-schema#label> "is persistent"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#is_persistent> <http://www.w3.org/2000/01/rdf-schema#label> "es persistente"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#is_persistent> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#is_persistent> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#BOOLEAN> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#is_persistent> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA2822 .
+_:AX5fXX3aXX40XX5fXX3aXA2820 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EHR> .
+_:AX5fXX3aXX40XX5fXX3aXA2820 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA2821 .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#content> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#TRANSACTION> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#content> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#ORGANISER> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#content> <http://www.w3.org/2000/01/rdf-schema#label> "content"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#content> <http://www.w3.org/2000/01/rdf-schema#label> "contenido"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#content> <http://www.w3.org/2000/01/rdf-schema#comment> "The clinical session content\nof this transaction, i.e. the\ninformation generated in the clinical session"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#LIST_OBJECT_ID> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA2803 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA2804 .
+_:AX5fXX3aXX40XX5fXX3aXA2803 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EVALUATION> .
+_:AX5fXX3aXX40XX5fXX3aXA2783 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2783 <http://www.w3.org/2002/07/owl#maxCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2783 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#feeder_audit> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#all_transactions> <http://www.w3.org/2000/01/rdf-schema#label> "all transactions"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#all_transactions> <http://www.w3.org/2000/01/rdf-schema#label> "todas las transacciones"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#all_transactions> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#LIST_OBJECT_ID> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#all_transactions> <http://www.w3.org/2000/01/rdf-schema#comment> "Master list of all transaction references in this EHR"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#all_transactions> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EHR> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#all_transactions> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#directory> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#EHR> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#directory> <http://www.w3.org/2000/01/rdf-schema#comment> "Optional directory structure for this EHR"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#directory> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#directory> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#VERSION_REPOSITORY_FOLDER> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#directory> <http://www.w3.org/2000/01/rdf-schema#label> "directory"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#directory> <http://www.w3.org/2000/01/rdf-schema#label> "directorio"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#transactions> <http://www.w3.org/2000/01/rdf-schema#label> "transacciones"@es .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#transactions> <http://www.w3.org/2000/01/rdf-schema#label> "transactions"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#transactions> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#FOLDER> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#transactions> <http://www.w3.org/2000/01/rdf-schema#comment> "The list of references to versioned\ntransactions in this folder. Since more\nthan one folder can\ninclude the same transaction, this\nrelationship is an association."^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#transactions> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#transactions> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#LIST_OBJECT_ID> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#state> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#state> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Data_Types_RM.owl#DV_STATE> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#state> <http://www.w3.org/2000/01/rdf-schema#comment> "current state of the action in a state machine description"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#state> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#INSTRUCTION> .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#state> <http://www.w3.org/2000/01/rdf-schema#label> "state"@en .
+<http://trajano.us.es/~isabel/EHR/EHR_RM.owl#state> <http://www.w3.org/2000/01/rdf-schema#label> "estado"@es .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#OBJECT_REF> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA2812 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2812 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#data> .
+_:AX5fXX3aXX40XX5fXX3aXA2812 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA2792 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/EHR_RM.owl#data> .
+_:AX5fXX3aXX40XX5fXX3aXA2792 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA2792 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
Index: /ruby/tags/release-0.5.0/doc/open_ehr/Support_RM.ntriple
===================================================================
--- /ruby/tags/release-0.5.0/doc/open_ehr/Support_RM.ntriple	(revision 367)
+++ /ruby/tags/release-0.5.0/doc/open_ehr/Support_RM.ntriple	(revision 367)
@@ -0,0 +1,226 @@
+_:AX5fXX3aXX40XX5fXX3aXA3403 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#upper_unbounded> .
+_:AX5fXX3aXX40XX5fXX3aXA3403 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA3403 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#SET_T> <http://www.w3.org/2000/01/rdf-schema#comment> "Asumed types"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#SET_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CONTAINER_T> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#SET_T> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#OMGHDTF> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#AnnotationProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#OMGHDTF> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#OMGHDTF> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTEGER.value> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTEGER.value> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTEGER_64> <http://www.w3.org/2000/01/rdf-schema#comment> "Asumed types"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTEGER_64> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTEGER_64> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA3413 .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTEGER_64> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#NUMERIC> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTEGER_64> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA3412 .
+_:AX5fXX3aXX40XX5fXX3aXA3412 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA3412 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA3412 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#value> .
+_:AX5fXX3aXX40XX5fXX3aXA3392 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://www.w3.org/2001/XMLSchema#float> .
+_:AX5fXX3aXX40XX5fXX3aXA3392 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA3392 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#value> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#local_id> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#local_id> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#STRING> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#CHARACTER> <http://www.w3.org/2000/01/rdf-schema#comment> "Asumed types"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#CHARACTER> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#CHARACTER> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Any> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#BAG_T> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#BAG_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CONTAINER_T> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#COMPARABLE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#COMPARABLE> <http://www.w3.org/2000/01/rdf-schema#comment> "abstract notional parent class of comparable types, which are types which have the '<' defined"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#COMPARABLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Any> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#CODE_SET_INTERFACE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#CODE_SET_INTERFACE> <http://www.w3.org/2000/01/rdf-schema#comment> "Defines an object provindg proxy access to a code_set"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#rm_originator> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#rm_originator> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#STRING> .
+_:AX5fXX3aXX40XX5fXX3aXA3404 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA3404 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#lower_unbounded> .
+_:AX5fXX3aXX40XX5fXX3aXA3404 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA3393 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#value> .
+_:AX5fXX3aXX40XX5fXX3aXA3393 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA3393 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA3413 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#value> .
+_:AX5fXX3aXX40XX5fXX3aXA3413 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA3413 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#AnnotationProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#HL7> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#namespace> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#namespace> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#STRING> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#TERMINOLOGY_INTERFACE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#TERMINOLOGY_INTERFACE> <http://www.w3.org/2000/01/rdf-schema#comment> "Defines an object providing proxy access to a terminology"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA3405 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA3405 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA3405 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#value> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#KB_051479_Slot_2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#NUMERIC> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Any> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#NUMERIC> <http://www.w3.org/2000/01/rdf-schema#comment> "Asumed types"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#NUMERIC> <http://protege.stanford.edu/plugins/owl/protege#abstract> "true"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#NUMERIC> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#NUMERIC> <http://www.w3.org/2002/07/owl#equivalentClass> _:AX5fXX3aXX40XX5fXX3aXA3394 .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#DOUBLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA3400 .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#DOUBLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA3399 .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#DOUBLE> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#NUMERIC> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#DOUBLE> <http://www.w3.org/2000/01/rdf-schema#comment> "Asumed types"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#DOUBLE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA3414 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA3414 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA3415 .
+_:AX5fXX3aXX40XX5fXX3aXA3394 <http://www.w3.org/2002/07/owl#unionOf> _:AX5fXX3aXX40XX5fXX3aXA3395 .
+_:AX5fXX3aXX40XX5fXX3aXA3394 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#id> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTERVAL_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA3404 .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTERVAL_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Any> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTERVAL_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA3403 .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTERVAL_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA3402 .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTERVAL_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA3401 .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTERVAL_T> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA3406 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA3406 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA3406 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#value> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#rm_concept> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#rm_concept> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#STRING> .
+_:AX5fXX3aXX40XX5fXX3aXA3415 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CHARACTER> .
+_:AX5fXX3aXX40XX5fXX3aXA3415 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA3416 .
+_:AX5fXX3aXX40XX5fXX3aXA3395 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTEGER> .
+_:AX5fXX3aXX40XX5fXX3aXA3395 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA3396 .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#AnnotationProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#CEN> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#AnnotationProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#Use> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#specialisation> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#STRING> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#specialisation> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#ARRAY_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CONTAINER_T> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#ARRAY_T> <http://www.w3.org/2000/01/rdf-schema#comment> "Asumed types"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#ARRAY_T> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#AnnotationProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#Synapses> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#item> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#item> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CONTAINER_T> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#upper_unbounded> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#upper_unbounded> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTERVAL_T> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#upper_unbounded> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#BOOLEAN> .
+_:AX5fXX3aXX40XX5fXX3aXA3407 <http://www.w3.org/2002/07/owl#oneOf> _:AX5fXX3aXX40XX5fXX3aXA3408 .
+_:AX5fXX3aXX40XX5fXX3aXA3407 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#lower> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#lower> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTERVAL_T> .
+_:AX5fXX3aXX40XX5fXX3aXA3416 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#BOOLEAN> .
+_:AX5fXX3aXX40XX5fXX3aXA3416 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA3417 .
+_:AX5fXX3aXX40XX5fXX3aXA3396 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA3396 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#REAL> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#upper> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#upper> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTERVAL_T> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#value> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#value> <http://www.w3.org/2000/01/rdf-schema#domain> _:AX5fXX3aXX40XX5fXX3aXA3414 .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#FALSE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#BOOLEAN> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#FALSE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#value> "false"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Ontology> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl> <http://www.w3.org/2002/07/owl#imports> <http://protege.stanford.edu/plugins/owl/protege> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl> <http://www.w3.org/2000/01/rdf-schema#comment> "Based on Revision 1.1. 11 Mar 2004\nChanges made on Jul 14 2004\nPacket e"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#TRUE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#BOOLEAN> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#TRUE> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#value> "true"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTEGER> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#NUMERIC> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTEGER> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA3406 .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTEGER> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA3405 .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTEGER> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTEGER> <http://www.w3.org/2000/01/rdf-schema#comment> "Asumed types"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA3408 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#FALSE> .
+_:AX5fXX3aXX40XX5fXX3aXA3408 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA3409 .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#MisUse> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#MisUse> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#AnnotationProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#MisUse> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#type> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#STRING> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#concept> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#STRING> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#concept> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA3417 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTEGER> .
+_:AX5fXX3aXX40XX5fXX3aXA3417 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA3418 .
+_:AX5fXX3aXX40XX5fXX3aXA3397 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA3397 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#value> .
+_:AX5fXX3aXX40XX5fXX3aXA3397 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#rm_id> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#STRING> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#rm_id> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#AnnotationProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#Purpose> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA3409 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:AX5fXX3aXX40XX5fXX3aXA3409 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#TRUE> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#AnnotationProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#ISO18308> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#CONTAINER_T> <http://www.w3.org/2000/01/rdf-schema#comment> "Asumed types"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#CONTAINER_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA3398 .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#CONTAINER_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Any> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#CONTAINER_T> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#LIST_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#CONTAINER_T> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#LIST_T> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/1999/02/22-rdf-syntax-ns#List> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#LIST_T> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#LIST_T> <http://www.w3.org/2000/01/rdf-schema#comment> "Asumed types"^^<http://www.w3.org/2001/XMLSchema#string> .
+_:AX5fXX3aXX40XX5fXX3aXA3418 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#DOUBLE> .
+_:AX5fXX3aXX40XX5fXX3aXA3418 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA3419 .
+_:AX5fXX3aXX40XX5fXX3aXA3398 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA3398 <http://www.w3.org/2002/07/owl#minCardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA3398 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#item> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#REAL> <http://www.w3.org/2000/01/rdf-schema#comment> "Asumed types"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#REAL> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#REAL> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#NUMERIC> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#REAL> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA3393 .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#REAL> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA3392 .
+_:AX5fXX3aXX40XX5fXX3aXA3400 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA3400 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#value> .
+_:AX5fXX3aXX40XX5fXX3aXA3400 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://www.w3.org/2001/XMLSchema#float> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#STRING> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#STRING> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA3397 .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#STRING> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Any> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#STRING> <http://www.w3.org/2000/01/rdf-schema#comment> "Asumed types"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#REAL.value> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#REAL.value> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#float> .
+_:AX5fXX3aXX40XX5fXX3aXA3419 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTEGER_64> .
+_:AX5fXX3aXX40XX5fXX3aXA3419 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:AX5fXX3aXX40XX5fXX3aXA3420 .
+_:AX5fXX3aXX40XX5fXX3aXA3399 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA3399 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA3399 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#value> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#Boolean.value> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#boolean> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#Boolean.value> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#MEASUREMENT_SERVICE_ACCESS> <http://www.w3.org/2000/01/rdf-schema#comment> "Defines an object providing proxy access to a measurment information service"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#MEASUREMENT_SERVICE_ACCESS> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA3401 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#lower> .
+_:AX5fXX3aXX40XX5fXX3aXA3401 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA3401 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#lower_unbounded> <http://www.w3.org/2000/01/rdf-schema#domain> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#INTERVAL_T> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#lower_unbounded> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#BOOLEAN> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#lower_unbounded> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#TERMINOLOGY_SERVICE_ACCESS> <http://www.w3.org/2000/01/rdf-schema#comment> "Defines an object providing proxy access to a terminology service"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#TERMINOLOGY_SERVICE_ACCESS> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA3410 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA3410 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://www.w3.org/2001/XMLSchema#boolean> .
+_:AX5fXX3aXX40XX5fXX3aXA3410 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#value> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#AnnotationProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#GEHR> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#String.value> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#String.value> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#version_id> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#version_id> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#STRING> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#context_id> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+_:AX5fXX3aXX40XX5fXX3aXA3402 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#upper> .
+_:AX5fXX3aXX40XX5fXX3aXA3402 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA3402 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA3411 <http://www.w3.org/2002/07/owl#cardinality> "1"^^<http://www.w3.org/2001/XMLSchema#int> .
+_:AX5fXX3aXX40XX5fXX3aXA3411 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
+_:AX5fXX3aXX40XX5fXX3aXA3411 <http://www.w3.org/2002/07/owl#onProperty> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#value> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#BOOLEAN> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA3411 .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#BOOLEAN> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:AX5fXX3aXX40XX5fXX3aXA3410 .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#BOOLEAN> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#Any> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#BOOLEAN> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#BOOLEAN> <http://www.w3.org/2002/07/owl#equivalentClass> _:AX5fXX3aXX40XX5fXX3aXA3407 .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#BOOLEAN> <http://www.w3.org/2000/01/rdf-schema#comment> "Asumed types"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#name> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#name> <http://www.w3.org/2000/01/rdf-schema#range> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#STRING> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#Any> <http://www.w3.org/2000/01/rdf-schema#comment> "All types"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://trajano.us.es/~isabel/EHR/Support_RM.owl#Any> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
+_:AX5fXX3aXX40XX5fXX3aXA3420 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://trajano.us.es/~isabel/EHR/Support_RM.owl#STRING> .
+_:AX5fXX3aXX40XX5fXX3aXA3420 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
Index: /ruby/tags/release-0.5.0/doc/open_ehr/adl.bnf
===================================================================
--- /ruby/tags/release-0.5.0/doc/open_ehr/adl.bnf	(revision 367)
+++ /ruby/tags/release-0.5.0/doc/open_ehr/adl.bnf	(revision 367)
@@ -0,0 +1,65 @@
+%token <STRING> V_IDENTIFIER
+%token <STRING> V_ARCHETYPE_ID
+%token <STRING> V_LOCAL_TERM_CODE_REF
+%token <STRING> V_DADL_TEXT V_CADL_TEXT V_ASSERTION_TEXT
+%token <STRING> V_VERSION_STRING
+
+%token SYM_ARCHETYPE SYM_CONCEPT SYM_SPECIALIZE
+%token SYM_DEFINITION SYM_LANGUAGE
+%token SYM_DESCRIPTION SYM_ONTOLOGY SYM_INVARIANT
+%token SYM_ADL_VERSION SYM_IS_CONTROLLED
+
+%%
+
+input: archetype	
+	| error
+
+archetype: arch_identification 
+	   	arch_specialisation 
+		arch_concept 
+		arch_language 
+		arch_description 
+		arch_definition 
+		arch_invariant
+		arch_ontology
+
+
+arch_identification: arch_head V_ARCHETYPE_ID 
+	| SYM_ARCHETYPE error
+
+arch_head: SYM_ARCHETYPE 
+	| SYM_ARCHETYPE arch_meta_data
+
+arch_meta_data: '(' arch_meta_data_items ')'
+
+arch_meta_data_items: arch_meta_data_item
+	| arch_meta_data_items ';' arch_meta_data_item
+
+arch_meta_data_item: SYM_ADL_VERSION '=' V_VERSION_STRING
+	| SYM_IS_CONTROLLED
+
+arch_specialisation: -- empty is ok
+	| SYM_SPECIALIZE V_ARCHETYPE_ID 
+	| SYM_SPECIALIZE error
+
+arch_concept: SYM_CONCEPT V_LOCAL_TERM_CODE_REF 
+	| SYM_CONCEPT error
+
+arch_language: -- empty is ok for ADL 1.4 tools
+	| SYM_LANGUAGE V_DADL_TEXT
+	| SYM_LANGUAGE error
+
+arch_description: -- no meta-data ok
+	| SYM_DESCRIPTION V_DADL_TEXT 
+	| SYM_DESCRIPTION error
+
+arch_definition:	SYM_DEFINITION V_CADL_TEXT	
+	| SYM_DEFINITION error
+
+arch_invariant: -- no invariant ok
+	| SYM_INVARIANT V_ASSERTION_TEXT
+	| SYM_INVARIANT error
+
+arch_ontology: SYM_ONTOLOGY V_DADL_TEXT
+	| SYM_ONTOLOGY error
+
Index: /ruby/tags/release-0.5.0/doc/open_ehr/dadl.bnf
===================================================================
--- /ruby/tags/release-0.5.0/doc/open_ehr/dadl.bnf	(revision 367)
+++ /ruby/tags/release-0.5.0/doc/open_ehr/dadl.bnf	(revision 367)
@@ -0,0 +1,240 @@
+
+input: attr_vals	-- anonymous object
+	| complex_object_block
+	| error
+
+---------------------- body ---------------------
+
+attr_vals: attr_val
+	| attr_vals attr_val
+	| attr_vals ';' attr_val
+
+
+attr_val: attr_id SYM_EQ object_block -- could be a single or multiple attr
+
+attr_id: V_ATTRIBUTE_IDENTIFIER
+	| V_ATTRIBUTE_IDENTIFIER error
+
+--
+-- An object_block is any block enclosed in <> with optional leading type name
+--
+object_block: complex_object_block
+	| primitive_object_block
+
+complex_object_block: single_attr_object_block
+	| multiple_attr_object_block
+
+--
+-- --------------------------- multiple attr objects -------------------------------
+--
+multiple_attr_object_block: untyped_multiple_attr_object_block 
+	| type_identifier untyped_multiple_attr_object_block
+
+untyped_multiple_attr_object_block: multiple_attr_object_block_head keyed_objects SYM_END_DBLOCK
+
+multiple_attr_object_block_head: SYM_START_DBLOCK
+
+keyed_objects: keyed_object
+	| keyed_objects keyed_object
+
+keyed_object: object_key SYM_EQ object_block
+
+object_key: '[' simple_value ']'
+
+--
+-- --------------------------- single attr objects -------------------------------
+--
+
+single_attr_object_block: untyped_single_attr_object_block
+	| type_identifier untyped_single_attr_object_block
+
+--
+-- An untyped_single_attr_object_block is any block of the form:
+--	<
+--		attr1 = <...>
+--		attr2 = <...>
+--		attrN = <...>
+--	>
+--
+untyped_single_attr_object_block: single_attr_object_complex_head SYM_END_DBLOCK
+	| single_attr_object_complex_head attr_vals SYM_END_DBLOCK
+	;
+
+single_attr_object_complex_head: SYM_START_DBLOCK
+
+
+--
+-- ------------------------- primitive objects ---------------------
+--
+primitive_object_block: untyped_primitive_object_block
+	| type_identifier untyped_primitive_object_block
+
+untyped_primitive_object_block: SYM_START_DBLOCK primitive_object_value SYM_END_DBLOCK
+
+primitive_object_value: simple_value
+	| simple_list_value
+	| simple_interval_value
+	| term_code
+	| term_code_list_value
+
+simple_value: string_value
+	| integer_value
+	| real_value
+	| boolean_value
+	| character_value
+	| date_value
+	| time_value
+	| date_time_value
+	| duration_value
+	| uri_value
+
+simple_list_value: string_list_value
+	| integer_list_value
+	| real_list_value
+	| boolean_list_value
+	| character_list_value
+	| date_list_value
+	| time_list_value
+	| date_time_list_value
+	| duration_list_value
+
+simple_interval_value: integer_interval_value
+	| real_interval_value
+	| date_interval_value
+	| time_interval_value
+	| date_time_interval_value
+	| duration_interval_value
+
+---------------------- BASIC DATA VALUES -----------------------
+
+type_identifier: V_TYPE_IDENTIFIER
+	| V_GENERIC_TYPE_IDENTIFIER
+
+string_value: V_STRING
+
+string_list_value: V_STRING ',' V_STRING
+	| string_list_value ',' V_STRING
+	| V_STRING ',' SYM_LIST_CONTINUE
+
+integer_value: V_INTEGER {
+	| '+' V_INTEGER {
+	| '-' V_INTEGER {
+
+integer_list_value: integer_value ',' integer_value
+	| integer_list_value ',' integer_value
+	| integer_value ',' SYM_LIST_CONTINUE
+
+integer_interval_value: SYM_INTERVAL_DELIM integer_value SYM_ELLIPSIS integer_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_GT integer_value SYM_ELLIPSIS integer_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM integer_value SYM_ELLIPSIS SYM_LT integer_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_GT integer_value SYM_ELLIPSIS SYM_LT integer_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_LT integer_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_LE integer_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_GT integer_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_GE integer_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM integer_value SYM_INTERVAL_DELIM
+
+real_value: V_REAL 
+	| '+' V_REAL 
+	| '-' V_REAL 
+
+real_list_value: real_value ',' real_value
+	| real_list_value ',' real_value
+	| real_value ',' SYM_LIST_CONTINUE
+
+real_interval_value: SYM_INTERVAL_DELIM real_value SYM_ELLIPSIS real_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_GT real_value SYM_ELLIPSIS real_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM real_value SYM_ELLIPSIS SYM_LT real_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_GT real_value SYM_ELLIPSIS SYM_LT real_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_LT real_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_LE real_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_GT real_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_GE real_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM real_value SYM_INTERVAL_DELIM
+
+boolean_value: SYM_TRUE
+	| SYM_FALSE
+
+boolean_list_value: boolean_value ',' boolean_value
+	| boolean_list_value ',' boolean_value
+	| boolean_value ',' SYM_LIST_CONTINUE
+
+character_value: V_CHARACTER
+
+character_list_value: character_value ',' character_value
+	| character_list_value ',' character_value
+	| character_value ',' SYM_LIST_CONTINUE
+
+date_value: V_ISO8601_EXTENDED_DATE -- in ISO8601 form yyyy-MM-dd
+
+date_list_value: date_value ',' date_value
+	| date_list_value ',' date_value
+	| date_value ',' SYM_LIST_CONTINUE
+
+date_interval_value: SYM_INTERVAL_DELIM date_value SYM_ELLIPSIS date_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_GT date_value SYM_ELLIPSIS date_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM date_value SYM_ELLIPSIS SYM_LT date_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_GT date_value SYM_ELLIPSIS SYM_LT date_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_LT date_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_LE date_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_GT date_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_GE date_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM date_value SYM_INTERVAL_DELIM
+
+time_value: V_ISO8601_EXTENDED_TIME
+
+time_list_value: time_value ',' time_value
+	| time_list_value ',' time_value
+	| time_value ',' SYM_LIST_CONTINUE
+
+time_interval_value: SYM_INTERVAL_DELIM time_value SYM_ELLIPSIS time_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_GT time_value SYM_ELLIPSIS time_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM time_value SYM_ELLIPSIS SYM_LT time_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_GT time_value SYM_ELLIPSIS SYM_LT time_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_LT time_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_LE time_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_GT time_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_GE time_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM time_value SYM_INTERVAL_DELIM
+
+date_time_value: V_ISO8601_EXTENDED_DATE_TIME
+
+date_time_list_value: date_time_value ',' date_time_value
+	| date_time_list_value ',' date_time_value
+	| date_time_value ',' SYM_LIST_CONTINUE
+
+date_time_interval_value: SYM_INTERVAL_DELIM date_time_value SYM_ELLIPSIS date_time_value  SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_GT date_time_value SYM_ELLIPSIS date_time_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM date_time_value SYM_ELLIPSIS SYM_LT date_time_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_GT date_time_value SYM_ELLIPSIS SYM_LT date_time_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_LT date_time_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_LE date_time_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_GT date_time_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_GE date_time_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM date_time_value SYM_INTERVAL_DELIM
+
+duration_value: V_ISO8601_DURATION
+
+duration_list_value: duration_value ',' duration_value
+	| duration_list_value ',' duration_value
+	| duration_value ',' SYM_LIST_CONTINUE
+
+duration_interval_value: SYM_INTERVAL_DELIM duration_value SYM_ELLIPSIS duration_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_GT duration_value SYM_ELLIPSIS duration_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM duration_value SYM_ELLIPSIS SYM_LT duration_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_GT duration_value SYM_ELLIPSIS SYM_LT duration_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_LT duration_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_LE duration_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_GT duration_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM SYM_GE duration_value SYM_INTERVAL_DELIM
+	| SYM_INTERVAL_DELIM duration_value SYM_INTERVAL_DELIM
+
+term_code: V_QUALIFIED_TERM_CODE_REF
+	| ERR_V_QUALIFIED_TERM_CODE_REF
+
+term_code_list_value: term_code ',' term_code
+	| term_code_list_value ',' term_code
+	| term_code ',' SYM_LIST_CONTINUE
+
+uri_value: V_URI
+
Index: /ruby/tags/release-0.5.0/doc/open_ehr/openehr_terminology.csv
===================================================================
--- /ruby/tags/release-0.5.0/doc/open_ehr/openehr_terminology.csv	(revision 367)
+++ /ruby/tags/release-0.5.0/doc/open_ehr/openehr_terminology.csv	(revision 367)
@@ -0,0 +1,192 @@
+1,0,openehr,en,subject relationship,self,The party is the subject of EHR ,HL7_RoleCode:: CEN: 
+2,3,openehr,en,subject relationship,foetus,The party is a foetus ,HL7: CEN: 
+3,6,openehr,en,subject relationship,donor,The party is a donor of organs or other body products to the EHR subject. ,HL7: CEN: 
+4,7,openehr,en,subject relationship,maternal grandmother,Relationship of maternal grandmother to subject of EHR ,HL7: CEN: 
+5,8,openehr,en,subject relationship,maternal grandfather,Relationship of maternal grandfather to subject of EHR ,HL7: CEN: 
+6,9,openehr,en,subject relationship,father,The party is the father of the subject of the EHR ,HL7: CEN: 
+7,10,openehr,en,subject relationship,mother,The party is the mother of the subject of EHR ,HL7: CEN: 
+8,22,openehr,en,subject relationship,partner/spouse,The husband or wife or life partner of the subject of EHR ,HL7: CEN: 
+9,23,openehr,en,subject relationship,brother,Relationship of brother to subject of EHR ,HL7: CEN: 
+10,24,openehr,en,subject relationship,sister,Relationship of sister to subject of EHR ,HL7: CEN: 
+11,25,openehr,en,subject relationship,step or half brother,Relationship of step or half brother to subject of EHR ,HL7: CEN: 
+12,26,openehr,en,subject relationship,step or half sister,Relationship of step or half sister to subject of EHR ,HL7: CEN: 
+13,27,openehr,en,subject relationship,sibling,Relationship of sibling to subject of EHR ,HL7: CEN: 
+14,28,openehr,en,subject relationship,child,Relationship of child to subject of EHR ,HL7: CEN: 
+15,29,openehr,en,subject relationship,daughter,Relationship of daughter to subject of EHR ,HL7: CEN: 
+16,31,openehr,en,subject relationship,son,Relationship of son to subject of EHR ,HL7: CEN: 
+17,36,openehr,en,subject relationship,paternal grandfather,Relationship of aternal grandfather to subject of EHR ,HL7: CEN: 
+18,37,openehr,en,subject relationship,paternal grandmother,Relationship of paternal grandmother to subject of EHR ,HL7: CEN: 
+19,38,openehr,en,subject relationship,maternal uncle,Relationship of maternal uncle to subject of EHR ,HL7: CEN: 
+20,39,openehr,en,subject relationship,maternal aunt,Relationship of maternal aunt to subject of EHR ,HL7: CEN: 
+21,40,openehr,en,subject relationship,paternal uncle,Relationship of paternal uncle to subject of EHR ,HL7: CEN: 
+22,41,openehr,en,subject relationship,paternal aunt,Relationship of paternal aunt to subject of EHR ,HL7: CEN: 
+23,45,openehr,en,event math function,minimum,Value of the interval-event is the minimum value of the discrete events which the interval-event summarises. ,
+24,121,openehr,en,property,Energy ,,
+25,122,openehr,en,property,Length ,,
+26,123,openehr,en,property,Loudness ,,
+27,124,openehr,en,property,Mass ,,
+28,125,openehr,en,property,Pressure ,,
+29,126,openehr,en,property,Flow rate  volume ,,
+30,127,openehr,en,property,Temperature ,,
+31,128,openehr,en,property,Time ,,
+32,129,openehr,en,property,Volume ,,
+33,130,openehr,en,property,Work ,,
+34,144,openehr,en,event math function,maximum,Value of the interval-event is the maximum value of the discrete events which the interval-event summarises. ,
+35,146,openehr,en,event math function,mean,Value of the interval-event is the average value of the discrete events which the interval-event summarises. ,
+36,147,openehr,en,event math function,change,Value of the interval-event is the net change over the period which the interval-event summarises. ,
+37,148,openehr,en,event math function,total,Value of the interval-event is the sum of the values of the discrete events which the interval-event summarises (typically differential flow measurements  e.g. blood loss). ,
+38,149,openehr,en,event math function,variation,Value of the interval-event is difference between the point maximum and point minimum over the period  in other words the value band into which all sample during a period fit. Useful for specifying a maximal allowed variation in a datum to still be considered the same (approximate) value. ,
+39,166,openehr,en,Instruction transitions,cancel,Cancel a planned Instruction  before it is booked or started. ,
+40,189,openehr,en,subject relationship,neonate,Relationship of neonate to subject of EHR ,HL7: CEN: 
+41,193,openehr,en,participation mode,not specified,Mode of participation is not specified; use only for legacy data. ,
+42,194,openehr,en,participation mode,asynchronous audiovisual; recorded video,Audio-visual communication that is not live ,
+43,195,openehr,en,participation mode,live audiovisual; videoconference; videophone,Any audio-visual communication in real time ,
+44,196,openehr,en,participation mode,recorded video,Recorded video or video mail ,
+45,197,openehr,en,participation mode,videophone,Live audio-visual communication ,
+46,198,openehr,en,participation mode,videoconferencing,Live audio-visual communication over videoconferencing or other similar equipment. ,HL7_ParticipationMode::16548 
+47,199,openehr,en,participation mode,asynchronous audio-only; dictated; voice mail,Audio-only communication that is not live. ,
+48,200,openehr,en,participation mode,dictated,Non-interactive audio-only information recorded on some medium  such as cassette tape. ,HL7_ParticipationMode::16547 
+49,201,openehr,en,participation mode,voice-mail,Audio messaging system ,
+50,202,openehr,en,participation mode,live audio-only; telephone; internet phone; teleconference,Any live audio-only communication. ,HL7_ParticipationMode::V16544 (includes live) 
+51,203,openehr,en,participation mode,teleconference,Live verbal communication over teleconference ,HL7_ParticipationMode::16546 
+52,204,openehr,en,participation mode,internet telephone,Live verbal communication over a the internet. ,HL7_ParticipationMode::16546 
+53,205,openehr,en,participation mode,telephone,Live verbal communication over a telephone. ,HL7_ParticipationMode::16546 
+54,206,openehr,en,participation mode,asynchronous text; email; fax; letter; handwritten note; SMS message,Any text-only communication including email  written text  SMS message etc. ,HL7_ParticipationMode::V16549 
+55,207,openehr,en,participation mode,email,Written communication by email. ,HL7_ParticipationMode::16553 [ inlcude HL7_ParticipationMode::16554 (electronic data)] 
+56,208,openehr,en,participation mode,facsimile/telefax,Non-interactive written communication using a fax machine. ,HL7_ParticipationMode::16552 
+57,209,openehr,en,participation mode,SMS message,Messages sent via mobile/cell phone ,
+58,210,openehr,en,participation mode,printed/typed letter,Written communication by typewritten document. ,HL7_ParticipationMode::16551 
+59,211,openehr,en,participation mode,handwritten note,Written communication by handwritten document. ,HL7_ParticipationMode::16550 
+60,212,openehr,en,participation mode,live text-only; internet chat; SMS chat; interactive written note,Any live text-only communication ,
+61,213,openehr,en,participation mode,internet chat,Live text-only communication over the internet ,
+62,214,openehr,en,participation mode,SMS chat,Live text-only chat over mobile/cell phone ,
+63,215,openehr,en,participation mode,interactive written note,Live text-only communication using written notes ,HL7_ParticipationMode::16550 
+64,216,openehr,en,participation mode,face-to-face communication,Face to face communications between parties in the same room. ,HL7_ParticipationMode::16545 
+65,217,openehr,en,participation mode,signing (face-toface),Live face-to-face communication using a recognised sign language. ,
+66,218,openehr,en,participation mode,signing over video,Live video communication using sign language. ,
+67,219,openehr,en,participation mode,physically present,Participation by actions  where the participant is physically present. ,HL7_ParticipationMode::16556 
+68,220,openehr,en,participation mode,physically remote,Participation by actions  where the participant is not physically present  and the actions are transmitted by electronic means. ,HL7_ParticipationMode::16557 
+69,221,openehr,en,participation mode,translated text,Non-interactive written communication requiring translation ,HL7_ParticipationMode::V16549 
+70,222,openehr,en,participation mode,interpreted audio-only,Any live audio-only communication using an interpreter. ,HL7_ParticipationMode::V16544 (includes live) 
+71,223,openehr,en,participation mode,interpreted face-toface communication,Face to face communications between parties in the same room with an interpreter ,HL7_ParticipationMode::16545 
+72,224,openehr,en,participation mode,interpreted video communication,Live audio-visual communication involving an interpreter ,
+73,240,openehr,en,attestation reason,signed,The attested information has been signed by its signatory. ,HL7_ParticipationSignature::10284 
+74,245,openehr,en,Instruction transitions,active,The instruction is currently being carried out ,
+75,249,openehr,en,audit change type,creation,Change type was creation. ,HL7_CDA: CEN: 
+76,250,openehr,en,audit change type,amendment,Change type was amendment i.e. correction of the previous version. ,HL7_CDA: CEN: 
+77,251,openehr,en,audit change type,modification,Change type was update of the previous version. ,HL7_CDA: CEN: 
+78,252,openehr,en,audit change type,synthesis,Change type was creation synthesis of data due to conversion process  typically a data importer. ,HL7_CDA: CEN: 
+79,253,openehr,en,null flavours,unknown,A possible value exists but is not provided. ,HL7_NullFlavor::V10612 
+80,254,openehr,en,subject relationship,parent,Relationship of parent to subject of EHR ,HL7: CEN: 
+81,255,openehr,en,subject relationship,biological mother,Relationship of biological mother to subject of EHR ,HL7: CEN: 
+82,256,openehr,en,subject relationship,biological father,Relationship of biological father to subject of EHR ,HL7: CEN: 
+83,257,openehr,en,subject relationship,cousin,Relationship of cousin to subject of EHR ,HL7: CEN: 
+84,258,openehr,en,subject relationship,adoptive mother,Relationship of adoptive mother to subject of EHR ,HL7: CEN: 
+85,259,openehr,en,subject relationship,adoptive father,Relationship of adoptive father to subject of EHR ,HL7: CEN: 
+86,260,openehr,en,subject relationship,adopted son,Relationship of adopted son to subject of EHR ,HL7: CEN: 
+87,261,openehr,en,subject relationship,adopted daughter,Relationship of adopted daughter to subject of EHR ,HL7: CEN: 
+88,262,openehr,en,subject relationship,step mother,Relationship of step mother to subject of EHR ,HL7: CEN: 
+89,263,openehr,en,subject relationship,step father,Relationship of step father to subject of EHR ,HL7: CEN: 
+90,264,openehr,en,subject relationship,guardian,Relationship of guardianto subject of EHR ,HL7: CEN: 
+91,265,openehr,en,subject relationship,cohabitee,Lives with the subject of EHR ,HL7: CEN: 
+92,267,openehr,en,event math function,mode,Value of the interval-event is the modal (most common) value of the discrete events which the interval-event summarises. ,
+93,268,openehr,en,event math function,median,Value of the interval-event is the median (centre value in sorted series) value of the discrete events which the interval-event summarises. ,
+94,271,openehr,en,null flavours,no information,No information provided; nothing can be inferred as to the reason why  including whether there might be a possible applicable value or not. ,HL7_NullFlavor::V10610 
+95,272,openehr,en,null flavours,masked,The value has not been provided due to privacy settings. ,HL7_NullFlavor::17932 
+96,273,openehr,en,null flavours,not applicable,No valid value exists for this data item. ,HL7_NullFlavor::10611 
+97,334,openehr,en,property,Electrical current ,,
+98,335,openehr,en,property,Area ,,
+99,336,openehr,en,property,Specific volume ,,
+100,337,openehr,en,property,Specific surface ,,
+101,338,openehr,en,property,Velocity ,,
+102,339,openehr,en,property,Acceleration ,,
+103,340,openehr,en,property,Momentum ,,
+104,341,openehr,en,property,Velocity  angular ,,
+105,342,openehr,en,property,Acceleration  angular ,,
+106,343,openehr,en,property,Momentum  angular ,,
+107,344,openehr,en,property,Moment inertia  area ,,
+108,345,openehr,en,property,Moment inertia  mass ,,
+109,346,openehr,en,property,Momentum  flow rate ,,
+110,347,openehr,en,property,Flow rate  mass ,,
+111,348,openehr,en,property,Flux  mass ,,
+112,349,openehr,en,property,Mass per area ,,
+113,350,openehr,en,property,Density ,,
+114,351,openehr,en,property,Flow rate  mass/volume ,,
+115,352,openehr,en,property,Flow rate  mass/force ,,
+116,355,openehr,en,property,Force ,,
+117,356,openehr,en,property,Surface tension ,,
+118,357,openehr,en,property,Force  body ,,
+119,360,openehr,en,property,Velocity  dynamic ,,
+120,361,openehr,en,property,Velocity  kinematic ,,
+121,362,openehr,en,property,Diffusion coefficient ,,
+122,365,openehr,en,property,Energy per area ,,
+123,366,openehr,en,property,Energy density ,,
+124,367,openehr,en,property,Power  linear ,,
+125,368,openehr,en,property,Power flux ,,
+126,369,openehr,en,property,Power density ,,
+127,370,openehr,en,property,Specific energy ,,
+128,371,openehr,en,property,Specific heat  gas content ,,
+129,373,openehr,en,property,Heat transfer coefficient ,,
+130,374,openehr,en,property,Voltage  electrical ,,
+131,375,openehr,en,property,Resistance ,,
+132,377,openehr,en,property,Electrical field strength ,,
+133,378,openehr,en,property,Magnetic flux ,,
+134,379,openehr,en,property,Inductance ,,
+135,380,openehr,en,property,Qualified real ,This is a number with an arithmetic qualification (which may be no units  103 etc) allowing integers to be expressed as reals raised to a nominated power  or for real numbers alone. ,
+136,381,openehr,en,property,Amount (Eq) ,,
+137,382,openehr,en,property,Frequency ,,
+138,384,openehr,en,property,Amount (mole) ,,
+139,385,openehr,en,property,Mass (IU) ,,
+140,431,openehr,en,composition category,persistent,This Composition contains information which remains valid for (more or less) the life of the EHR. Typical persistent Compositions include family history” problem list” current medications”  and vaccination history”. The usual change type when creating a new version of a persistent composition is modification”. ,
+141,433,openehr,en,composition category,event,This composition pertains to a point in time or brief episode. Change types may usually be modificationor  ,
+142,497,openehr,en,property,Angle  plane ,,
+143,498,openehr,en,property,Electrical charge ,,
+144,499,openehr,en,property,Light intensity ,,
+145,500,openehr,en,property,Angle  solid ,,
+146,501,openehr,en,property,Electrical capacitance ,,
+147,502,openehr,en,property,Electrical conductance ,,
+148,503,openehr,en,property,Magnetic flux density ,,
+149,504,openehr,en,property,Luminous flux ,,
+150,505,openehr,en,property,Illuminance ,,
+151,506,openehr,en,property,Radioactivity ,,
+152,507,openehr,en,property,Proportion ,,
+153,508,openehr,en,property,Energy dose ,,
+154,521,openehr,en,event math function,decrease,This is a change - as in 147 - except indicates that the value  while a positive number  is actually a negative change. Typically used for negative changes like weight loss: 5kgor blood pressure postural drop of 10 mm[Hg]”. ,
+155,522,openehr,en,event math function,increase,This is also a change  but is only a positive change and cannot be expressed as a negative. This can be used for positive changes like Weight gain: 2.5kg”. ,
+156,523,openehr,en,version lifecycle state,deleted,Item has been logically deleted. ,
+157,523,openehr,en,audit change type,deleted,Change type was logical deletion. ,HL7_CDA: CEN: 
+158,524,openehr,en,Instruction transitions,initial,The instruction is recorded but no state is determined ,
+159,526,openehr,en,Instruction transitions,planned,The instruction is planned ,
+160,527,openehr,en,Instruction transitions,postponed,The instruction has been posponed - it had not be commenced ,
+161,528,openehr,en,Instruction transitions,cancelled,The instruction has been cancelled - it had not been commenced and will not commence in the future ,
+162,529,openehr,en,Instruction transitions,scheduled,The instruction has been scheduled to be carried out at a particular time ,
+163,530,openehr,en,Instruction transitions,suspended,The instruction is suspended  it has been activated but is not active at present. It could be active again in the future. ,
+164,531,openehr,en,Instruction transitions,aborted,The instruction is aborted  it has been activated but ceased before it has been completed and will not be restarted in the future. ,
+165,532,openehr,en,version lifecycle state,complete,Item is complete at time of committal. ,
+166,532,openehr,en,Instruction transitions,completed,The instruction has been completed ,
+167,533,openehr,en,Instruction transitions,expired,The instruction has expired  timed out - and assumed to have either been cancelled  aborted or completed ,
+168,535,openehr,en,Instruction transitions,initiate,Initiate the planning of the Instruction. ,
+169,536,openehr,en,Instruction transitions,plan step,Any step in the planned state of the Instruction  e.g. signing  approving. ,
+170,537,openehr,en,Instruction transitions,postpone,Put a planned Instruction on hold  while still in the planning stage  i.e. before it has been booked or started. ,
+171,538,openehr,en,Instruction transitions,restore,Restore a previously postponed Instruction back to the planned state. ,
+172,539,openehr,en,Instruction transitions,schedule,Where booking is required  book the activities in the Instruction in a scheduling system. ,
+173,540,openehr,en,Instruction transitions,start,Start executing the activities in the Instruction  e.g. commence drug administration course. ,
+174,540,openehr,en,Instruction transitions,notify aborted,Occurs when notification of Instruction having been aborted is received after expiry. ,
+175,541,openehr,en,Instruction transitions,do,Do the activities in the Instruction in one go  taking the state machine directly from the planned to the completed state. Used for Instructions whose activities are instantaneous in the practical sense  e.g. a single vaccination  single tablet. ,
+176,542,openehr,en,Instruction transitions,postponed step,Any step in the postponed state of the Instruction. ,
+177,543,openehr,en,Instruction transitions,active step,Any step taken during the active phase of the Instruction  e.g. nurse’s observation  adjustment of dose. ,
+178,544,openehr,en,Instruction transitions,suspend,Suspend the activities from the active phase  with the possibility of later resumption. ,
+179,545,openehr,en,Instruction transitions,suspended step,Any step taken in the suspended state  e.g. nurse’s observation  pathology test to determine if the Instruction should be resumed  remain suspended or aborted. ,
+180,546,openehr,en,Instruction transitions,resume,Resume the Instruction from the suspended state. ,
+181,547,openehr,en,Instruction transitions,abort,Abort the Instruction  i.e. stop its execution permanently after it has started. ,
+182,548,openehr,en,Instruction transitions,finish,Finish performing the Instruction  taking it to the completed state. ,
+183,549,openehr,en,Instruction transitions,time out,Time out has occurred  taking the Instruction from some pervious state into the expired state. ,
+184,551,openehr,en,Instruction transitions,notify completed,Occurs when notification of Instruction having been completed is received after expiry. ,
+185,552,openehr,en,Instruction transitions,notify cancelled,Occurs when notification of Instruction having been cancelled is received after expiry. ,
+186,553,openehr,en,version lifecycle state,incomplete,Item is incomplete at time of committal  in the view of the author. Further editing or review needed before its status will be set to finished”. ,
+187,640,openehr,en,event math function,actual,Value of the datum was the value indicated during the entire time of the event  i.e. it is not an averaged or other computed value. ,
+188,648,openehr,en,attestation reason,witnessed,This attested information has been witnessed by the signatory. ,
+189,666,openehr,en,audit change type,attestation,Existing data were attested. ,HL7_CDA: CEN: 
+190,669,openehr,en,term mapping purpose,public health,Public health related term mapping. ,
+191,670,openehr,en,term mapping purpose,reimbursement,Reimbrusement / billing related term mapping. ,
+192,671,openehr,en,term mapping purpose,research study,Term mapping.for research study ,
Index: /ruby/tags/release-0.5.0/lib/adl_parser/README
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/README	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/README	(revision 367)
@@ -0,0 +1,57 @@
+= Synopsis
+
+A ruby library for ADL parser which includes cADL and dADL parser.
+
+= Requirements
+
+* Ruby 1.8 or later.
+* Yaparc Library 0.2.2 or later.
+* Tested in Ruby 1.8.6.
+* if you use Ruby 1.6, you should prepare racc runtime environment and some adjustment.
+
+= Usage
+
+The script 'bin/adl_validator.rb' validates given ADL files.
+
+  Usage: bin/adl_validator.rb [file_name|http://location.to.adl]+ [options]
+      -v, --verbose                    display verbose message(Not Implemented Yet)
+      -h, --help                       display this help
+
+In order to validate an ADL file on your local machine, just give the file name as an argument as follows.
+
+ $ bin/adl_validator.rb tests/openEHR-EHR-CLUSTER.exam-chest.v1.adl
+ =>
+ Accepted 'tests/openEHR-EHR-CLUSTER.exam-chest.v1.adl'
+
+If you want to validate a remote ADL file on the web, specify its URL location.
+
+ $ bin/adl_validator.rb http://svn.openehr.org/knowledge/archetypes/dev/adl/openehr/ehr/cluster/openEHR-EHR-CLUSTER.auscultation-chest.v1.adl
+ =>
+ Accepted 'http://svn.openehr.org/knowledge/archetypes/dev/adl/openehr/ehr/cluster/openEHR-EHR-CLUSTER.auscultation-chest.v1.adl'
+
+In addition, you can try unit testing.
+
+ $ rake test
+
+= Files and Paths
+
+* Path
++ bin --+--- adl_validator.rb
++ lib --+--- parser.rb
+        +--- parser.y
+        +--- validator.rb
+        +--- shell.rb
+
+* bin/adl_validator.rb
+The command-line ADL validator.
+
+* lib/parser.rb
+This is the key library for ADL parsing. This parser algorithm is LALR implemented in racc library.
+This file contains one module and one class first generated by racc from grammertical definition of parser.y.
+Main class is ADLParser that scans ADL and parses both cADL and dADL.
+
+= License
+
+This product is under openEHR Open Source Software License
+
+The openEHR Foundation uses the Mozilla Tri-license 1.1 on all software copyrighted to the Foundation. This licence essentially provides the user a choice of licence conditions under which to operate with any given piece of software, being: the Mozilla Public licence (MPL), and the Free Software Foundation GNU General Public Licence (GPL) and Lesser GNU Public Licence (LGPL). See the Mozilla relicensing FAQ for details of this license. This in no way constrains the way in which software created by other organisations is licenced. 
Index: /ruby/tags/release-0.5.0/lib/adl_parser/Rakefile
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/Rakefile	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/Rakefile	(revision 367)
@@ -0,0 +1,112 @@
+require 'rubygems'
+require 'rake'
+require 'rake/testtask'
+require 'rake/rdoctask'
+require 'rake/clean'
+require 'rake/gempackagetask'
+require 'yaml'
+
+$DEBUG = false
+
+RACC_SRC = FileList["lib/*.y"]
+RACC_PARSER = FileList['lib/parser.rb']
+RB_SRC = FileList["lib/*.rb"]
+TAGS = FileList['TAGS']
+
+task :default => [:racc]
+
+desc "Generate parser by racc."
+task :racc => RACC_PARSER
+rule '.rb' => '.y' do |target|
+  if $DEBUG == true
+    sh "racc -v -g #{target.source} -o #{target.name}"
+  else
+    sh "racc #{target.source} -o #{target.name}"
+  end
+end
+
+desc "Generate TAGS by rtags."
+task :tags => TAGS
+rule 'TAGS' => RB_SRC do |target|
+  sh "rtags #{target.prerequisites.join(' ')}"
+end
+
+
+desc "Whole Unit tests"
+task 'test' => ['test:shell', 'test:validator', 'test:parser', 'test:scanner']
+
+
+Rake::TestTask.new('test:shell') do |t|
+  t.libs = ["lib"]
+  t.pattern = ['test/shell_test.rb']
+  t.warning = true
+  t.verbose = true
+end
+
+Rake::TestTask.new('test:validator') do |t|
+  t.libs = ["lib"]
+  t.pattern = ['test/validator_test.rb']
+  t.warning = true
+  t.verbose = true
+end
+
+Rake::TestTask.new('test:parser') do |t|
+  t.libs = ["lib"]
+  t.pattern = ['test/parser_test.rb']
+  t.warning = true
+  t.verbose = true
+end
+
+Rake::TestTask.new('test:scanner') do |t|
+  t.libs = ["lib"]
+  t.pattern = ['test/scanner_test.rb']
+  t.warning = true
+  t.verbose = true
+end
+
+
+Rake::RDocTask.new('rdoc') do |t|
+  t.rdoc_dir = 'rdoc'
+  t.rdoc_files.include('README', 'lib/*.rb', 'bin/*.rb')
+  t.main = 'README'
+  t.title = "ADL parser API documentation"
+end
+
+gem_spec = Gem::Specification.new do |s|
+  s.name = 'adl_parser'
+  s.author = 'Akimichi Tatsukawa'
+  s.version = '0.0.4'
+  s.summary = 'ADL parser'
+  s.email = 'akimichi.tatsukawa@gmail.com'
+  s.test_files = FileList['test/*_test.rb', '*.adl']
+  candidates = Dir.glob("{bin,docs,lib,test,ext}/**/*")
+  s.files = candidates.delete_if do |item|
+    item.include?(".svn") || item.include?("rdoc") || item.include?("log")
+  end
+  s.files = FileList['README', 'COPYING', 'Rakefile']
+  s.require_path = "lib"
+  s.has_rdoc = true
+  s.extra_rdoc_files = ["README"]
+#  s.add_dependency("yaparc", ">= 0.2.3")
+  s.add_dependency("openehr_models", ">= 0.0.3")
+end
+
+Rake::GemPackageTask.new(gem_spec) do |pkg|
+  pkg.need_zip = false
+  pkg.need_tar = false
+end
+
+
+CLOBBER.include('rdoc')
+CLEAN.include('lib/*.output', 'log/*.log')
+
+
+### Local Variables:
+### mode:ruby
+### mode:font-lock
+### comment-column:0
+### comment-start: "### "
+### comment-end:"" 
+### End:
+
+
Index: /ruby/tags/release-0.5.0/lib/adl_parser/lib/adl_exception.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/lib/adl_exception.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/lib/adl_exception.rb	(revision 367)
@@ -0,0 +1,14 @@
+module OpenEHR
+  module ADL
+    module Exception
+      class Base < RuntimeError
+      end
+
+      module CADLScanner
+        class Base < RuntimeError
+        end
+      end
+    end
+  end
+end
+
Index: /ruby/tags/release-0.5.0/lib/adl_parser/lib/adl_parser.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/lib/adl_parser.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/lib/adl_parser.rb	(revision 367)
@@ -0,0 +1,43 @@
+# component: openEHR Ruby ADL parser implementation
+# description: 
+# keywords: archetype, ADL, parser
+# author: Akimichi TATSUKAWA, Shinji KOBAYASHI
+# support: openEHR.jp
+# license: openEHR open source license
+
+$:.unshift File.join(File.dirname(__FILE__))
+require 'logger'
+require 'adl_scanner.rb'
+require 'adl_exception.rb'
+
+module OpenEhr
+
+  if $DEBUG
+    LOG = Logger.new('log/adl_parser.log','daily')
+    LOG.level = Logger::INFO
+  else
+    LOG = Logger.new(STDOUT)
+    LOG.level = Logger::WARN
+  end
+
+
+  module ADL
+    autoload :Parser, "parser.rb"
+    autoload :Validator, "validator.rb"
+
+    module Scanner
+      module DADL
+        autoload :RootScanner, "adl_scanner.rb"
+      end
+      module CADL
+        autoload :RootScanner, "adl_scanner.rb"
+      end
+    end
+  end
+
+  module Application
+    autoload :ADLValidator, "shell.rb"
+  end # of Application
+
+  
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/adl_parser/lib/adl_scanner.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/lib/adl_scanner.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/lib/adl_scanner.rb	(revision 367)
@@ -0,0 +1,1122 @@
+require 'rubygems'
+require 'yaparc'
+require 'logger'
+require 'adl_parser.rb'
+require 'am.rb'
+require 'rm.rb'
+require 'util.rb'
+
+
+module OpenEHR
+  module ADL
+    module Scanner
+      LOGGER = Logger.new('log/scanner.log')
+      LOGGER.level = Logger::WARN
+
+      class Base
+        attr_accessor :adl_type, :lineno
+        def initialize(adl_type, filename, lineno = 1)
+          @adl_type = adl_type
+          @filename = filename
+          @lineno = lineno
+        end
+
+        def scan(data)
+          raise
+        end
+      end
+
+      #
+      # ADLScanner
+      # 
+      class ADLScanner < Base
+        attr_accessor :adl_type, :lineno, :cadl_scanner, :dadl_scanner, :regex_scanner, :term_constraint_scanner
+
+        @@logger = OpenEHR::ADL::Scanner::LOGGER #Logger.new('log/scanner.log')
+        RESERVED = {
+          'archetype' => :SYM_ARCHETYPE,
+          'adl_version' => :SYM_ADL_VERSION,
+          'controlled' => :SYM_IS_CONTROLLED,
+          'specialize' => :SYM_SPECIALIZE,
+          'concept' => :SYM_CONCEPT,
+          'language' => :SYM_LANGUAGE,
+          'description' => :SYM_DESCRIPTION,
+          'definition' => :SYM_DEFINITION,
+          'invariant' => :SYM_INVARIANT,
+          'ontology' => :SYM_ONTOLOGY,
+          'matches' => :SYM_MATCHES,
+          'is_in' => :SYM_MATCHES,
+          'occurrences' => :SYM_OCCURRENCES,
+          'true' => :SYM_TRUE, #[Tt][Rr][Uu][Ee] -- -> SYM_TRUE 
+          'false' => :SYM_FALSE, # [Ff][Aa][Ll][Ss][Ee] -- -> SYM_FALSE 
+          'infinity' => :SYM_INFINITY # [Ii][Nn][Ff][Ii][Nn][Ii][Tt][Yy] -- -> SYM_INFINITY 
+        }
+
+        def initialize(adl_type, filename, lineno = 1)
+          super(adl_type, filename, lineno)
+          @in_interval  = false
+        end
+
+        #
+        # ADLScanner#scan
+        #
+        def scan(data)
+          @@logger.debug("#{__FILE__}:#{__LINE__}: Entering  ADLScanner#scan at #{@filename}:#{@lineno}: data = #{data.inspect}")
+          until data.nil?  do
+            case @adl_type.last
+            when :adl
+              case data
+              when /\A\n/ # carriage return
+                @lineno += 1
+                ;
+              when /\A[ \t\r\f]+/ #just drop it
+                ;
+              when /\A--.*/ # single line comment
+                @lineno += 1
+                @@logger.debug("ADLScanner#scan: COMMENT = #{$&} at #{@filename}:#{@lineno}")
+                ;
+              when /\Adescription/   # description
+                yield :SYM_DESCRIPTION, :SYM_DESCRIPTION
+              when /\Adefinition/   # definition
+                yield :SYM_DEFINITION, :SYM_DEFINITION
+              ###----------/* symbols */ ------------------------------------------------- 
+              when /\A[A-Z][a-zA-Z0-9_]*/
+                yield :V_TYPE_IDENTIFIER, $&
+              when /\A(\w+)-(\w+)-(\w+)\.(\w+)((?:-\w+)*)\.(v\w+)/   #V_ARCHETYPE_ID
+                object_id, rm_originator, rm_name, rm_entity, concept_name, specialisation, version_id = $&, $1, $2, $3, $4, $5, $6
+                archetype_id = OpenEHR::RM::Support::Identification::Archetype_ID.new(object_id, concept_name, rm_name, rm_entity, rm_originator, specialisation, version_id)
+                yield :V_ARCHETYPE_ID, archetype_id
+              when /\A[a-z][a-zA-Z0-9_]*/
+                word = $&
+                if RESERVED[word]
+                  @@logger.debug("ADLScanner#scan: RESERVED = #{RESERVED[word]} at #{@filename}:#{@lineno}")
+                  yield RESERVED[word], RESERVED[word]
+                elsif #/\A[A-Z][a-zA-Z0-9_]*/
+                  @@logger.debug("ADLScanner#scan: V_ATTRIBUTE_IDENTIFIER = #{$&} at #{@filename}:#{@lineno}")
+                  yield :V_ATTRIBUTE_IDENTIFIER, $&
+                end
+              when /\A\=/   # =
+                yield :SYM_EQ, :SYM_EQ
+              when /\A\>=/   # >=
+                yield :SYM_GE, :SYM_GE
+              when /\A\<=/   # <=
+                yield :SYM_LE, :SYM_LE
+              when /\A\</   # <
+                if @in_interval
+                  yield :SYM_LT, :SYM_LT
+                else
+                  @adl_type.push(:dadl)
+                  yield :SYM_START_DBLOCK,  $&
+                end
+              when /\A\>/   # >
+                if @in_interval
+                  yield :SYM_GT, :SYM_GT
+                else
+                  adl_type = @adl_type.pop
+                  assert_at(__FILE__,__LINE__){adl_type == :dadl}
+                  yield :SYM_END_DBLOCK, :SYM_END_DBLOCK
+                end
+              when /\A\{/   # {
+                @adl_type.push(:cadl)
+                @@logger.debug("ADLScanner#scan: SYM_START_CBLOCK")
+                yield :SYM_START_CBLOCK, :SYM_START_CBLOCK
+              when /\A\}/   # }
+                adl_type = @adl_type.pop
+                assert_at(__FILE__,__LINE__){adl_type == :cadl}
+                @@logger.debug("ADLScanner#scan: SYM_END_CBLOCK")
+                yield :SYM_END_CBLOCK, $&
+              when /\A\-/   # -
+                yield :Minus_code, :Minus_code
+              when /\A\+/   # +
+                yield :Plus_code, :Plus_code
+              when /\A\*/   # *
+                yield :Star_code, :Star_code
+              when /\A\//   # /
+                yield :Slash_code, :Slash_code
+              when /\A\^/   # ^
+                yield :Caret_code, :Caret_code
+              when /\A\=/   # =
+                yield :Equal_code, :Equal_code
+              when /\A\.\.\./   # ...
+                yield :SYM_LIST_CONTINUE, :SYM_LIST_CONTINUE
+              when /\A\.\./   # ..
+                yield :SYM_ELLIPSIS, :SYM_ELLIPSIS
+              when /\A\./   # .
+                yield :Dot_code, :Dot_code
+              when /\A\;/   # ;
+                yield :Semicolon_code, :Semicolon_code
+              when /\A\,/   # ,
+                yield :Comma_code, :Comma_code
+              when /\A\:/   # :
+                yield :Colon_code, :Colon_code
+              when /\A\!/   # !
+                yield :Exclamation_code, :Exclamation_code
+              when /\A\(/   # (
+                yield :Left_parenthesis_code, :Left_parenthesis_code
+              when /\A\)/   # )
+                yield :Right_parenthesis_code, :Right_parenthesis_code
+              when /\A\$/   # $
+                yield :Dollar_code, :Dollar_code
+              when /\A\?\?/   # ??
+                yield :SYM_DT_UNKNOWN, :SYM_DT_UNKNOWN
+              when /\A\?/   # ?
+                yield :Question_mark_code, :Question_mark_code
+              when /\A[0-9]+\.[0-9]+(\.[0-9]+)*/   # ?
+                yield :V_VERSION_STRING, $&
+              when /\A\|/   # |
+                if @in_interval
+                  @in_interval = false
+                else
+                  @in_interval = true
+                end
+                yield :SYM_INTERVAL_DELIM, :SYM_INTERVAL_DELIM
+              when /\A\[([a-zA-Z0-9()\._-]+::[a-zA-Z0-9\._-]+)\]/ #V_QUALIFIED_TERM_CODE_REF form such as [ICD10AM(1998)::F23]
+                yield :V_QUALIFIED_TERM_CODE_REF, $1
+              when /\A\[[a-zA-Z0-9][a-zA-Z0-9._\-]*\]/   #V_LOCAL_TERM_CODE_REF
+                yield :V_LOCAL_TERM_CODE_REF, $&
+              when /\A\[/   # [
+                yield :Left_bracket_code, :Left_bracket_code
+              when /\A\]/   # ]
+                yield :Right_bracket_code, :Right_bracket_code
+              when /\A"([^"]*)"/m #V_STRING
+                yield :V_STRING, $1
+              when /\A\[[a-zA-Z0-9._\- ]+::[a-zA-Z0-9._\- ]+\]/   #ERR_V_QUALIFIED_TERM_CODE_REF
+                yield :ERR_V_QUALIFIED_TERM_CODE_REF, $&
+              when /\Aa[ct][0-9.]+/   #V_LOCAL_CODE
+                yield :V_LOCAL_CODE, $&
+              when /\A[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](,[0-9]+)?(Z|[+-][0-9]{4})?|[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9](Z|[+-][0-9]{4})?|[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9](Z|[+-][0-9]{4})?/   #V_ISO8601_EXTENDED_DATE_TIME YYYY-MM-DDThh:mm:ss[,sss][Z|+/- -n-n-n-n-]-
+                yield :V_ISO8601_EXTENDED_DATE_TIME, $&
+              when /\A[0-2][0-9]:[0-6][0-9]:[0-6][0-9](,[0-9]+)?(Z|[+-][0-9]{4})?|[0-2][0-9]:[0-6][0-9](Z|[+-][0-9]{4})? /   #V_ISO8601_EXTENDED_TIME hh:mm:ss[,sss][Z|+/-nnnn]
+                yield :V_ISO8601_EXTENDED_TIME, $&
+              when /\A[0-9]{4}-[0-1][0-9]-[0-3][0-9]|[0-9]{4}-[0-1][0-9]/   #V_ISO8601_EXTENDED_DATE YYYY-MM-DD
+                yield :V_ISO8601_EXTENDED_DATE, $&
+              when /\A[A-Z][a-zA-Z0-9_]*<[a-zA-Z0-9,_<>]+>/   #V_GENERIC_TYPE_IDENTIFIER
+                yield :V_GENERIC_TYPE_IDENTIFIER, $&
+              when /\A[0-9]+|[0-9]+[eE][+-]?[0-9]+/   #V_INTEGER
+                @@logger.debug("ADLScanner#scan: V_INTEGER = #{$&}")
+                yield :V_INTEGER, $&
+              when /\A[0-9]+\.[0-9]+|[0-9]+\.[0-9]+[eE][+-]?[0-9]+ /   #V_REAL
+                yield :V_REAL, $&
+                #    when /\A"((?:[^"\\]+|\\.)*)"/ #V_STRING
+              when /\A[a-z]+:\/\/[^<>|\\{}^~"\[\] ]*/ #V_URI
+                yield :V_URI, $&
+              when /\AP([0-9]+[yY])?([0-9]+[mM])?([0-9]+[wW])?([0-9]+[dD])?T([0-9]+[hH])?([0-9]+[mM])?([0-9]+[sS])?|P([0-9]+[yY])?([0-9]+[mM])?([0-9]+[wW])?([0-9]+[dD])?/   #V_ISO8601_DURATION PnYnMnWnDTnnHnnMnnS
+                yield :V_ISO8601_DURATION, $&
+              when /\A\S/ #UTF8CHAR
+                yield :UTF8CHAR, $&
+              end
+              data = $' # variable $' receives the string after the match
+            when :dadl
+              dadl_scanner = OpenEHR::ADL::Scanner::DADLScanner.new(@adl_type, @filename, @lineno)
+              data = dadl_scanner.scan(data) do |sym, val|
+                yield sym, val
+              end
+            when :cadl
+              cadl_scanner = OpenEHR::ADL::Scanner::CADLScanner.new(@adl_type, @filename, @lineno)
+              data = cadl_scanner.scan(data) do |sym, val|
+                yield sym, val
+              end
+            when :regexp
+              regex_scanner = OpenEHR::ADL::Scanner::RegexScanner.new(@adl_type, @filename, @lineno)
+              data = regex_scanner.scan(data) do |sym, val|
+                yield sym, val
+              end
+            when :term_constraint
+              term_constraint_scanner = OpenEHR::ADL::Scanner::TermConstraintScanner.new(@adl_type, @filename, @lineno)
+              data = term_constraint_scanner.scan(data) do |sym, val|
+                yield sym, val
+              end
+            else
+              raise
+            end
+          end
+        end
+      end # of ADLScanner
+
+      #
+      # DADLScanner
+      # 
+      class DADLScanner < Base
+        @@logger = OpenEHR::ADL::Scanner::LOGGER #Logger.new('log/scanner.log')
+        RESERVED = {
+          'true' => :SYM_TRUE, #[Tt][Rr][Uu][Ee] -- -> SYM_TRUE 
+          'false' => :SYM_FALSE, # [Ff][Aa][Ll][Ss][Ee] -- -> SYM_FALSE 
+          'infinity' => :SYM_INFINITY # [Ii][Nn][Ff][Ii][Nn][Ii][Tt][Yy] -- -> SYM_INFINITY 
+        }
+
+        def initialize(adl_type, filename, lineno = 1)
+          super(adl_type, filename, lineno)
+          @in_interval = false
+          @in_c_domain_type = false
+        end
+
+        #
+        # DADLScanner#scan
+        #
+        def scan(data)
+          @@logger.debug("Entering DADLScanner#scan at #{@filename}:#{@lineno}: @adl_type = #{@adl_type.inspect}, data = #{data.inspect}")
+          until data.nil?  do
+            @@logger.debug("#{@filename}:#{@lineno}: DADLScanner#scan:loop data = #{data.inspect}")
+            case @adl_type.last
+            when :dadl
+              case data
+              when /\A\n/ # carriage return
+                #@@logger.debug("DADLScanner#scan:  carriage return, data = #{data.inspect}")
+                @lineno += 1
+                ;
+              when /\A[ \t\r\f]+/ #just drop it
+                #@@logger.debug("DADLScanner#scan:  white space, data = #{data.inspect}")
+                ;
+              when /\A--.*/ # single line comment
+#                @lineno += 1
+                @@logger.debug("DADLScanner#scan: COMMENT = #{$&} at #{@filename}:#{@lineno}")
+                ;
+              when /\A[a-z][a-zA-Z0-9_]*/
+                word = $&.dup
+                if RESERVED[word.downcase]
+                  yield RESERVED[word.downcase], RESERVED[word.downcase]
+                else
+                  @@logger.debug("DADLScanner#scan: V_ATTRIBUTE_IDENTIFIER = #{word} at #{@filename}:#{@lineno}")
+                  yield :V_ATTRIBUTE_IDENTIFIER, word #V_ATTRIBUTE_IDENTIFIER /\A[a-z][a-zA-Z0-9_]*/
+                end
+                ###----------/* symbols */ ------------------------------------------------- 
+              when /\A\=/   # =
+                yield :SYM_EQ, :SYM_EQ
+              when /\A\>\=/   # >=
+                yield :SYM_GE, :SYM_GE
+              when /\A\<\=/   # <=
+                yield :SYM_LE, :SYM_LE
+              when /\A\</   # <
+                if @in_interval
+                  yield :SYM_LT, :SYM_LT
+                else
+                  @adl_type.push(:dadl)
+                  yield :SYM_START_DBLOCK, :SYM_START_DBLOCK
+                end
+              when /\A\>/   # >
+                if @in_interval
+                  yield :SYM_GT, :SYM_GT
+                elsif @in_c_domain_type == true
+                  assert_at(__FILE__,__LINE__){@adl_type.last == :dadl}
+                  adl_type = @adl_type.pop
+                  if @adl_type.last == :cadl
+                    @in_c_domain_type = false
+                    yield :END_V_C_DOMAIN_TYPE_BLOCK, $&
+                  else
+                    yield :SYM_END_DBLOCK, $&
+                  end
+                elsif @in_c_domain_type == false
+                  adl_type = @adl_type.pop
+                  assert_at(__FILE__,__LINE__){adl_type == :dadl}
+                  yield :SYM_END_DBLOCK, $&
+                else
+                  raise
+                end
+              when /\A\-/   # -
+                yield :Minus_code, :Minus_code
+              when /\A\+/   # +
+                yield :Plus_code, :Plus_code
+              when /\A\*/   # *
+                yield :Star_code, :Star_code
+              when /\A\//   # /
+                yield :Slash_code, :Slash_code
+              when /\A\^/   # ^
+                yield :Caret_code, :Caret_code
+              when /\A\.\.\./   # ...
+                yield :SYM_LIST_CONTINUE, :SYM_LIST_CONTINUE
+              when /\A\.\./   # ..
+                yield :SYM_ELLIPSIS, :SYM_ELLIPSIS
+              when /\A\./   # .
+                yield :Dot_code, :Dot_code
+              when /\A\;/   # ;
+                yield :Semicolon_code, :Semicolon_code
+              when /\A\,/   # ,
+                yield :Comma_code, :Comma_code
+              when /\A\:/   # :
+                yield :Colon_code, :Colon_code
+              when /\A\!/   # !
+                yield :Exclamation_code, :Exclamation_code
+              when /\A\(/   # (
+                yield :Left_parenthesis_code, :Left_parenthesis_code
+              when /\A\)/   # )
+                yield :Right_parenthesis_code, :Right_parenthesis_code
+              when /\A\$/   # $
+                yield :Dollar_code, :Dollar_code
+              when /\A\?\?/   # ??
+                yield :SYM_DT_UNKNOWN, :SYM_DT_UNKNOWN
+              when /\A\?/   # ?
+                yield :Question_mark_code, :Question_mark_code
+              when /\A\|/   # |
+                @@logger.debug("DADLScanner#scan: @in_interval = #{@in_interval} at #{@filename}:#{@lineno}")
+                if @in_interval
+                  @in_interval = false
+                else
+                  #          @in_interval = false
+                  @in_interval = true
+                end
+                @@logger.debug("DADLScanner#scan: SYM_INTERVAL_DELIM at #{@filename}:#{@lineno}")
+                yield :SYM_INTERVAL_DELIM, :SYM_INTERVAL_DELIM
+              when /\A\[([a-zA-Z0-9()\._-]+::[a-zA-Z0-9\._-]+)\]/  #V_QUALIFIED_TERM_CODE_REF form [ICD10AM(1998)::F23]
+                yield :V_QUALIFIED_TERM_CODE_REF, $1
+              when /\A\[/   # [
+                @@logger.debug("DADLScanner#scan: Left_bracket_code at #{@filename}:#{@lineno}")
+                yield :Left_bracket_code, :Left_bracket_code
+              when /\A\]/   # ]
+                @@logger.debug("DADLScanner#scan: Right_bracket_code at #{@filename}:#{@lineno}")
+                yield :Right_bracket_code, :Right_bracket_code
+              when /\A[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](,[0-9]+)?(Z|[+-][0-9]{4})?|[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9](Z|[+-][0-9]{4})?|[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9](Z|[+-][0-9]{4})?/   #V_ISO8601_EXTENDED_DATE_TIME YYYY-MM-DDThh:mm:ss[,sss][Z|+/- -n-n-n-n-]-
+                @@logger.debug("DADLScanner#scan: V_ISO8601_EXTENDED_DATE_TIME")
+                yield :V_ISO8601_EXTENDED_DATE_TIME, $&
+              when /\A[0-2][0-9]:[0-6][0-9]:[0-6][0-9](,[0-9]+)?(Z|[+-][0-9]{4})?|[0-2][0-9]:[0-6][0-9](Z|[+-][0-9]{4})? /   #V_ISO8601_EXTENDED_TIME hh:mm:ss[,sss][Z|+/-nnnn]
+                @@logger.debug("DADLScanner#scan: V_ISO8601_EXTENDED_TIME")
+                yield :V_ISO8601_EXTENDED_TIME, $&
+              when /\A\d{4}-[0-1][0-9]-[0-3][0-9]|[0-9]{4}-[0-1][0-9]/   #V_ISO8601_EXTENDED_DATE YYYY-MM-DD
+                @@logger.debug("DADLScanner#scan: V_ISO8601_EXTENDED_DATE, #{$&}")
+                yield :V_ISO8601_EXTENDED_DATE, $&
+              when /\A[A-Z][a-zA-Z0-9_]*<[a-zA-Z0-9,_<>]+>/   #V_GENERIC_TYPE_IDENTIFIER
+                yield :V_GENERIC_TYPE_IDENTIFIER, $&
+              when /\A"((?:[^"\\]+|\\.)*)"/ #V_STRING
+                @@logger.debug("DADLScanner#scan: V_STRING, #{$1}")
+                yield :V_STRING, $1
+              when /\A"([^"]*)"/m #V_STRING
+                @@logger.debug("DADLScanner#scan: V_STRING, #{$1}")
+                yield :V_STRING, $1
+              when /\A[0-9]+|[0-9]+[eE][+-]?[0-9]+/   #V_INTEGER
+                @@logger.debug("DADLScanner#scan: V_INTEGER = #{$&}")
+                yield :V_INTEGER, $&
+              when /\A[a-z]+:\/\/[^<>|\\{}^~"\[\] ]*/ #V_URI
+                yield :V_URI, $&
+              when /\A\S/ #UTF8CHAR
+                yield :UTF8CHAR, $&
+              end
+              data = $' # variable $' receives the string after the match
+            when :adl
+              adl_scanner = OpenEHR::ADL::Scanner::ADLScanner.new(@adl_type, @filename, @lineno)
+              data = adl_scanner.scan(data) do |sym, val|
+                yield sym, val
+              end
+            when :cadl
+              cadl_scanner = OpenEHR::ADL::Scanner::CADLScanner.new(@adl_type, @filename, @lineno)
+              data = cadl_scanner.scan(data) do |sym, val|
+                yield sym, val
+              end
+            when :regexp
+              regex_scanner = OpenEHR::ADL::Scanner::RegexScanner.new(@adl_type, @filename, @lineno)
+              data = regex_scanner.scan(data) do |sym, val|
+                yield sym, val
+              end
+            when :term_constraint
+              @@logger.debug("#{__FILE__}:#{__LINE__}: scan_dadl: Entering scan_term_constraint at #{@filename}:#{@lineno}: data = #{data.inspect}")
+              term_constraint_scanner = OpenEHR::ADL::Scanner::TermConstraintScanner.new(@adl_type, @filename, @lineno)
+              data = term_constraint_scanner.scan(data) do |sym, val|
+                yield sym, val
+              end
+            else
+              raise
+            end
+          end
+        end
+      end # of DADLScanner
+
+
+
+      class CADLScanner < Base
+
+        @@logger = OpenEHR::ADL::Scanner::LOGGER #Logger.new('log/scanner.log')        #Logger.new('log/scanner.log')
+        RESERVED = {
+          'then' => :SYM_THEN, # [Tt][Hh][Ee][Nn]
+          'else' => :SYM_ELSE, # [Ee][Ll][Ss][Ee]
+          'and' => :SYM_AND, # [Aa][Nn][Dd]
+          'or' => :SYM_OR, # [Oo][Rr]
+          'xor' => :SYM_XOR, # [Xx][Oo][Rr]
+          'not' => :SYM_NOT, # [Nn][Oo][Tt]
+          'implies' => :SYM_IMPLIES, # [Ii][Mm][Pp][Ll][Ii][Ee][Ss]
+          'true' => :SYM_TRUE, #[Tt][Rr][Uu][Ee] -- -> SYM_TRUE 
+          'false' => :SYM_FALSE, # [Ff][Aa][Ll][Ss][Ee] -- -> SYM_FALSE 
+          'forall' => :SYM_FORALL, # [Ff][Oo][Rr][_][Aa][Ll][Ll]
+          'exists' => :SYM_EXISTS, # [Ee][Xx][Ii][Ss][Tt][Ss]
+          'existence' => :SYM_EXISTENCE, # [Ee][Xx][Iu][Ss][Tt][Ee][Nn][Cc][Ee]
+          'occurrences' => :SYM_OCCURRENCES, # [Oo][Cc][Cc][Uu][Rr][Rr][Ee][Nn][Cc][Ee][Ss]
+          'cardinality' => :SYM_CARDINALITY, # [Cc][Aa][Rr][Dd][Ii][Nn][Aa][Ll][Ii][Tt][Yy]
+          'ordered' => :SYM_ORDERED, # [Oo][Rr][Dd][Ee][Rr][Ee][Dd]
+          'unordered' => :SYM_UNORDERED, # [Uu][Nn][Oo][Rr][Dd][Ee][Rr][Ee][Dd]
+          'unique' => :SYM_UNIQUE, # [Uu][Nn][Ii][Qq][Uu][Ee]
+          'matches' => :SYM_MATCHES, # [Mm][Aa][Tt][Cc][Hh][Ee][Ss]
+          'is_in' => :SYM_MATCHES, # [Ii][Ss][_][Ii][Nn]
+          'invariant' => :SYM_INVARIANT, # [Ii][Nn][Vv][Aa][Rr][Ii][Aa][Nn][Tt]
+          'infinity' => :SYM_INFINITY, # [Ii][Nn][Ff][Ii][Nn][Ii][Tt][Yy] -- -> SYM_INFINITY 
+          'use_node' => :SYM_USE_NODE, # [Uu][Ss][Ee][_][Nn][Oo][Dd][Ee]
+          'use_archetype' => :SYM_ALLOW_ARCHETYPE, # [Uu][Ss][Ee][_][Aa][Rr][Cc][Hh][Ee][Tt][Yy][Pp][Ee]
+          'allow_archetype' => :SYM_ALLOW_ARCHETYPE, # [Aa][Ll][Ll][Oo][Ww][_][Aa][Rr][Cc][Hh][Ee][Tt][Yy][Pp][Ee]
+          'include' => :SYM_INCLUDE, # [Ii][Nn][Cc][Ll][Uu][Dd][Ee]
+          'exclude' => :SYM_EXCLUDE # [Ee][Xx][Cc][Ll][Uu][Dd][Ee]
+        }
+
+        def initialize(adl_type, filename, lineno = 1)
+          super(adl_type, filename, lineno)
+          @in_interval = false
+        end
+
+        #
+        # CADLScanner#scan
+        #
+        def scan(data)
+          @@logger.debug("#{__FILE__}:#{__LINE__}: Entering CADLScanner#scan at #{@filename}:#{@lineno}: data = #{data.inspect}")
+          until data.nil?  do
+            @@logger.debug("CADLScanner#scan:  loop data = #{data.inspect}")
+            case @adl_type.last
+            when :cadl
+              case data
+              when /\A\n/ # carriage return
+                @lineno += 1
+                ;
+                #yield :CR, :CR
+              when /\A[ \t\r\f]+/ #just drop it
+                ;
+              when /\A--.*\n/ # single line comment
+                @lineno += 1
+                ;
+              ###----------/* symbols */ ------------------------------------------------- 
+              when /\A\=/   # =
+                yield :SYM_EQ, :SYM_EQ
+              when /\A\>=/   # >=
+                yield :SYM_GE, :SYM_GE
+              when /\A\<=/   # <=
+                yield :SYM_LE, :SYM_LE
+              when /\A\</   # <
+                if @in_interval
+                  yield :SYM_LT, :SYM_LT
+                else
+                  @adl_type.push(:dadl)
+                  yield :SYM_START_DBLOCK,  $&
+                end
+              when /\A\>/   # >
+                if @in_interval
+                  yield :SYM_GT, :SYM_GT
+                else
+                  adl_type = @adl_type.pop
+                  assert_at(__FILE__,__LINE__){adl_type == :dadl}
+                  yield :SYM_END_DBLOCK, :SYM_END_DBLOCK
+                end
+              when /\A\-/   # -
+                yield :Minus_code, :Minus_code
+              when /\A\+/   # +
+                yield :Plus_code, :Plus_code
+              when /\A\*/   # *
+                yield :Star_code, :Star_code
+              when /\A\//   # /
+                yield :Slash_code, :Slash_code
+              when /\A\^/   # ^
+                yield :Caret_code, :Caret_code
+              when /\A\.\.\./   # ...
+                yield :SYM_LIST_CONTINUE, :SYM_LIST_CONTINUE
+              when /\A\.\./   # ..
+                yield :SYM_ELLIPSIS, :SYM_ELLIPSIS
+              when /\A\./   # .
+                yield :Dot_code, :Dot_code
+              when /\A\;/   # ;
+                yield :Semicolon_code, :Semicolon_code
+              when /\A\,/   # ,
+                yield :Comma_code, :Comma_code
+              when /\A\:/   # :
+                yield :Colon_code, :Colon_code
+              when /\A\!/   # !
+                yield :Exclamation_code, :Exclamation_code
+              when /\A\(/   # (
+                yield :Left_parenthesis_code, :Left_parenthesis_code
+              when /\A\)/   # )
+                yield :Right_parenthesis_code, :Right_parenthesis_code
+              when /\A\{\// #V_REGEXP
+                if @adl_type.last != :regexp
+                  @in_regexp = true
+                  @adl_type.push(:regexp)
+                  yield :START_REGEXP_BLOCK, :START_REGEXP_BLOCK
+                else
+                  raise
+                end
+              when /\A\{/   # {
+                @adl_type.push(:cadl)
+                @@logger.debug("CADLScanner#scan: entering cADL at #{@filename}:#{@lineno}")
+                yield :SYM_START_CBLOCK, :SYM_START_CBLOCK
+              when /\A\}/   # }
+                adl_type = @adl_type.pop
+                assert_at(__FILE__,__LINE__){adl_type == :cadl}
+                @@logger.debug("CADLScanner#scan: exiting cADL at #{@filename}:#{@lineno}")
+                yield :SYM_END_CBLOCK, :SYM_END_CBLOCK
+              when /\A\$/   # $
+                yield :Dollar_code, :Dollar_code
+              when /\A\?\?/   # ??
+                yield :SYM_DT_UNKNOWN, :SYM_DT_UNKNOWN
+              when /\A\?/   # ?
+                yield :Question_mark_code, :Question_mark_code
+              when /\A\|/   # |
+                @@logger.debug("CADLScanner#scan: @in_interval = #{@in_interval} at #{@filename}:#{@lineno}")
+                if @in_interval
+                  @in_interval = false
+                else
+                  #          @in_interval = false
+                  @in_interval = true
+                end
+                @@logger.debug("CADLScanner#scan: SYM_INTERVAL_DELIM at #{@filename}:#{@lineno}")
+                yield :SYM_INTERVAL_DELIM, :SYM_INTERVAL_DELIM
+
+              when /\A\[([a-zA-Z0-9()\._-]+::[a-zA-Z0-9\._-]+)\]/  #V_QUALIFIED_TERM_CODE_REF form [ICD10AM(1998)::F23]
+                yield :V_QUALIFIED_TERM_CODE_REF, $1
+              when /\A\[[a-zA-Z0-9._\- ]+::[a-zA-Z0-9._\- ]+\]/   #ERR_V_QUALIFIED_TERM_CODE_REF
+                yield :ERR_V_QUALIFIED_TERM_CODE_REF, $&
+              when /\A\[([a-zA-Z0-9\(\)\._\-]+)::[ \t\n]*/
+                @adl_type.push(:term_constraint)
+                yield :START_TERM_CODE_CONSTRAINT, $1
+              when /\A\[[a-zA-Z0-9][a-zA-Z0-9._\-]*\]/   #V_LOCAL_TERM_CODE_REF
+                yield :V_LOCAL_TERM_CODE_REF, $&
+              when /\A\[/   # [
+                yield :Left_bracket_code, :Left_bracket_code
+              when /\A\]/   # ]
+                yield :Right_bracket_code, :Right_bracket_code
+              when /\A[A-Z][a-zA-Z0-9_]*<[a-zA-Z0-9,_<>]+>/   #V_GENERIC_TYPE_IDENTIFIER
+                yield :V_GENERIC_TYPE_IDENTIFIER, $&
+              when /\A[yY][yY][yY][yY]-[mM?X][mM?X]-[dD?X][dD?X][T\t][hH?X][hH?X]:[mM?X][mM?X]:[sS?X][sS?X]/
+                yield :V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN, $&
+              when /\A[yY][yY][yY][yY]-[mM?X][mM?X]-[dD?X][dD?X]/
+                yield :V_ISO8601_DATE_CONSTRAINT_PATTERN, $&
+              when /\A[hH][hH]:[mM?X][mM?X]:[sS?X][sS?X]/
+                yield :V_ISO8601_TIME_CONSTRAINT_PATTERN, $&
+                #when /\AP([0-9]+[yY])?([0-9]+[mM])?([0-9]+[wW])?([0-9]+[dD])?T([0-9]+[hH])?([0-9]+[mM])?([0-9]+[sS])?|P([0-9]+[yY])?([0-9]+[mM])?([0-9]+[wW])?([0-9]+[dD])?/   #V_ISO8601_DURATION such as PnYnMnWnDTnnHnnMnnS
+              when /\AP([0-9]+[yY])?([0-9]+[mM])?([0-9]+[wW])?([0-9]+[dD])?T([0-9]+[hH])?([0-9]+[mM])?([0-9]+[sS])?/   #V_ISO8601_DURATION such as PnYnMnWnDTnnHnnMnnS
+                yield :V_ISO8601_DURATION, $&
+              when /\AP[yY]?[mM]?[wW]?[dD]?T[hH]?[mM]?[sS]?/   #V_ISO8601_DURATION_CONSTRAINT_PATTERNo
+                yield :V_ISO8601_DURATION_CONSTRAINT_PATTERN, $&
+              when /\A[a-z][a-zA-Z0-9_]*/
+                word = $&.dup
+                if RESERVED[word.downcase]
+                  yield RESERVED[word.downcase], RESERVED[word.downcase]
+                else
+                  @@logger.debug("CADLScanner#scan: V_ATTRIBUTE_IDENTIFIER = #{word} at #{@filename}:#{@lineno}")
+                  yield :V_ATTRIBUTE_IDENTIFIER, word #V_ATTRIBUTE_IDENTIFIER /\A[a-z][a-zA-Z0-9_]*/
+                end
+              when /\A[A-Z][a-zA-Z0-9_]*/
+                word = $&.dup
+                if RESERVED[word.downcase]
+                  yield RESERVED[word.downcase], RESERVED[word.downcase]
+                else
+                  yield :V_TYPE_IDENTIFIER, $&
+                end
+              when /\Aa[ct][0-9.]+/   #V_LOCAL_CODE
+                yield :V_LOCAL_CODE, $&
+              when /\A[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](,[0-9]+)?(Z|[+-][0-9]{4})?|[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9](Z|[+-][0-9]{4})?|[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9](Z|[+-][0-9]{4})?/   #V_ISO8601_EXTENDED_DATE_TIME YYYY-MM-DDThh:mm:ss[,sss][Z|+/- -n-n-n-n-]-
+                yield :V_ISO8601_EXTENDED_DATE_TIME, $&
+              when /\A[0-2][0-9]:[0-6][0-9]:[0-6][0-9](,[0-9]+)?(Z|[+-][0-9]{4})?|[0-2][0-9]:[0-6][0-9](Z|[+-][0-9]{4})? /   #V_ISO8601_EXTENDED_TIME hh:mm:ss[,sss][Z|+/-nnnn]
+                yield :V_ISO8601_EXTENDED_TIME, $&
+              when /\A[0-9]{4}-[0-1][0-9]-[0-3][0-9]|[0-9]{4}-[0-1][0-9]/   #V_ISO8601_EXTENDED_DATE YYYY-MM-DD
+                yield :V_ISO8601_EXTENDED_DATE, $&
+              when /\A[0-9]+|[0-9]+[eE][+-]?[0-9]+/   #V_INTEGER
+                @@logger.debug("CADLScanner#scan: V_INTEGER = #{$&}")
+                yield :V_INTEGER, $&
+              when /\A[0-9]+\.[0-9]+|[0-9]+\.[0-9]+[eE][+-]?[0-9]+ /   #V_REAL
+                yield :V_REAL, $&
+              when /\A"((?:[^"\\]+|\\.)*)"/ #V_STRING
+                yield :V_STRING, $1
+              when /\A"([^"]*)"/m #V_STRING
+                yield :V_STRING, $1
+              when /\A[a-z]+:\/\/[^<>|\\{}^~"\[\] ]*/ #V_URI
+                yield :V_URI, $&
+              when /\A\S/ #UTF8CHAR
+                yield :UTF8CHAR, $&
+              when /\A.+/ #
+                raise OpenEHR::ADL::Exception::CADLScanner::Base.new, "can't handle #{data.inspect}"
+              end
+              data = $' # variable $' receives the string after the match
+            when :adl
+              adl_scanner = OpenEHR::ADL::Scanner::ADLScanner.new(@adl_type, @filename, @lineno)
+              data = adl_scanner.scan(data) do |sym, val|
+                yield sym, val
+              end
+            when :dadl
+              dadl_scanner = OpenEHR::ADL::Scanner::DADLScanner.new(@adl_type, @filename, @lineno)
+              data = dadl_scanner.scan(data) do |sym, val|
+                yield sym, val
+              end
+            when :regexp
+              regex_scanner = OpenEHR::ADL::Scanner::RegexScanner.new(@adl_type, @filename, @lineno)
+              data = regex_scanner.scan(data) do |sym, val|
+                yield sym, val
+              end
+            when :term_constraint
+              @@logger.debug("Entering scan_term_constraint at #{@filename}:#{@lineno}: data = #{data.inspect}")
+              term_constraint_scanner = OpenEHR::ADL::Scanner::TermConstraintScanner.new(@adl_type, @filename, @lineno)
+              data = term_constraint_scanner.scan(data) do |sym, val|
+                yield sym, val
+              end
+            else
+              raise OpenEHR::ADL::Exception::CADLScanner.new, "unexpected adl_type: #{@adl_type.last}"
+            end
+          end # of until
+        end
+      end # of CADLScanner
+
+
+      #
+      # RegexScanner
+      # 
+      class RegexScanner < Base
+
+        @@logger = OpenEHR::ADL::Scanner::LOGGER #Logger.new('log/scanner.log')        #Logger.new('log/scanner.log')
+        
+        def initialize(adl_type, filename, lineno = 1)
+          super(adl_type, filename, lineno)
+        end
+
+        def scan(data)
+          @@logger.debug("#{__FILE__}:#{__LINE__}: Entering scan_regexp at #{@filename}:#{@lineno}: data = #{data.inspect}")
+          until data.nil?  do
+            case @adl_type.last
+            when :regexp
+              case data
+              when /\A\/\}/ #V_REGEXP
+                if @adl_type.last == :regexp
+                  @in_regexp = false
+                  @adl_type.pop
+                  yield :END_REGEXP_BLOCK, :END_REGEXP_BLOCK
+                else
+                  raise
+                end
+              when /\A(.*)(\/\})/ #V_REGEXP
+                yield :REGEXP_BODY, $1
+                if @adl_type.last == :regexp
+                  @in_regexp = false
+                  @adl_type.pop
+                  yield :END_REGEXP_BLOCK, :END_REGEXP_BLOCK
+                else
+                  raise
+                end
+              else
+                raise data
+              end
+              data = $' # variable $' receives the string after the match
+            when :adl
+              adl_scanner = OpenEHR::ADL::Scanner::ADLScanner.new(@adl_type, @filename, @lineno)
+              data = adl_scanner.scan(data) do |sym, val|
+                yield sym, val
+              end
+            when :dadl
+              dadl_scanner = OpenEHR::ADL::Scanner::DADLScanner.new(@adl_type, @filename, @lineno)
+              data = dadl_scanner.scan(data) do |sym, val|
+                yield sym, val
+              end
+            when :cadl
+              cadl_scanner = OpenEHR::ADL::Scanner::CADLScanner.new(@adl_type, @filename, @lineno)
+              data = cadl_scanner.scan(data) do |sym, val|
+                yield sym, val
+              end
+            when :term_constraint
+              #@@logger.debug("#{__FILE__}:#{__LINE__}: scan_regexp: Entering scan_term_constraint at #{@filename}:#{@lineno}")
+              term_constraint_scanner = OpenEHR::ADL::Scanner::TermConstraintScanner.new(@adl_type, @filename, @lineno)
+              data = term_constraint_scanner.scan(data) do |sym, val|
+                yield sym, val
+              end
+            else
+              raise
+            end
+          end
+        end
+      end # of RegexScanner
+
+      #
+      # TermConstraintScanner
+      # 
+      class TermConstraintScanner < Base
+        @@logger = OpenEHR::ADL::Scanner::LOGGER #Logger.new('log/scanner.log')        #Logger.new('log/scanner.log')
+        def initialize(adl_type, filename, lineno = 1)
+          super(adl_type, filename, lineno)
+        end
+
+        def scan(data)
+          @@logger.debug("#{__FILE__}:#{__LINE__}: Entering scan_term_constraint")
+          until data.nil?  do
+            case @adl_type.last
+            when :term_constraint
+              case data
+              when /\A\n/ # carriage return
+                @lineno += 1
+                ;
+              when /\A[ \t\r\f]+/ #just drop it
+                ;
+              when /\A--.*$/ # single line comment
+                @lineno += 1
+                @@logger.debug("#{__FILE__}:#{__LINE__}: scan_term_constraint: COMMENT = #{$&} at #{@filename}:#{@lineno}")
+                ;
+              when /\A([a-zA-Z0-9\._\-])+[ \t]*,/ # match any line, with ',' termination
+                yield :TERM_CODE, $1
+              when /\A([a-zA-Z0-9\._\-])+[ \t]*;/ # match second last line with ';' termination (assumed value)
+                yield :TERM_CODE, $1
+              when /\A([a-zA-Z0-9\._\-])*[ \t]*\]/ # match final line, terminating in ']'
+                adl_type = @adl_type.pop
+                assert_at(__FILE__,__LINE__){adl_type == :term_constraint}
+                yield :END_TERM_CODE_CONSTRAINT, $1
+              else
+                raise "data = #{data}"
+              end
+              data = $' # variable $' receives the string after the match
+            when :adl
+              adl_scanner = OpenEHR::ADL::Scanner::ADLScanner.new(@adl_type, @filename, @lineno)
+              data = adl_scanner.scan(data) do |sym, val|
+                yield sym, val
+              end
+            when :dadl
+              dadl_scanner = OpenEHR::ADL::Scanner::DADLScanner.new(@adl_type, @filename, @lineno)
+              data = dadl_scanner.scan(data) do |sym, val|
+                yield sym, val
+              end
+            when :cadl
+              cadl_scanner = OpenEHR::ADL::Scanner::CADLScanner.new(@adl_type, @filename, @lineno)
+              data = cadl_scanner.scan(data) do |sym, val|
+                yield sym, val
+              end
+            else
+              raise
+            end
+          end
+        end
+      end # of TermConstraintScanner
+
+    end
+  end
+end
+
+__END__
+
+
+
+#       module Common
+#         class START_TERM_CODE_CONSTRAINT
+#           include Yaparc::Parsable
+#           def initialize
+#             @parser = lambda do |input|
+#               Yaparc::Apply.new(Yaparc::Regex.new(/[ \t\n]*\[([a-zA-Z0-9\(\)\._\-]+)::[ \t\n]*/)) do |match|
+#                 OpenEHR::LOG.info("START_TERM_CODE_CONSTRAINT: #{match}")
+#                 [:START_TERM_CODE_CONSTRAINT, match]
+#               end
+#             end
+#           end
+#         end
+
+#         # /\A\[[a-zA-Z0-9()\._-]+::[a-zA-Z0-9\._-]+\]/  #V_QUALIFIED_TERM_CODE_REF form [ICD10AM(1998)::F23]
+#         class V_QUALIFIED_TERM_CODE_REF
+#           include Yaparc::Parsable
+#           def initialize
+#             @parser = lambda do |input|
+#               Yaparc::Apply.new(Yaparc::Regex.new(/\A\[[a-zA-Z0-9()\._-]+::[a-zA-Z0-9\._-]+\]/)) do |match|
+#                 OpenEHR::LOG.info("V_QUALIFIED_TERM_CODE_REF: #{match}")
+#                 [:V_QUALIFIED_TERM_CODE_REF, match]
+#               end
+#             end
+#           end
+#         end
+        
+#         class V_LOCAL_TERM_CODE_REF
+#           include Yaparc::Parsable
+#           def initialize
+#             @parser = lambda do |input|
+#               Yaparc::Apply.new(Yaparc::Regex.new(/\A\[[a-zA-Z0-9][a-zA-Z0-9._\-]*\]/)) do |match|
+#                 OpenEHR::LOG.info("V_TERM_CODE_REF: #{match}")
+#                 [:V_LOCAL_TERM_CODE_REF, match]
+#               end
+#             end
+#           end
+#         end
+
+#         class ERR_V_QUALIFIED_TERM_CODE_REF
+#           include Yaparc::Parsable
+#           def initialize
+#             @parser = lambda do |input|
+#               Yaparc::Apply.new(Yaparc::Regex.new(/\A\[[a-zA-Z0-9._\- ]+::[a-zA-Z0-9._\- ]+\]/)) do |match|
+#                 OpenEHR::LOG.info("ERR_V_QUALIFIED_TERM_CODE_REF: #{match}")
+#                 [:ERR_V_QUALIFIED_TERM_CODE_REF, match]
+#               end
+#             end
+#           end
+#         end
+
+#         class V_TYPE_IDENTIFIER
+#           include Yaparc::Parsable
+#           def initialize
+#             @parser = lambda do |input|
+#               Yaparc::Apply.new(Yaparc::Regex.new(/\A[A-Z][a-zA-Z0-9_]*/)) do |match|
+#                 OpenEHR::LOG.info("V_TYPE_IDENTIFIER: #{match}")
+#                 [:V_TYPE_IDENTIFIER, match]
+#               end
+#             end
+#           end
+#         end
+
+#         class V_GENERIC_TYPE_IDENTIFIER
+#           include Yaparc::Parsable
+#           def initialize
+#             @parser = lambda do |input|
+#               Yaparc::Apply.new(Yaparc::Regex.new(/\A[A-Z][a-zA-Z0-9_]*<[a-zA-Z0-9,_<>]+>/)) do |match|
+#                 OpenEHR::LOG.info("V_GENERIC_TYPE_IDENTIFIER: #{match}")
+#                 [:V_GENERIC_TYPE_IDENTIFIER, match]
+#               end
+#             end
+#           end
+#         end
+
+
+#         class V_LOCAL_CODE
+#           include Yaparc::Parsable
+#           def initialize
+#             @parser = lambda do |input|
+#               Yaparc::Apply.new(Yaparc::Regex.new(/\Aa[ct][0-9.]+/)) do |match|
+#                 OpenEHR::LOG.info("V_LOCAL_CODE: #{match}")
+#                 [:V_LOCAL_CODE, match]
+#               end
+#             end
+#           end
+#         end
+
+#         class V_STRING
+#           include Yaparc::Parsable
+#           def initialize
+#             @parser = lambda do |input|
+#               Yaparc::Apply.new(Yaparc::Regex.new(/\A"([^"]*)"/m)) do |match|
+#                 OpenEHR::LOG.info("V_STRING: #{match}")
+#                 [:V_STRING, match]
+#               end
+#             end
+#           end
+#         end
+
+#         class V_REAL
+#           include Yaparc::Parsable
+#           def initialize
+#             @parser = lambda do |input|
+#               Yaparc::Apply.new(Yaparc::Regex.new(/\A[0-9]+\.[0-9]+|[0-9]+\.[0-9]+[eE][+-]?[0-9]+/)) do |match|
+#                 OpenEHR::LOG.info("V_REAL: #{match}")
+#                 [:V_REAL, match]
+#               end
+#             end
+#           end
+#         end
+
+#         #V_ISO8601_DURATION PnYnMnWnDTnnHnnMnnS
+#         class V_ISO8601_DURATION
+#           include Yaparc::Parsable
+#           def initialize
+#             @parser = lambda do |input|
+#               Yaparc::Apply.new(
+#                                 Yaparc::Alt.new(Yaparc::Regex.new(/\AP([0-9]+|[yY])?([0-9]+|[mM])?([0-9]+|[wW])?([0-9]+|[dD])?T([0-9]+|[hH])?([0-9]+|[mM])?([0-9]+|[sS])?/),
+#                                                 Yaparc::Regex.new(/\AP([0-9]+|[yY])?([0-9]+|[mM])?([0-9]+|[wW])?([0-9]+|[dD])?/))) do |match|
+#                 OpenEHR::LOG.info("V_ISO8601_DURATION: #{match}")
+#                 [:V_ISO8601_DURATION, match]
+#               end
+#             end
+#           end
+#         end
+
+#       end # of Common
+
+#       module DADL
+#         # c.f. http://www.openehr.org/svn/ref_impl_eiffel/TRUNK/components/adl_parser/src/syntax/adl/parser/adl_scanner.l
+#         RESERVED = {
+#           'true' => :SYM_TRUE, #[Tt][Rr][Uu][Ee] -- -> SYM_TRUE 
+#           'false' => :SYM_FALSE, # [Ff][Aa][Ll][Ss][Ee] -- -> SYM_FALSE 
+#           'infinity' => :SYM_INFINITY # [Ii][Nn][Ff][Ii][Nn][Ii][Tt][Yy] -- -> SYM_INFINITY 
+#         }
+#         #
+#         # DADL::RootScanner
+#         #
+#         class RootScanner
+#           include Yaparc::Parsable
+#           def initialize
+#             @parser = lambda do |input|
+#               Yaparc::Alt.new(Reserved.new,
+#                               OpenEHR::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF.new,
+#                               OpenEHR::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF.new,
+#                               OpenEHR::ADL::Scanner::Common::ERR_V_QUALIFIED_TERM_CODE_REF.new,
+#                               OpenEHR::ADL::Scanner::Common::V_TYPE_IDENTIFIER.new,
+#                               OpenEHR::ADL::Scanner::Common::V_GENERIC_TYPE_IDENTIFIER.new,
+#                               OpenEHR::ADL::Scanner::Common::V_STRING.new,
+#                               OpenEHR::ADL::Scanner::Common::V_LOCAL_CODE.new,
+#                               OpenEHR::ADL::Scanner::Common::V_REAL.new,
+#                               OpenEHR::ADL::Scanner::Common::V_ISO8601_DURATION.new#,
+#                               #OpenEHR::ADL::Scanner::Common::START_TERM_CODE_CONSTRAINT.new
+#                               )
+#             end
+#           end
+#         end
+
+#         #  <DADL::Reserved class>
+#         class Reserved
+#           include Yaparc::Parsable
+          
+#           def initialize
+#             @parser = lambda do |input|
+#               reserved_parsers = OpenEHR::ADL::Scanner::DADL::RESERVED.map do |keyword| 
+#                 Yaparc::Tokenize.new(
+#                                      Yaparc::Literal.new(keyword[0],false)
+#                                      )
+#               end
+#               Yaparc::Alt.new(Yaparc::Apply.new(Yaparc::Alt.new(*reserved_parsers)) do |match|
+#                                 OpenEHR::LOG.info("Reserved: #{match}")
+#                                 [OpenEHR::ADL::Scanner::DADL::RESERVED[match], OpenEHR::ADL::Scanner::DADL::RESERVED[match]]
+#                               end,
+#                               Yaparc::Apply.new(Yaparc::Regex.new(/\A[a-z][a-zA-Z0-9_]*/)) do |match|
+#                                 OpenEHR::LOG.info("V_ATTRIBUTE_IDENTIFIER: #{match}")
+#                                 [:V_ATTRIBUTE_IDENTIFIER, match]
+#                               end)
+#             end
+#           end
+#         end
+#       end # of DADL
+
+#       module CADL
+#         # c.f. http://www.openehr.org/svn/ref_impl_eiffel/TRUNK/components/adl_parser/src/syntax/cadl/parser/cadl_scanner.l
+#         RESERVED = {
+#           'ordered' => :SYM_ORDERED, # [Oo][Rr][Dd][Ee][Rr][Ee][Dd]
+#           'unordered' => :SYM_UNORDERED, # [Uu][Nn][Oo][Rr][Dd][Ee][Rr][Ee][Dd]
+#           'then' => :SYM_THEN, # [Tt][Hh][Ee][Nn]
+#           'else' => :SYM_ELSE, # [Ee][Ll][Ss][Ee]
+#           'and' => :SYM_AND, # [Aa][Nn][Dd]
+#           'or' => :SYM_OR, # [Oo][Rr]
+#           'xor' => :SYM_XOR, # [Xx][Oo][Rr]
+#           'not' => :SYM_NOT, # [Nn][Oo][Tt]
+#           'implies' => :SYM_IMPLIES, # [Ii][Mm][Pp][Ll][Ii][Ee][Ss]
+#           'true' => :SYM_TRUE, #[Tt][Rr][Uu][Ee] -- -> SYM_TRUE 
+#           'false' => :SYM_FALSE, # [Ff][Aa][Ll][Ss][Ee] -- -> SYM_FALSE 
+#           'forall' => :SYM_FORALL, # [Ff][Oo][Rr][_][Aa][Ll][Ll]
+#           'exists' => :SYM_EXISTS, # [Ee][Xx][Ii][Ss][Tt][Ss]
+#           'existence' => :SYM_EXISTENCE, # [Ee][Xx][Iu][Ss][Tt][Ee][Nn][Cc][Ee]
+#           'occurrences' => :SYM_OCCURRENCES, # [Oo][Cc][Cc][Uu][Rr][Rr][Ee][Nn][Cc][Ee][Ss]
+#           'cardinality' => :SYM_CARDINALITY, # [Cc][Aa][Rr][Dd][Ii][Nn][Aa][Ll][Ii][Tt][Yy]
+#           'unique' => :SYM_UNIQUE, # [Uu][Nn][Ii][Qq][Uu][Ee]
+#           'matches' => :SYM_MATCHES, # [Mm][Aa][Tt][Cc][Hh][Ee][Ss]
+#           'is_in' => :SYM_MATCHES, # [Ii][Ss][_][Ii][Nn]
+#           'invariant' => :SYM_INVARIANT, # [Ii][Nn][Vv][Aa][Rr][Ii][Aa][Nn][Tt]
+#           'infinity' => :SYM_INFINITY, # [Ii][Nn][Ff][Ii][Nn][Ii][Tt][Yy] -- -> SYM_INFINITY 
+#           'use_node' => :SYM_USE_NODE, # [Uu][Ss][Ee][_][Nn][Oo][Dd][Ee]
+#           'use_archetype' => :SYM_ALLOW_ARCHETYPE, # [Uu][Ss][Ee][_][Aa][Rr][Cc][Hh][Ee][Tt][Yy][Pp][Ee]
+#           'allow_archetype' => :SYM_ALLOW_ARCHETYPE, # [Aa][Ll][Ll][Oo][Ww][_][Aa][Rr][Cc][Hh][Ee][Tt][Yy][Pp][Ee]
+#           'include' => :SYM_INCLUDE, # [Ii][Nn][Cc][Ll][Uu][Dd][Ee]
+#           'exclude' => :SYM_EXCLUDE # [Ee][Xx][Cc][Ll][Uu][Dd][Ee]
+#         }
+
+#         #V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN, /\A[yY][yY][yY][yY]-[mM?X][mM?X]-[dD?X][dD?X][T\t][hH?X][hH?X]:[mM?X][mM?X]:[sS?X][sS?X]/
+#         class V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN
+#           include Yaparc::Parsable
+#           def initialize
+#             @parser = lambda do |input|
+#               Yaparc::Apply.new(Yaparc::Regex.new(/\A[yY][yY][yY][yY]-[mM?X][mM?X]-[dD?X][dD?X][T\t][hH?X][hH?X]:[mM?X][mM?X]:[sS?X][sS?X]/)) do |match|
+#                 OpenEHR::LOG.info("V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN: #{match}")
+#                 [:V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN, match]
+#               end
+#             end
+#           end
+#         end
+
+#         #V_ISO8601_DATE_CONSTRAINT_PATTERN  /\A[yY][yY][yY][yY]-[mM?X][mM?X]-[dD?X][dD?X]/
+#         class V_ISO8601_DATE_CONSTRAINT_PATTERN
+#           include Yaparc::Parsable
+#           def initialize
+#             @parser = lambda do |input|
+#               Yaparc::Apply.new(Yaparc::Regex.new(/\A[yY][yY][yY][yY]-[mM?X][mM?X]-[dD?X][dD?X]/)) do |match|
+#                 OpenEHR::LOG.info("V_ISO8601_DATE_CONSTRAINT_PATTERN: #{match}")
+#                 [:V_ISO8601_DATE_CONSTRAINT_PATTERN, match]
+#               end
+#             end
+#           end
+#         end
+
+#         #V_ISO8601_TIME_CONSTRAINT_PATTERN /\A[hH][hH]:[mM?X][mM?X]:[sS?X][sS?X]/
+#         class V_ISO8601_TIME_CONSTRAINT_PATTERN
+#           include Yaparc::Parsable
+#           def initialize
+#             @parser = lambda do |input|
+#               Yaparc::Apply.new(Yaparc::Regex.new(/\A[hH][hH]:[mM?X][mM?X]:[sS?X][sS?X]/)) do |match|
+#                 OpenEHR::LOG.info("V_ISO8601_TIME_CONSTRAINT_PATTERN: #{match}")
+#                 [:V_ISO8601_TIME_CONSTRAINT_PATTERN, match]
+#               end
+#             end
+#           end
+#         end
+
+#         #V_ISO8601_DURATION_CONSTRAINT_PATTERN 
+#         class V_ISO8601_DURATION_CONSTRAINT_PATTERN
+#           include Yaparc::Parsable
+#           def initialize
+#             @parser = lambda do |input|
+#               Yaparc::Apply.new(Yaparc::Alt.new(Yaparc::Regex.new(/\AP[yY]?[mM]?[wW]?[dD]?T[hH]?[mM]?[sS]?/),
+#                                                 Yaparc::Regex.new(/\AP[yY]?[mM]?[wW]?[dD]?/))) do |match|
+#                 OpenEHR::LOG.info("V_ISO8601_DURATION_CONSTRAINT_PATTERN: #{match}")
+#                 [:V_ISO8601_DURATION_CONSTRAINT_PATTERN, match]
+#               end
+#             end
+#           end
+#         end
+
+#         #V_C_DOMAIN_TYPE /\A[A-Z][a-zA-Z0-9_]*[ \n]*\</
+#         class V_C_DOMAIN_TYPE
+#           include Yaparc::Parsable
+#           def initialize
+#             @parser = lambda do |input|
+#               Yaparc::Apply.new(Yaparc::Regex.new(/\A[A-Z][a-zA-Z0-9_]*[ \n]*\</)) do |match|
+#                 OpenEHR::LOG.info("V_C_DOMAIN_TYPE: #{match}")
+#                 [:START_V_C_DOMAIN_TYPE_BLOCK, match]
+#               end
+#             end
+#           end
+#         end
+
+#         #
+#         # CADL::RootScanner
+#         #
+#         class RootScanner
+#           include Yaparc::Parsable
+#           def initialize
+#             @parser = lambda do |input|
+#               Yaparc::Alt.new(V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN.new,
+#                               V_ISO8601_DATE_CONSTRAINT_PATTERN.new,
+#                               V_ISO8601_TIME_CONSTRAINT_PATTERN.new,
+#                               OpenEHR::ADL::Scanner::Common::V_ISO8601_DURATION.new,
+#                               V_C_DOMAIN_TYPE.new,
+#                               V_ISO8601_DURATION_CONSTRAINT_PATTERN.new,
+#                               Reserved.new,
+#                               OpenEHR::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF.new,
+#                               OpenEHR::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF.new,
+#                               OpenEHR::ADL::Scanner::Common::ERR_V_QUALIFIED_TERM_CODE_REF.new,
+#                               OpenEHR::ADL::Scanner::Common::V_TYPE_IDENTIFIER.new,
+#                               OpenEHR::ADL::Scanner::Common::V_GENERIC_TYPE_IDENTIFIER.new,
+#                               OpenEHR::ADL::Scanner::Common::V_STRING.new,
+#                               OpenEHR::ADL::Scanner::Common::V_LOCAL_CODE.new,
+#                               OpenEHR::ADL::Scanner::Common::V_REAL.new,
+#                               OpenEHR::ADL::Scanner::Common::V_ISO8601_DURATION.new#,
+#                               #OpenEHR::ADL::Scanner::Common::START_TERM_CODE_CONSTRAINT.new
+#                               )
+#             end
+#           end
+#         end
+
+#         # <CADL::Reserved class>
+#         class Reserved
+#           include Yaparc::Parsable
+          
+#           def initialize
+#             @parser = lambda do |input|
+#               orderd_reserved = RESERVED.keys.sort{|x,y| y.length <=> x.length  }
+#               reserved_parsers = orderd_reserved.map do |keyword| 
+#                 Yaparc::Literal.new(keyword,false)
+#               end
+#               Yaparc::Alt.new(Yaparc::Apply.new(Yaparc::Alt.new(*reserved_parsers)) do |match|
+#                                 OpenEHR::LOG.info("Reserved: #{match}")
+#                                 [OpenEHR::ADL::Scanner::CADL::RESERVED[match], OpenEHR::ADL::Scanner::CADL::RESERVED[match]]
+#                               end,
+#                               Yaparc::Apply.new(Yaparc::Regex.new(/\A[a-z][a-zA-Z0-9_]*/)) do |match|
+#                                 OpenEHR::LOG.info("V_ATTRIBUTE_IDENTIFIER: #{match}")
+#                                 [:V_ATTRIBUTE_IDENTIFIER, match]
+#                               end)
+#             end
+#           end
+#         end
+
+#       end
+
+
Index: /ruby/tags/release-0.5.0/lib/adl_parser/lib/parser.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/lib/parser.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/lib/parser.rb	(revision 367)
@@ -0,0 +1,3087 @@
+#
+# DO NOT MODIFY!!!!
+# This file is automatically generated by Racc 1.4.6
+# from Racc grammer file "".
+#
+
+require 'racc/parser.rb'
+
+
+
+$:.unshift File.join(File.dirname(__FILE__))
+require 'logger'
+require 'yaml'
+require 'rubygems'
+require 'adl_parser.rb'
+require 'am.rb'
+require 'rm.rb'
+$DEBUG = false
+
+
+
+module OpenEhr
+  module ADL
+    class Parser < Racc::Parser
+
+module_eval(<<'...end parser.y/module_eval...', 'parser.y', 1208)
+
+def assert_at(file,line, message = "")
+  unless yield
+    raise "Assertion failed !: #{file}, #{line}: #{message}"
+  end
+end
+
+if $DEBUG
+  @@logger = Logger.new('log/parser.log','daily')
+  @@logger.level = Logger::DEBUG
+else
+  @@logger = Logger.new(STDOUT)
+  @@logger.level = Logger::WARN
+end
+
+
+###----------/* keywords */ --------------------------------------------- 
+@@adl_reserved = {
+    'archetype' => :SYM_ARCHETYPE,
+    'adl_version' => :SYM_ADL_VERSION,
+    'controlled' => :SYM_IS_CONTROLLED,
+    'specialize' => :SYM_SPECIALIZE,
+    'concept' => :SYM_CONCEPT,
+    'language' => :SYM_LANGUAGE,
+    'description' => :SYM_DESCRIPTION,
+    'definition' => :SYM_DEFINITION,
+    'invariant' => :SYM_INVARIANT,
+    'ontology' => :SYM_ONTOLOGY,
+    'matches' => :SYM_MATCHES,
+    'is_in' => :SYM_MATCHES,
+    'occurrences' => :SYM_OCCURRENCES,
+    'true' => :SYM_TRUE, #[Tt][Rr][Uu][Ee] -- -> SYM_TRUE 
+    'false' => :SYM_FALSE, # [Ff][Aa][Ll][Ss][Ee] -- -> SYM_FALSE 
+    'infinity' => :SYM_INFINITY # [Ii][Nn][Ff][Ii][Nn][Ii][Tt][Yy] -- -> SYM_INFINITY 
+}
+
+@@dadl_reserved = {
+  'true' => :SYM_TRUE, #[Tt][Rr][Uu][Ee] -- -> SYM_TRUE 
+  'false' => :SYM_FALSE, # [Ff][Aa][Ll][Ss][Ee] -- -> SYM_FALSE 
+  'infinity' => :SYM_INFINITY # [Ii][Nn][Ff][Ii][Nn][Ii][Tt][Yy] -- -> SYM_INFINITY 
+}
+
+@@cadl_reserved = {
+  'then' => :SYM_THEN, # [Tt][Hh][Ee][Nn]
+  'else' => :SYM_ELSE, # [Ee][Ll][Ss][Ee]
+  'and' => :SYM_AND, # [Aa][Nn][Dd]
+  'or' => :SYM_OR, # [Oo][Rr]
+  'xor' => :SYM_XOR, # [Xx][Oo][Rr]
+  'not' => :SYM_NOT, # [Nn][Oo][Tt]
+  'implies' => :SYM_IMPLIES, # [Ii][Mm][Pp][Ll][Ii][Ee][Ss]
+  'true' => :SYM_TRUE, #[Tt][Rr][Uu][Ee] -- -> SYM_TRUE 
+  'false' => :SYM_FALSE, # [Ff][Aa][Ll][Ss][Ee] -- -> SYM_FALSE 
+  'forall' => :SYM_FORALL, # [Ff][Oo][Rr][_][Aa][Ll][Ll]
+  'exists' => :SYM_EXISTS, # [Ee][Xx][Ii][Ss][Tt][Ss]
+  'existence' => :SYM_EXISTENCE, # [Ee][Xx][Iu][Ss][Tt][Ee][Nn][Cc][Ee]
+  'occurrences' => :SYM_OCCURRENCES, # [Oo][Cc][Cc][Uu][Rr][Rr][Ee][Nn][Cc][Ee][Ss]
+  'cardinality' => :SYM_CARDINALITY, # [Cc][Aa][Rr][Dd][Ii][Nn][Aa][Ll][Ii][Tt][Yy]
+  'ordered' => :SYM_ORDERED, # [Oo][Rr][Dd][Ee][Rr][Ee][Dd]
+  'unordered' => :SYM_UNORDERED, # [Uu][Nn][Oo][Rr][Dd][Ee][Rr][Ee][Dd]
+  'unique' => :SYM_UNIQUE, # [Uu][Nn][Ii][Qq][Uu][Ee]
+  'matches' => :SYM_MATCHES, # [Mm][Aa][Tt][Cc][Hh][Ee][Ss]
+  'is_in' => :SYM_MATCHES, # [Ii][Ss][_][Ii][Nn]
+  'invariant' => :SYM_INVARIANT, # [Ii][Nn][Vv][Aa][Rr][Ii][Aa][Nn][Tt]
+  'infinity' => :SYM_INFINITY, # [Ii][Nn][Ff][Ii][Nn][Ii][Tt][Yy] -- -> SYM_INFINITY 
+  'use_node' => :SYM_USE_NODE, # [Uu][Ss][Ee][_][Nn][Oo][Dd][Ee]
+  'use_archetype' => :SYM_ALLOW_ARCHETYPE, # [Uu][Ss][Ee][_][Aa][Rr][Cc][Hh][Ee][Tt][Yy][Pp][Ee]
+  'allow_archetype' => :SYM_ALLOW_ARCHETYPE, # [Aa][Ll][Ll][Oo][Ww][_][Aa][Rr][Cc][Hh][Ee][Tt][Yy][Pp][Ee]
+  'include' => :SYM_INCLUDE, # [Ii][Nn][Cc][Ll][Uu][Dd][Ee]
+  'exclude' => :SYM_EXCLUDE # [Ee][Xx][Cc][Ll][Uu][Dd][Ee]
+}
+
+
+###----------/* Scanner */ ----------------------------------------------- 
+
+
+def scan
+  @@logger.debug("#{__FILE__}:#{__LINE__}: Entering scan at #{@filename}:#{@lineno}:")
+  scanner = OpenEHR::ADL::Scanner::ADLScanner.new(@adl_type, @filename)
+
+  until @data.nil?  do
+    @data = scanner.scan(@data) do |sym, val|
+        yield sym, val
+    end
+    @data = $' # variable $' receives the string after the match
+  end
+  yield :EOF, nil
+  yield false, '$'
+end # of scan
+
+
+def parse(data, filename, lineno = 1, debug = false)
+  @yydebug = true
+  @parsestring = data
+  @data = data
+  @lineno = lineno
+  @filename = filename
+  @adl_type = [:adl] # {:adl, :cadl, :dadl}
+  @in_regexp = false
+  @in_interval = false
+  @in_c_domain_type = false
+  yyparse self, :scan
+end
+
+def on_error( t, v, values)
+  raise Racc::ParseError, "#{@filename}:#{@lineno}: Inline syntax error on #{v.inspect}"
+end
+
+
+__END__
+
+
+
+
+### Local Variables:
+### mode:ruby
+### mode:font-lock
+### comment-column:0
+### comment-start: "### "
+### comment-end:"" 
+### End:
+...end parser.y/module_eval...
+##### State transition tables begin ###
+
+racc_action_table = [
+   576,   483,   147,   164,   476,   594,   474,    59,   215,   472,
+   131,   470,   452,   578,   575,   464,   462,    29,   383,   341,
+   387,    67,   385,   321,   155,   157,    25,    26,   526,   114,
+   119,   216,    73,   500,   190,   121,    36,   513,   515,   463,
+   518,   519,    36,   517,   502,    30,    62,   574,   148,   155,
+   157,   434,    49,    51,   284,   112,   444,    81,    84,    87,
+   194,   160,    97,   309,   314,   238,   114,   117,   119,   121,
+   534,   526,   121,   121,   119,    73,   117,   114,   128,   129,
+   513,   515,    79,   518,   519,   277,   160,   281,   286,   288,
+   537,   163,   119,   298,    75,    49,    51,   284,   152,   153,
+    81,    84,    87,   194,   121,    97,   309,   314,   114,   114,
+   117,   119,   121,   534,   102,   119,   436,   230,   232,   494,
+   168,   498,   134,   152,   153,     9,    73,   496,   155,   157,
+   281,   286,   288,   537,   155,   157,   298,    71,   102,   338,
+   249,   322,   631,   323,   344,    11,    49,    51,   111,   248,
+   231,    81,    84,    87,   467,   117,    97,   100,   101,   155,
+   157,   140,   102,   100,   101,   160,    91,    95,   325,   326,
+   135,   160,    97,    79,   117,    81,    84,    87,   468,   117,
+    97,   100,   101,   389,   114,   140,   190,   155,   157,   138,
+    91,    95,   173,   155,   157,   121,   160,    79,   392,    81,
+    84,    87,   152,   153,    97,   100,   101,  -374,   152,   153,
+  -373,    81,   329,   330,    91,    95,   155,   157,   219,   158,
+   161,    79,   571,   151,   160,    22,   154,   156,   155,   157,
+   160,   158,   161,   152,   153,   151,   325,   326,   154,   156,
+    97,   219,   242,    23,   238,   544,   103,   573,   541,   394,
+   601,   542,   543,   160,     1,    81,    84,    87,   602,   603,
+    97,   152,   153,   263,   109,   160,   256,   152,   153,   259,
+   261,   395,    67,     4,    49,    51,   103,    79,    81,    84,
+    87,   144,    16,    97,    17,   159,   145,   102,    49,    51,
+   152,   153,   333,    36,   325,   326,   219,   159,    97,   149,
+    79,   396,   152,   153,   150,   121,   219,    81,   329,   330,
+   140,    81,    84,    87,   102,    16,    97,    17,    49,    51,
+   114,   117,   119,   121,    81,    84,    87,   128,   129,    97,
+   100,   101,   219,    81,    84,    87,   420,   140,    97,    91,
+    95,   272,   219,    81,    84,    87,    79,   416,    97,   277,
+   272,    81,    84,    87,   398,    79,    97,   100,   101,   389,
+   102,   481,   415,   329,   330,    79,    91,    95,   335,    81,
+    84,    87,   102,    79,    97,   128,   129,   212,   241,    81,
+    84,    87,   242,    71,    97,   325,   326,    35,   240,    97,
+   244,    79,    49,    51,   399,   140,   400,    81,    84,    87,
+   102,    79,    97,   100,   101,   401,   418,   402,   219,    81,
+    84,    87,    91,    95,    97,   100,   101,   403,    40,    79,
+    36,   629,   630,    71,    91,    95,   404,   219,    35,    49,
+    51,    79,    49,    51,    81,   329,   330,    81,    84,    87,
+   102,   405,    97,   100,   101,    81,    84,    87,   431,   432,
+    97,   406,    91,    95,    81,   329,   330,   492,   102,    79,
+   407,    36,   408,    71,    81,    84,    87,    79,   409,    97,
+    49,    51,    49,    51,   429,   430,   219,    81,    84,    87,
+   410,    71,    97,   100,   101,   102,    79,    81,   329,   330,
+    49,    51,    91,    95,   270,    81,    84,    87,   411,    79,
+    97,   100,   101,   102,   239,    81,   329,   330,   140,   247,
+    91,    95,   246,    81,    84,    87,   145,    79,    97,    81,
+   329,   330,    81,    84,    87,   150,   140,    97,   100,   101,
+   144,   102,   611,   612,   613,    79,   416,    91,    95,   219,
+    81,    84,    87,   149,    79,    97,   100,   101,   245,   219,
+   244,   415,   329,   330,    71,    91,    95,   219,   172,   169,
+   170,   171,    79,    49,    51,   346,   347,    35,    81,    84,
+    87,   348,   349,    97,   100,   101,    81,    84,    87,   251,
+   102,    97,    56,    91,    95,   252,    81,    84,    87,   416,
+    79,    97,    35,   253,    81,    84,    87,   264,    79,    97,
+    36,   427,   428,   140,    81,   329,   330,   265,    79,    49,
+    51,   325,   326,   356,   357,    97,    79,    81,    84,    87,
+   358,   359,    97,   100,   101,    36,   325,   326,   425,   426,
+    97,   119,    91,    95,    49,    51,   243,   284,   242,    79,
+    81,    84,    87,   194,   437,    97,   309,   314,   438,   114,
+   117,   119,   121,    81,    84,    87,   325,   326,    97,   439,
+    97,   440,   114,   117,   119,   121,   172,   169,   170,   171,
+   281,   286,   288,  -103,   366,   367,   298,   176,   423,   424,
+    81,    84,    87,   194,   441,    97,   128,   129,   111,   114,
+   117,   119,   121,   190,   124,   112,   374,   375,    81,    84,
+    87,   421,   422,    97,   128,   129,   111,   114,   117,   119,
+   121,   442,   124,    81,    84,    87,    49,    51,    97,    81,
+   329,   330,   114,   117,   119,   121,    81,    84,    87,   241,
+   445,    97,   446,   447,   448,   114,   117,   119,   121,    81,
+    84,    87,   449,   450,    97,   240,   453,   454,   114,   117,
+   119,   121,   172,   169,   170,   171,   172,   169,   170,   171,
+   328,    81,   329,   330,   172,   169,   170,   171,   172,   169,
+   170,   171,   172,   169,   170,   171,   172,   169,   170,   171,
+   172,   169,   170,   171,   455,   456,   457,   458,   460,   461,
+   140,   214,   148,   138,   213,   210,   103,   166,   478,   480,
+   266,   482,   163,   485,   486,   487,   117,   489,   146,   140,
+   139,   136,    36,   110,    69,   503,   114,   505,   117,   507,
+   119,   509,   121,   511,   512,    35,   540,    62,    58,   546,
+   547,   548,   267,   550,    57,   552,   114,   554,   117,   556,
+   119,   558,   121,   560,   561,   562,   563,   564,   565,   163,
+  -103,   569,   250,    54,   173,    34,   114,    31,   580,   581,
+   582,   121,   121,    28,   121,   583,   584,   585,   586,   587,
+   588,   268,   591,   592,   593,    24,   596,   597,   111,    21,
+   269,   604,   605,   606,   607,    79,   573,   609,   270,   271,
+   619,   620,   621,   622,    15,   624,    14,   625,    12,   627,
+   628,   319,     8,     7,   121 ]
+
+racc_action_check = [
+   531,   410,    86,    91,   405,   570,   404,    43,   147,   403,
+    63,   402,   375,   531,   529,   398,   395,    21,   265,   250,
+   267,    52,   266,   231,   222,   222,    18,    18,   531,   250,
+   265,   147,   531,   430,   267,   266,    43,   531,   531,   395,
+   531,   531,    52,   462,   432,    21,    63,   529,    86,   320,
+   320,   357,   531,   531,   531,   410,   367,   531,   531,   531,
+   531,   222,   531,   531,   531,   320,   531,   531,   531,   531,
+   531,   462,   375,   405,   404,   462,   403,   402,   398,   398,
+   462,   462,    91,   462,   462,   462,   320,   531,   531,   531,
+   531,   570,   430,   531,    54,   462,   462,   462,   222,   222,
+   462,   462,   462,   462,   432,   462,   462,   462,   357,   462,
+   462,   462,   462,   462,    54,   367,   359,   163,   166,   424,
+    95,   428,    69,   320,   320,     4,    54,   426,   227,   227,
+   462,   462,   462,   462,   229,   229,   462,    54,   166,   248,
+   188,   240,   624,   240,   252,     4,    54,    54,   248,   187,
+   163,    54,    54,    54,   400,   252,    54,    54,    54,   224,
+   224,   166,   624,    95,    95,   227,    54,    54,   424,   424,
+    69,   229,   424,    54,   359,   166,   166,   166,   401,   428,
+   166,   166,   166,   268,   426,   624,   269,   218,   218,    71,
+   166,   166,    98,   226,   226,   264,   224,   166,   271,   624,
+   624,   624,   227,   227,   624,   624,   624,    71,   229,   229,
+    98,   400,   400,   400,   624,   624,    88,    88,   157,    88,
+    88,   624,   519,    88,   218,    14,    88,    88,   174,   174,
+   226,   174,   174,   224,   224,   174,   401,   401,   174,   174,
+   401,   152,   522,    14,   174,   480,   110,   522,   480,   272,
+   575,   480,   480,    88,     0,   157,   157,   157,   579,   579,
+   157,   218,   218,   194,    60,   174,   194,   226,   226,   194,
+   194,   274,    60,     0,   519,   519,    58,   157,   152,   152,
+   152,    84,    11,   152,    11,    88,    84,   171,   110,   110,
+    88,    88,   244,    60,   244,   244,   153,   174,   244,    87,
+   152,   275,   174,   174,    87,   480,   161,   575,   575,   575,
+   171,   194,   194,   194,   168,    26,   194,    26,    58,    58,
+   194,   194,   194,   194,   171,   171,   171,   243,   243,   171,
+   171,   171,   160,   153,   153,   153,   349,   168,   153,   171,
+   171,   278,   159,   161,   161,   161,   171,   321,   161,   214,
+   214,   168,   168,   168,   279,   153,   168,   168,   168,   408,
+   626,   408,   321,   321,   321,   161,   168,   168,   246,   160,
+   160,   160,   170,   168,   160,   246,   246,   136,   282,   159,
+   159,   159,   283,   626,   159,   349,   349,   136,   284,   349,
+   287,   160,   626,   626,   289,   170,   290,   626,   626,   626,
+   619,   159,   626,   626,   626,   293,   347,   296,   158,   170,
+   170,   170,   626,   626,   170,   170,   170,   300,    28,   626,
+   136,   622,   622,   619,   170,   170,   303,   151,    28,   136,
+   136,   170,   619,   619,   270,   270,   270,   619,   619,   619,
+    82,   306,   619,   619,   619,   158,   158,   158,   355,   355,
+   158,   309,   619,   619,   347,   347,   347,   422,   614,   619,
+   310,    28,   312,    82,   151,   151,   151,   158,   314,   151,
+    28,    28,    82,    82,   354,   354,   154,    82,    82,    82,
+   315,   614,    82,    82,    82,   169,   151,   574,   574,   574,
+   614,   614,    82,    82,   317,   614,   614,   614,   319,    82,
+   614,   614,   614,   102,   175,   422,   422,   422,   169,   186,
+   614,   614,   185,   154,   154,   154,   325,   614,   154,   418,
+   418,   418,   169,   169,   169,   326,   102,   169,   169,   169,
+   329,   609,   606,   606,   606,   154,   564,   169,   169,   219,
+   102,   102,   102,   330,   169,   102,   102,   102,   184,   156,
+   182,   564,   564,   564,   609,   102,   102,   155,   175,   175,
+   175,   175,   102,   609,   609,   254,   254,   515,   609,   609,
+   609,   255,   255,   609,   609,   609,   219,   219,   219,   191,
+   172,   219,    34,   609,   609,   192,   156,   156,   156,   486,
+   609,   156,    34,   193,   155,   155,   155,   195,   219,   155,
+   515,   353,   353,   172,   486,   486,   486,   196,   156,   515,
+   515,   420,   420,   257,   257,   420,   155,   172,   172,   172,
+   258,   258,   172,   172,   172,    34,   494,   494,   352,   352,
+   494,   251,   172,   172,    34,    34,   181,   215,   179,   172,
+   215,   215,   215,   215,   360,   215,   215,   215,   361,   215,
+   215,   215,   215,   263,   263,   263,   241,   241,   263,   362,
+   241,   363,   263,   263,   263,   263,    96,    96,    96,    96,
+   215,   215,   215,   103,   260,   260,   215,   103,   351,   351,
+   103,   103,   103,   103,   364,   103,   103,   103,   103,   103,
+   103,   103,   103,   103,   103,    62,   262,   262,    62,    62,
+    62,   350,   350,    62,    62,    62,    62,    62,    62,    62,
+    62,   365,    62,   256,   256,   256,   518,   518,   256,   492,
+   492,   492,   256,   256,   256,   256,   261,   261,   261,   178,
+   368,   261,   369,   370,   371,   261,   261,   261,   261,   259,
+   259,   259,   372,   373,   259,   176,   376,   377,   259,   259,
+   259,   259,   237,   237,   237,   237,   234,   234,   234,   234,
+   242,   242,   242,   242,   236,   236,   236,   236,   617,   617,
+   617,   617,   235,   235,   235,   235,   233,   233,   233,   233,
+   632,   632,   632,   632,   378,   379,   380,   381,   393,   394,
+   148,   146,   141,   140,   139,   116,   108,    92,   406,   407,
+   199,   409,    89,   413,   415,   417,   249,   419,    85,    79,
+    73,    70,    67,    61,    53,   433,   434,   435,   436,   443,
+   444,   451,   452,   460,   461,    48,   463,    47,    42,   488,
+   490,   491,   202,   493,    36,   495,   496,   497,   498,   499,
+   500,   501,   502,   504,   506,   508,   510,   511,   512,   514,
+    35,   517,   189,    33,   520,    27,   247,    24,   537,   538,
+   540,   541,   542,    20,   544,   549,   551,   553,   555,   557,
+   559,   204,   565,   566,   568,    16,   572,   573,   245,    13,
+   205,   581,   589,   590,   591,   595,   598,   604,   207,   213,
+   610,   611,   612,   613,     8,   616,     6,   618,     5,   620,
+   621,   216,     3,     2,   543 ]
+
+racc_action_pointer = [
+   253,   nil,   884,   902,   124,   880,   869,   nil,   894,   nil,
+   nil,   258,   nil,   851,   224,   nil,   867,   nil,     4,   nil,
+   833,    16,   nil,   nil,   832,   nil,   291,   824,   417,   nil,
+   nil,   nil,   nil,   821,   581,   799,   833,   nil,   nil,   nil,
+   nil,   nil,   820,    -8,   nil,   nil,   nil,   776,   814,   nil,
+   nil,   nil,    -2,   766,    93,   nil,   nil,   nil,   265,   nil,
+   249,   805,   640,    -5,   nil,   nil,   nil,   768,   nil,   121,
+   761,   160,   nil,   776,   nil,   nil,   nil,   nil,   nil,   765,
+   nil,   nil,   419,   nil,   223,   774,   -32,   241,   210,   715,
+   nil,     2,   750,   nil,   nil,    99,   590,   nil,   163,   nil,
+   nil,   nil,   482,   622,   nil,   nil,   nil,   nil,   785,   nil,
+   235,   nil,   nil,   nil,   nil,   nil,   743,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   376,   nil,   nil,   759,
+   764,   712,   nil,   nil,   nil,   nil,   779,    -4,   746,   nil,
+   nil,   406,   220,   275,   455,   536,   528,   197,   387,   321,
+   311,   285,   nil,   116,   nil,   nil,   117,   nil,   293,   464,
+   351,   266,   559,   nil,   222,   482,   689,   nil,   673,   582,
+   nil,   580,   494,   nil,   492,   456,   453,    93,    84,   796,
+   nil,   523,   529,   578,   253,   541,   551,   nil,   nil,   744,
+   nil,   nil,   776,   nil,   815,   824,   nil,   832,   nil,   nil,
+   nil,   nil,   nil,   853,   306,   582,   865,   nil,   181,   518,
+   nil,   nil,    18,   nil,   153,   nil,   187,   122,   nil,   128,
+   nil,    11,   nil,   700,   680,   696,   688,   676,   nil,   nil,
+    86,   597,   703,   263,   235,   812,   311,   789,    82,   738,
+   -38,   562,    87,   nil,   504,   510,   655,   552,   559,   681,
+   613,   668,   635,   595,   125,   -39,   -35,   -37,   128,   115,
+   376,   161,   167,   nil,   237,   287,   nil,   nil,   297,   331,
+   nil,   nil,   322,   326,   332,   nil,   nil,   334,   nil,   380,
+   373,   nil,   nil,   382,   nil,   nil,   384,   nil,   nil,   nil,
+   394,   nil,   nil,   403,   nil,   nil,   418,   nil,   nil,   395,
+   380,   nil,   406,   nil,   412,   457,   nil,   438,   nil,   461,
+    43,   304,   nil,   nil,   nil,   453,   462,   nil,   nil,   472,
+   485,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   396,   nil,   326,
+   640,   617,   567,   540,   413,   387,   nil,    41,   nil,   106,
+   583,   587,   598,   600,   623,   650,   nil,    46,   669,   671,
+   672,   673,   681,   682,   nil,     2,   685,   686,   723,   724,
+   725,   726,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   705,   755,     4,   nil,   nil,    14,   nil,
+   153,   177,    10,     8,     5,     3,   733,   738,   304,   737,
+     0,   nil,   nil,   789,   nil,   742,   nil,   744,   461,   746,
+   552,   nil,   447,   nil,   109,   nil,   117,   nil,   111,   nil,
+    23,   nil,    34,   754,   749,   756,   750,   nil,   nil,   nil,
+   nil,   nil,   nil,   758,   751,   nil,   nil,   nil,   nil,   nil,
+   nil,   760,   752,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   789,   812,    42,   790,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   235,   nil,   nil,   nil,   nil,   nil,   546,   nil,   768,   nil,
+   769,   770,   661,   772,   567,   774,   769,   776,   770,   778,
+   771,   780,   772,   nil,   782,   nil,   783,   nil,   784,   nil,
+   785,   835,   790,   nil,   762,   556,   nil,   837,   663,   221,
+   825,   nil,   186,   nil,   nil,   nil,   nil,   nil,   nil,    -9,
+   nil,    -1,   nil,   nil,   nil,   nil,   nil,   765,   825,   nil,
+   823,   791,   792,   834,   794,   nil,   nil,   nil,   nil,   804,
+   nil,   805,   nil,   806,   nil,   807,   nil,   808,   nil,   809,
+   nil,   nil,   nil,   nil,   493,   810,   859,   nil,   834,   nil,
+     4,   nil,   847,   806,   429,   249,   nil,   nil,   nil,   166,
+   nil,   869,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   868,
+   860,   826,   nil,   nil,   nil,   805,   nil,   nil,   825,   nil,
+   nil,   nil,   nil,   nil,   842,   nil,   448,   nil,   nil,   510,
+   844,   868,   869,   870,   437,   nil,   848,   692,   883,   379,
+   813,   814,   337,   nil,   141,   nil,   339,   nil,   nil,   nil,
+   nil,   nil,   704 ]
+
+racc_action_default = [
+  -376,    -2,  -376,  -376,    -6,  -376,   -13,    -4,  -376,    -5,
+    -7,  -376,    -1,  -376,  -376,   633,  -376,   -12,  -376,    -9,
+   -18,  -376,   -15,   -14,  -376,    -8,  -376,   -21,  -376,   -17,
+   -16,   -11,   -10,  -376,  -376,  -112,   -94,   -89,   -19,   -90,
+   -20,  -108,  -376,  -376,   -98,   -99,  -100,  -376,  -376,  -146,
+   -87,  -147,   -88,   -82,  -376,   -22,   -23,   -95,  -376,  -110,
+  -376,  -376,  -376,  -376,  -104,  -109,  -101,  -376,   -91,  -376,
+  -376,  -289,  -281,  -376,  -282,   -25,   -24,  -248,   -26,  -284,
+  -253,  -152,   -27,  -254,  -376,  -376,  -376,  -376,  -376,  -305,
+  -273,  -376,  -376,  -283,  -274,  -376,  -251,  -167,   -31,  -286,
+  -271,  -272,  -376,  -112,   -96,   -93,  -113,   -97,  -376,  -111,
+  -376,  -187,  -148,  -122,  -191,  -123,  -376,  -204,  -124,  -217,
+  -125,  -230,  -126,  -127,  -247,  -128,  -129,  -130,  -182,  -183,
+  -121,  -102,  -105,   -92,   -84,   -83,  -376,    -3,  -288,  -376,
+  -289,  -285,  -249,  -373,  -153,  -168,  -376,  -376,  -376,  -154,
+  -169,  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,
+  -376,  -376,   -30,  -376,  -256,  -255,  -376,  -259,  -376,  -376,
+  -376,  -376,  -376,   -32,  -376,  -376,  -148,  -144,  -133,  -122,
+  -145,  -134,  -123,  -116,  -135,  -124,  -136,  -125,  -137,  -126,
+  -243,  -138,  -127,  -376,  -376,  -139,  -128,  -117,  -140,  -129,
+  -118,  -141,  -119,  -142,  -131,  -120,  -143,  -132,  -114,  -106,
+  -107,   -85,   -86,  -376,  -376,  -376,  -376,  -287,  -263,  -376,
+  -278,  -279,  -264,  -275,  -265,  -276,  -261,  -260,  -277,  -262,
+  -307,  -376,  -252,  -250,  -267,  -268,  -269,  -266,  -280,  -270,
+  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,
+  -376,  -376,  -376,  -115,  -376,  -376,  -376,  -376,  -376,  -376,
+  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,
+  -376,  -376,  -290,   -63,  -376,  -376,   -33,   -62,   -34,  -357,
+  -336,  -322,  -317,  -310,  -347,  -343,  -328,  -316,  -334,  -376,
+  -313,   -54,  -323,  -319,   -55,  -329,  -325,   -56,  -375,  -335,
+  -331,   -57,  -342,  -337,  -312,   -58,  -344,  -318,   -59,  -353,
+  -340,  -324,  -348,   -60,  -354,  -350,  -330,  -311,   -61,  -376,
+  -376,  -376,  -149,  -151,  -171,  -376,  -376,  -155,  -157,  -376,
+  -376,  -185,  -170,  -172,  -189,  -186,  -184,  -193,  -190,  -188,
+  -206,  -194,  -192,  -219,  -207,  -205,  -166,  -376,  -181,  -376,
+  -376,  -376,  -376,  -376,  -376,  -376,  -203,  -376,  -216,  -376,
+  -376,  -376,  -376,  -376,  -376,  -376,  -229,  -376,  -376,  -376,
+  -376,  -376,  -376,  -376,  -242,  -376,  -376,  -376,  -376,  -376,
+  -376,  -376,  -232,  -220,  -218,  -233,  -231,  -246,  -244,  -150,
+  -245,  -156,   -28,   -68,  -376,  -376,   -29,   -64,  -376,  -257,
+  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,
+  -376,  -258,  -303,  -376,  -308,  -152,  -304,  -376,  -376,  -376,
+  -376,  -164,  -376,  -179,  -376,  -201,  -376,  -214,  -376,  -227,
+  -376,  -240,  -376,  -376,  -376,  -376,  -376,  -163,  -178,  -200,
+  -213,  -226,  -239,  -376,  -376,  -165,  -180,  -202,  -215,  -228,
+  -241,  -376,  -376,  -162,  -177,  -199,  -212,  -225,  -238,   -69,
+  -376,  -376,  -376,  -376,  -359,  -358,  -314,  -315,  -321,  -320,
+  -327,  -326,  -333,  -332,  -339,  -338,  -346,  -345,  -355,  -341,
+  -376,  -349,  -356,  -352,  -351,  -306,  -376,  -158,  -376,  -173,
+  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,  -376,
+  -376,  -376,  -376,  -195,  -376,  -208,  -376,  -221,  -376,  -234,
+  -376,  -376,  -376,   -43,  -305,  -376,   -53,   -44,  -376,  -376,
+   -31,   -72,  -310,   -70,   -36,   -37,  -372,   -38,   -39,  -360,
+   -40,  -376,  -363,   -41,  -367,  -366,   -42,  -369,  -376,   -35,
+  -376,  -376,  -376,  -376,  -376,  -309,  -160,  -175,  -159,  -376,
+  -174,  -376,  -196,  -376,  -209,  -376,  -222,  -376,  -235,  -376,
+  -197,  -210,  -223,  -236,  -376,  -292,  -376,   -49,  -376,   -67,
+  -305,   -52,   -50,  -376,  -376,  -376,   -44,   -71,   -65,  -376,
+  -370,  -376,   -66,  -161,  -176,  -198,  -211,  -224,  -237,  -376,
+  -295,  -376,  -291,   -45,   -47,  -376,   -51,  -365,  -376,  -364,
+  -361,  -362,  -368,  -371,   -73,  -294,  -376,  -293,   -46,  -376,
+   -75,  -296,  -297,  -298,   -74,   -77,  -376,   -80,  -376,  -376,
+  -376,  -376,  -376,   -78,  -376,   -48,   -76,  -299,  -300,  -301,
+  -302,   -81,   -79 ]
+
+racc_goto_table = [
+    96,   113,   165,    38,   162,    48,   118,   180,   276,    55,
+   413,    48,   202,   120,   523,   104,    65,   273,   105,   126,
+   116,    92,    77,   174,    66,   125,    68,    64,    96,    19,
+   614,    98,     3,   115,    68,   108,   393,   531,    60,   623,
+   626,   133,   179,   132,    32,   289,   618,   185,   175,    92,
+   142,   623,   610,   123,   187,   278,    63,   275,   459,    82,
+   199,   183,   208,   193,   197,   200,   196,   104,    78,   205,
+   209,   484,   218,    76,   182,   222,    65,   224,   122,   226,
+   227,   397,   229,   577,    66,   220,   221,   108,   223,    18,
+   225,    10,     2,   228,   192,   137,    70,    53,    33,   204,
+   207,   178,   181,   184,   186,   188,   191,   195,   198,   201,
+   203,   211,   233,    48,   175,   234,   235,   236,   237,   189,
+   206,   177,    27,    20,   167,   141,    13,     6,   217,   566,
+   589,     5,   545,   254,   599,   579,   nil,   nil,   nil,   nil,
+   320,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   262,   nil,   nil,   283,   nil,   nil,   260,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   255,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   388,   nil,   390,   nil,
+   nil,   327,   nil,   nil,   nil,   258,   287,   331,   nil,   nil,
+   336,   nil,   nil,   nil,   nil,   350,   334,   nil,   360,   339,
+   368,   nil,   376,   nil,   nil,   nil,   nil,   nil,   nil,   391,
+   257,   nil,   324,   355,   343,   332,   365,   nil,   373,   354,
+   381,   382,   364,   386,   372,   nil,   380,   351,   384,   nil,
+   361,   nil,   369,   nil,   377,   nil,   nil,   nil,   nil,   nil,
+   340,   nil,   nil,   345,   nil,   nil,   nil,   353,   nil,   nil,
+   363,   nil,   371,   590,   379,   nil,   521,   nil,   nil,   nil,
+   412,   nil,   nil,   337,   nil,   nil,   342,   nil,   nil,   nil,
+   nil,   nil,   352,   nil,   nil,   362,   nil,   370,   nil,   378,
+   nil,   nil,   nil,   nil,   nil,   nil,   417,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   479,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   419,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   443,   nil,   451,   nil,   nil,   nil,   nil,   nil,   nil,   466,
+   nil,   nil,   465,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   435,   nil,   nil,   nil,   nil,   nil,   nil,   488,   nil,   nil,
+   nil,   491,   477,   nil,   nil,   nil,   nil,   475,   nil,   nil,
+   nil,   nil,   469,   433,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   501,
+   nil,   490,   nil,   499,   473,   493,   nil,   nil,   nil,   nil,
+   nil,   522,   nil,   nil,   nil,   nil,   nil,   508,   nil,   510,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   471,   497,
+   nil,   nil,   nil,   nil,   nil,   412,   nil,   506,   nil,   567,
+   nil,   549,   nil,   287,   nil,   nil,   nil,   262,   nil,   520,
+   nil,   nil,   495,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   504,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   559,
+   nil,   nil,   nil,   557,   nil,   551,   nil,   nil,   nil,   nil,
+   522,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   595,   nil,   nil,   nil,   555,
+   568,   nil,    48,   nil,   nil,   570,   572,   nil,   355,   365,
+   373,   381,   287,   412,   nil,   nil,   608,   nil,   520,   nil,
+   nil,   nil,   553,   598,   600,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   632 ]
+
+racc_goto_check = [
+    56,    81,    34,    15,    22,    23,    83,   104,    24,    15,
+   115,    23,    78,    84,    26,    59,    72,    48,    62,    88,
+    71,    55,   105,   109,    66,    87,    60,    69,    56,    14,
+    53,    23,     1,    82,    60,    23,    51,    50,    58,    54,
+    53,    60,    81,    69,    14,    39,    37,    83,    56,    55,
+   105,    54,    36,    86,    84,    25,    68,    20,    52,    18,
+    88,    71,    74,    75,    76,    77,    87,    59,    17,    79,
+    62,    80,   109,    16,    82,   109,    72,   109,    85,   109,
+   109,    48,   109,    26,    66,   110,   110,    23,   110,    13,
+   110,    12,    11,   110,    86,    10,     9,     8,     7,    90,
+    91,    92,    93,    94,    95,    96,    97,    98,    99,   100,
+   101,    15,    56,    23,    56,    56,    56,    56,    56,    85,
+   102,   103,     6,     5,   106,   108,     4,     3,   112,   113,
+   114,     2,   116,    81,   127,   129,   nil,   nil,   nil,   nil,
+   109,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,    88,   nil,   nil,    81,   nil,   nil,    87,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,    82,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,    78,   nil,    78,   nil,
+   nil,    81,   nil,   nil,   nil,    86,    82,    83,   nil,   nil,
+    83,   nil,   nil,   nil,   nil,    81,    84,   nil,    81,    84,
+    81,   nil,    81,   nil,   nil,   nil,   nil,   nil,   nil,    81,
+    85,   nil,    82,    88,    87,    82,    88,   nil,    88,    87,
+    88,    88,    87,    88,    87,   nil,    87,    82,    87,   nil,
+    82,   nil,    82,   nil,    82,   nil,   nil,   nil,   nil,   nil,
+    86,   nil,   nil,    86,   nil,   nil,   nil,    86,   nil,   nil,
+    86,   nil,    86,   115,    86,   nil,    24,   nil,   nil,   nil,
+    81,   nil,   nil,    85,   nil,   nil,    85,   nil,   nil,   nil,
+   nil,   nil,    85,   nil,   nil,    85,   nil,    85,   nil,    85,
+   nil,   nil,   nil,   nil,   nil,   nil,    81,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   104,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+    82,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+    87,   nil,    88,   nil,   nil,   nil,   nil,   nil,   nil,    81,
+   nil,   nil,    83,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+    86,   nil,   nil,   nil,   nil,   nil,   nil,    81,   nil,   nil,
+   nil,    81,    88,   nil,   nil,   nil,   nil,    87,   nil,   nil,
+   nil,   nil,    82,    85,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    88,
+   nil,    82,   nil,    87,    86,    82,   nil,   nil,   nil,   nil,
+   nil,    81,   nil,   nil,   nil,   nil,   nil,    87,   nil,    88,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    85,    86,
+   nil,   nil,   nil,   nil,   nil,    81,   nil,    86,   nil,    22,
+   nil,    81,   nil,    82,   nil,   nil,   nil,    88,   nil,    23,
+   nil,   nil,    85,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+    85,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    88,
+   nil,   nil,   nil,    87,   nil,    82,   nil,   nil,   nil,   nil,
+    81,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,    22,   nil,   nil,   nil,    86,
+    15,   nil,    23,   nil,   nil,    23,    23,   nil,    88,    88,
+    88,    88,    82,    81,   nil,   nil,    34,   nil,    23,   nil,
+   nil,   nil,    85,    81,    81,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+    56 ]
+
+racc_goto_pointer = [
+   nil,    32,   131,   127,   120,   110,   102,    71,    64,    43,
+    25,    92,    87,    78,    18,   -25,    19,    14,     5,   nil,
+  -157,   nil,   -85,   -23,  -206,  -159,  -448,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   -89,   nil,  -552,  -564,   nil,  -170,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,  -197,   nil,
+  -425,  -236,  -335,  -579,  -575,   -33,   -54,   nil,    -5,   -43,
+   -26,   nil,   -40,   nil,   nil,   nil,   -24,   nil,     9,   -20,
+   nil,   -42,   -32,   nil,   -46,   -40,   -39,   -38,   -91,   -34,
+  -339,   -61,   -29,   -56,   -49,    16,    -9,   -37,   -43,   nil,
+    -4,    -3,    -2,    -1,     0,     1,     2,     3,     4,     5,
+     6,     7,    17,    18,   -96,   -32,    29,   nil,    46,   -79,
+   -67,   nil,   -20,  -383,  -434,  -311,  -354,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,  -440,   nil,  -402 ]
+
+racc_goto_default = [
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   539,   nil,    85,
+   nil,    89,   nil,   143,   nil,   nil,   nil,   524,   525,   527,
+   528,   530,   533,   536,    93,   538,   nil,   nil,   514,   516,
+   291,   294,   297,   301,   305,   308,   313,   318,   nil,   274,
+   nil,   nil,   nil,   nil,   615,   616,   617,    50,    52,    37,
+    39,    42,   nil,   107,    44,    45,    46,    47,   nil,   nil,
+    61,   nil,    41,    43,   106,   nil,   nil,   nil,   nil,   nil,
+   130,    72,    74,   nil,   nil,   292,   295,   299,   302,   127,
+   312,   317,   282,   nil,   nil,   nil,   nil,   nil,   nil,   304,
+   307,   311,   316,   280,   285,   nil,    80,    83,    86,    88,
+    90,    94,    99,   nil,   nil,   nil,   414,   290,   293,   296,
+   300,   303,   306,   310,   315,   279,   529,   532,   535,   nil ]
+
+racc_reduce_table = [
+  0, 0, :racc_error,
+  2, 96, :_reduce_1,
+  1, 96, :_reduce_none,
+  8, 97, :_reduce_3,
+  2, 98, :_reduce_4,
+  2, 98, :_reduce_5,
+  1, 106, :_reduce_6,
+  2, 106, :_reduce_7,
+  3, 107, :_reduce_8,
+  1, 108, :_reduce_9,
+  3, 108, :_reduce_10,
+  3, 109, :_reduce_11,
+  1, 109, :_reduce_12,
+  0, 99, :_reduce_none,
+  2, 99, :_reduce_14,
+  2, 99, :_reduce_none,
+  2, 100, :_reduce_16,
+  2, 100, :_reduce_none,
+  0, 101, :_reduce_18,
+  2, 101, :_reduce_19,
+  2, 101, :_reduce_none,
+  0, 102, :_reduce_none,
+  2, 102, :_reduce_22,
+  2, 102, :_reduce_none,
+  2, 103, :_reduce_24,
+  2, 103, :_reduce_none,
+  1, 111, :_reduce_26,
+  1, 111, :_reduce_27,
+  5, 112, :_reduce_28,
+  5, 112, :_reduce_29,
+  2, 114, :_reduce_30,
+  1, 116, :_reduce_31,
+  2, 116, :_reduce_32,
+  1, 115, :_reduce_none,
+  1, 115, :_reduce_34,
+  1, 121, :_reduce_35,
+  1, 121, :_reduce_36,
+  1, 121, :_reduce_37,
+  1, 121, :_reduce_38,
+  1, 121, :_reduce_39,
+  1, 121, :_reduce_40,
+  1, 121, :_reduce_41,
+  1, 121, :_reduce_42,
+  1, 121, :_reduce_none,
+  1, 121, :_reduce_none,
+  3, 128, :_reduce_45,
+  4, 122, :_reduce_46,
+  3, 122, :_reduce_none,
+  6, 123, :_reduce_48,
+  2, 130, :_reduce_49,
+  2, 133, :_reduce_50,
+  3, 133, :_reduce_none,
+  2, 133, :_reduce_none,
+  1, 127, :_reduce_53,
+  1, 134, :_reduce_54,
+  1, 134, :_reduce_55,
+  1, 134, :_reduce_56,
+  1, 134, :_reduce_57,
+  1, 134, :_reduce_58,
+  1, 134, :_reduce_59,
+  1, 134, :_reduce_60,
+  1, 134, :_reduce_61,
+  1, 119, :_reduce_none,
+  1, 120, :_reduce_63,
+  2, 120, :_reduce_64,
+  5, 143, :_reduce_65,
+  5, 143, :_reduce_66,
+  5, 143, :_reduce_67,
+  2, 144, :_reduce_68,
+  3, 144, :_reduce_69,
+  1, 145, :_reduce_70,
+  2, 145, :_reduce_71,
+  1, 145, :_reduce_72,
+  0, 131, :_reduce_none,
+  2, 131, :_reduce_74,
+  0, 132, :_reduce_none,
+  2, 132, :_reduce_76,
+  1, 148, :_reduce_none,
+  2, 148, :_reduce_none,
+  3, 149, :_reduce_none,
+  1, 149, :_reduce_none,
+  3, 149, :_reduce_none,
+  0, 104, :_reduce_none,
+  2, 104, :_reduce_none,
+  2, 104, :_reduce_none,
+  2, 105, :_reduce_85,
+  2, 105, :_reduce_none,
+  1, 110, :_reduce_none,
+  1, 152, :_reduce_none,
+  1, 152, :_reduce_none,
+  1, 153, :_reduce_90,
+  2, 153, :_reduce_91,
+  3, 153, :_reduce_92,
+  3, 155, :_reduce_93,
+  1, 156, :_reduce_94,
+  2, 156, :_reduce_none,
+  1, 157, :_reduce_96,
+  1, 157, :_reduce_97,
+  1, 154, :_reduce_98,
+  1, 154, :_reduce_99,
+  1, 160, :_reduce_100,
+  2, 160, :_reduce_101,
+  3, 161, :_reduce_102,
+  1, 162, :_reduce_103,
+  1, 163, :_reduce_104,
+  2, 163, :_reduce_105,
+  3, 164, :_reduce_106,
+  3, 165, :_reduce_107,
+  1, 159, :_reduce_108,
+  2, 159, :_reduce_109,
+  2, 167, :_reduce_110,
+  3, 167, :_reduce_111,
+  1, 168, :_reduce_none,
+  1, 158, :_reduce_113,
+  2, 158, :_reduce_114,
+  3, 169, :_reduce_115,
+  1, 170, :_reduce_116,
+  1, 170, :_reduce_117,
+  1, 170, :_reduce_118,
+  1, 170, :_reduce_119,
+  1, 170, :_reduce_120,
+  1, 166, :_reduce_121,
+  1, 166, :_reduce_122,
+  1, 166, :_reduce_123,
+  1, 166, :_reduce_124,
+  1, 166, :_reduce_125,
+  1, 166, :_reduce_126,
+  1, 166, :_reduce_127,
+  1, 166, :_reduce_128,
+  1, 166, :_reduce_129,
+  1, 166, :_reduce_130,
+  1, 171, :_reduce_none,
+  1, 171, :_reduce_none,
+  1, 171, :_reduce_none,
+  1, 171, :_reduce_none,
+  1, 171, :_reduce_none,
+  1, 171, :_reduce_none,
+  1, 171, :_reduce_none,
+  1, 171, :_reduce_none,
+  1, 171, :_reduce_none,
+  1, 172, :_reduce_none,
+  1, 172, :_reduce_none,
+  1, 172, :_reduce_none,
+  1, 172, :_reduce_none,
+  1, 172, :_reduce_none,
+  1, 172, :_reduce_none,
+  1, 118, :_reduce_146,
+  1, 118, :_reduce_147,
+  1, 175, :_reduce_148,
+  3, 185, :_reduce_none,
+  3, 185, :_reduce_none,
+  3, 185, :_reduce_none,
+  1, 176, :_reduce_152,
+  2, 176, :_reduce_153,
+  2, 176, :_reduce_154,
+  3, 186, :_reduce_none,
+  3, 186, :_reduce_none,
+  3, 186, :_reduce_none,
+  5, 194, :_reduce_none,
+  6, 194, :_reduce_none,
+  6, 194, :_reduce_none,
+  7, 194, :_reduce_none,
+  4, 194, :_reduce_none,
+  4, 194, :_reduce_none,
+  4, 194, :_reduce_none,
+  4, 194, :_reduce_none,
+  3, 194, :_reduce_none,
+  1, 177, :_reduce_167,
+  2, 177, :_reduce_168,
+  2, 177, :_reduce_169,
+  3, 187, :_reduce_none,
+  3, 187, :_reduce_none,
+  3, 187, :_reduce_none,
+  5, 195, :_reduce_none,
+  6, 195, :_reduce_none,
+  6, 195, :_reduce_none,
+  7, 195, :_reduce_none,
+  4, 195, :_reduce_none,
+  4, 195, :_reduce_none,
+  4, 195, :_reduce_none,
+  4, 195, :_reduce_none,
+  3, 195, :_reduce_none,
+  1, 178, :_reduce_182,
+  1, 178, :_reduce_183,
+  3, 188, :_reduce_none,
+  3, 188, :_reduce_none,
+  3, 188, :_reduce_none,
+  1, 179, :_reduce_none,
+  3, 189, :_reduce_none,
+  3, 189, :_reduce_none,
+  3, 189, :_reduce_none,
+  1, 180, :_reduce_191,
+  3, 190, :_reduce_none,
+  3, 190, :_reduce_none,
+  3, 190, :_reduce_none,
+  5, 196, :_reduce_none,
+  6, 196, :_reduce_none,
+  6, 196, :_reduce_none,
+  7, 196, :_reduce_none,
+  4, 196, :_reduce_none,
+  4, 196, :_reduce_none,
+  4, 196, :_reduce_none,
+  4, 196, :_reduce_none,
+  3, 196, :_reduce_none,
+  1, 181, :_reduce_none,
+  3, 191, :_reduce_none,
+  3, 191, :_reduce_none,
+  3, 191, :_reduce_none,
+  5, 197, :_reduce_none,
+  6, 197, :_reduce_none,
+  6, 197, :_reduce_none,
+  7, 197, :_reduce_none,
+  4, 197, :_reduce_none,
+  4, 197, :_reduce_none,
+  4, 197, :_reduce_none,
+  4, 197, :_reduce_none,
+  3, 197, :_reduce_none,
+  1, 182, :_reduce_none,
+  3, 192, :_reduce_none,
+  3, 192, :_reduce_none,
+  3, 192, :_reduce_none,
+  5, 198, :_reduce_none,
+  6, 198, :_reduce_none,
+  6, 198, :_reduce_none,
+  7, 198, :_reduce_none,
+  4, 198, :_reduce_none,
+  4, 198, :_reduce_none,
+  4, 198, :_reduce_none,
+  4, 198, :_reduce_none,
+  3, 198, :_reduce_none,
+  1, 183, :_reduce_230,
+  3, 193, :_reduce_none,
+  3, 193, :_reduce_none,
+  3, 193, :_reduce_none,
+  5, 199, :_reduce_none,
+  6, 199, :_reduce_none,
+  6, 199, :_reduce_none,
+  7, 199, :_reduce_none,
+  4, 199, :_reduce_none,
+  4, 199, :_reduce_none,
+  4, 199, :_reduce_none,
+  4, 199, :_reduce_none,
+  3, 199, :_reduce_none,
+  1, 173, :_reduce_243,
+  3, 174, :_reduce_none,
+  3, 174, :_reduce_none,
+  3, 174, :_reduce_none,
+  1, 184, :_reduce_247,
+  1, 113, :_reduce_none,
+  2, 113, :_reduce_none,
+  3, 200, :_reduce_none,
+  1, 200, :_reduce_none,
+  3, 200, :_reduce_none,
+  1, 151, :_reduce_none,
+  1, 151, :_reduce_none,
+  2, 202, :_reduce_none,
+  2, 202, :_reduce_none,
+  5, 202, :_reduce_none,
+  5, 202, :_reduce_none,
+  2, 202, :_reduce_none,
+  3, 202, :_reduce_none,
+  3, 202, :_reduce_none,
+  3, 202, :_reduce_none,
+  3, 202, :_reduce_none,
+  3, 202, :_reduce_none,
+  3, 202, :_reduce_none,
+  3, 202, :_reduce_none,
+  3, 202, :_reduce_none,
+  3, 202, :_reduce_none,
+  3, 202, :_reduce_none,
+  3, 201, :_reduce_none,
+  1, 201, :_reduce_none,
+  1, 201, :_reduce_none,
+  1, 204, :_reduce_none,
+  1, 204, :_reduce_none,
+  3, 206, :_reduce_none,
+  3, 206, :_reduce_none,
+  3, 206, :_reduce_none,
+  3, 206, :_reduce_none,
+  3, 206, :_reduce_none,
+  3, 205, :_reduce_none,
+  1, 205, :_reduce_none,
+  1, 205, :_reduce_none,
+  1, 205, :_reduce_none,
+  1, 129, :_reduce_none,
+  2, 129, :_reduce_none,
+  1, 203, :_reduce_none,
+  3, 203, :_reduce_none,
+  2, 207, :_reduce_288,
+  1, 207, :_reduce_289,
+  0, 146, :_reduce_290,
+  5, 146, :_reduce_291,
+  1, 208, :_reduce_292,
+  3, 208, :_reduce_293,
+  5, 147, :_reduce_294,
+  1, 209, :_reduce_none,
+  3, 209, :_reduce_none,
+  3, 209, :_reduce_none,
+  3, 209, :_reduce_none,
+  5, 209, :_reduce_none,
+  5, 209, :_reduce_none,
+  5, 209, :_reduce_none,
+  5, 209, :_reduce_none,
+  1, 211, :_reduce_303,
+  1, 211, :_reduce_304,
+  0, 117, :_reduce_none,
+  5, 117, :_reduce_306,
+  2, 117, :_reduce_none,
+  1, 210, :_reduce_none,
+  3, 210, :_reduce_none,
+  1, 212, :_reduce_none,
+  1, 212, :_reduce_none,
+  1, 212, :_reduce_none,
+  1, 135, :_reduce_none,
+  3, 135, :_reduce_none,
+  3, 135, :_reduce_none,
+  1, 213, :_reduce_none,
+  1, 213, :_reduce_none,
+  1, 213, :_reduce_none,
+  1, 136, :_reduce_none,
+  3, 136, :_reduce_none,
+  3, 136, :_reduce_none,
+  1, 214, :_reduce_none,
+  1, 214, :_reduce_none,
+  1, 214, :_reduce_none,
+  1, 137, :_reduce_none,
+  3, 137, :_reduce_none,
+  3, 137, :_reduce_none,
+  1, 215, :_reduce_none,
+  1, 215, :_reduce_none,
+  1, 215, :_reduce_none,
+  1, 138, :_reduce_none,
+  3, 138, :_reduce_none,
+  3, 138, :_reduce_none,
+  1, 216, :_reduce_none,
+  1, 216, :_reduce_none,
+  1, 216, :_reduce_none,
+  1, 139, :_reduce_none,
+  3, 139, :_reduce_none,
+  3, 139, :_reduce_none,
+  1, 217, :_reduce_none,
+  3, 217, :_reduce_none,
+  1, 217, :_reduce_none,
+  1, 217, :_reduce_none,
+  1, 140, :_reduce_none,
+  3, 140, :_reduce_none,
+  3, 140, :_reduce_none,
+  1, 219, :_reduce_none,
+  1, 219, :_reduce_none,
+  3, 219, :_reduce_none,
+  1, 141, :_reduce_none,
+  3, 141, :_reduce_none,
+  3, 141, :_reduce_none,
+  1, 220, :_reduce_353,
+  1, 220, :_reduce_354,
+  3, 220, :_reduce_355,
+  3, 220, :_reduce_356,
+  1, 142, :_reduce_357,
+  3, 142, :_reduce_358,
+  3, 142, :_reduce_359,
+  1, 126, :_reduce_none,
+  3, 126, :_reduce_none,
+  3, 126, :_reduce_none,
+  1, 221, :_reduce_none,
+  3, 221, :_reduce_none,
+  3, 222, :_reduce_365,
+  1, 125, :_reduce_366,
+  1, 125, :_reduce_367,
+  3, 223, :_reduce_368,
+  0, 224, :_reduce_none,
+  1, 224, :_reduce_none,
+  2, 224, :_reduce_none,
+  1, 124, :_reduce_372,
+  1, 150, :_reduce_373,
+  1, 150, :_reduce_374,
+  1, 218, :_reduce_375 ]
+
+racc_reduce_n = 376
+
+racc_shift_n = 633
+
+racc_token_table = {
+  false => 0,
+  :error => 1,
+  :UMINUS => 2,
+  :UPLUS => 3,
+  "*" => 4,
+  "/" => 5,
+  "+" => 6,
+  "-" => 7,
+  :SYM_EQ => 8,
+  :SYM_NE => 9,
+  :SYM_LT => 10,
+  :SYM_START_DBLOCK => 11,
+  :SYM_START_CBLOCK => 12,
+  :SYM_GT => 13,
+  :SYM_END_CBLOCK => 14,
+  :SYM_END_DBLOCK => 15,
+  :SYM_LE => 16,
+  :SYM_GE => 17,
+  :EOF => 18,
+  :V_ARCHETYPE_ID => 19,
+  :SYM_ARCHETYPE => 20,
+  :Left_parenthesis_code => 21,
+  :Right_parenthesis_code => 22,
+  :Semicolon_code => 23,
+  :SYM_ADL_VERSION => 24,
+  :V_VERSION_STRING => 25,
+  :SYM_IS_CONTROLLED => 26,
+  :SYM_SPECIALIZE => 27,
+  :SYM_CONCEPT => 28,
+  :V_LOCAL_TERM_CODE_REF => 29,
+  :SYM_LANGUAGE => 30,
+  :SYM_DESCRIPTION => 31,
+  :SYM_DEFINITION => 32,
+  :c_complx_object_head => 33,
+  :SYM_MATCHES => 34,
+  :START_REGEXP_BLOCK => 35,
+  :REGEXP_BODY => 36,
+  :END_REGEXP_BLOCK => 37,
+  :ERR_C_DOMAIN_TYPE => 38,
+  :START_V_C_DOMAIN_TYPE_BLOCK => 39,
+  :END_V_C_DOMAIN_TYPE_BLOCK => 40,
+  :SYM_USE_NODE => 41,
+  :SYM_ALLOW_ARCHETYPE => 42,
+  :Star_code => 43,
+  :V_ATTRIBUTE_IDENTIFIER => 44,
+  :SYM_INCLUDE => 45,
+  :SYM_EXCLUDE => 46,
+  ":" => 47,
+  :SYM_INVARIANT => 48,
+  :V_ASSERTION_TEXT => 49,
+  :SYM_ONTOLOGY => 50,
+  :Left_bracket_code => 51,
+  :Right_bracket_code => 52,
+  :V_TYPE_IDENTIFIER => 53,
+  :V_GENERIC_TYPE_IDENTIFIER => 54,
+  :V_STRING => 55,
+  :Comma_code => 56,
+  :SYM_LIST_CONTINUE => 57,
+  :V_INTEGER => 58,
+  :Plus_code => 59,
+  :Minus_code => 60,
+  :SYM_INTERVAL_DELIM => 61,
+  :SYM_ELLIPSIS => 62,
+  :V_REAL => 63,
+  :SYM_TRUE => 64,
+  :SYM_FALSE => 65,
+  :V_CHARACTER => 66,
+  :V_ISO8601_EXTENDED_DATE => 67,
+  :V_ISO8601_EXTENDED_TIME => 68,
+  :V_ISO8601_EXTENDED_DATE_TIME => 69,
+  :V_ISO8601_DURATION => 70,
+  :V_QUALIFIED_TERM_CODE_REF => 71,
+  :V_URI => 72,
+  :SYM_EXISTS => 73,
+  :SYM_NOT => 74,
+  "=" => 75,
+  :SYM_AND => 76,
+  :SYM_OR => 77,
+  :SYM_XOR => 78,
+  :SYM_IMPLIES => 79,
+  :Slash_code => 80,
+  "^" => 81,
+  :SYM_EXISTENCE => 82,
+  :SYM_CARDINALITY => 83,
+  :SYM_ORDERED => 84,
+  :SYM_UNORDERED => 85,
+  :SYM_UNIQUE => 86,
+  :SYM_OCCURRENCES => 87,
+  :V_ISO8601_DATE_CONSTRAINT_PATTERN => 88,
+  :V_ISO8601_TIME_CONSTRAINT_PATTERN => 89,
+  :V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN => 90,
+  :START_TERM_CODE_CONSTRAINT => 91,
+  :END_TERM_CODE_CONSTRAINT => 92,
+  :TERM_CODE => 93,
+  :V_ISO8601_DURATION_CONSTRAINT_PATTERN => 94 }
+
+racc_nt_base = 95
+
+racc_use_result_var = true
+
+Racc_arg = [
+  racc_action_table,
+  racc_action_check,
+  racc_action_default,
+  racc_action_pointer,
+  racc_goto_table,
+  racc_goto_check,
+  racc_goto_default,
+  racc_goto_pointer,
+  racc_nt_base,
+  racc_reduce_table,
+  racc_token_table,
+  racc_shift_n,
+  racc_reduce_n,
+  racc_use_result_var ]
+
+Racc_token_to_s_table = [
+  "$end",
+  "error",
+  "UMINUS",
+  "UPLUS",
+  "\"*\"",
+  "\"/\"",
+  "\"+\"",
+  "\"-\"",
+  "SYM_EQ",
+  "SYM_NE",
+  "SYM_LT",
+  "SYM_START_DBLOCK",
+  "SYM_START_CBLOCK",
+  "SYM_GT",
+  "SYM_END_CBLOCK",
+  "SYM_END_DBLOCK",
+  "SYM_LE",
+  "SYM_GE",
+  "EOF",
+  "V_ARCHETYPE_ID",
+  "SYM_ARCHETYPE",
+  "Left_parenthesis_code",
+  "Right_parenthesis_code",
+  "Semicolon_code",
+  "SYM_ADL_VERSION",
+  "V_VERSION_STRING",
+  "SYM_IS_CONTROLLED",
+  "SYM_SPECIALIZE",
+  "SYM_CONCEPT",
+  "V_LOCAL_TERM_CODE_REF",
+  "SYM_LANGUAGE",
+  "SYM_DESCRIPTION",
+  "SYM_DEFINITION",
+  "c_complx_object_head",
+  "SYM_MATCHES",
+  "START_REGEXP_BLOCK",
+  "REGEXP_BODY",
+  "END_REGEXP_BLOCK",
+  "ERR_C_DOMAIN_TYPE",
+  "START_V_C_DOMAIN_TYPE_BLOCK",
+  "END_V_C_DOMAIN_TYPE_BLOCK",
+  "SYM_USE_NODE",
+  "SYM_ALLOW_ARCHETYPE",
+  "Star_code",
+  "V_ATTRIBUTE_IDENTIFIER",
+  "SYM_INCLUDE",
+  "SYM_EXCLUDE",
+  "\":\"",
+  "SYM_INVARIANT",
+  "V_ASSERTION_TEXT",
+  "SYM_ONTOLOGY",
+  "Left_bracket_code",
+  "Right_bracket_code",
+  "V_TYPE_IDENTIFIER",
+  "V_GENERIC_TYPE_IDENTIFIER",
+  "V_STRING",
+  "Comma_code",
+  "SYM_LIST_CONTINUE",
+  "V_INTEGER",
+  "Plus_code",
+  "Minus_code",
+  "SYM_INTERVAL_DELIM",
+  "SYM_ELLIPSIS",
+  "V_REAL",
+  "SYM_TRUE",
+  "SYM_FALSE",
+  "V_CHARACTER",
+  "V_ISO8601_EXTENDED_DATE",
+  "V_ISO8601_EXTENDED_TIME",
+  "V_ISO8601_EXTENDED_DATE_TIME",
+  "V_ISO8601_DURATION",
+  "V_QUALIFIED_TERM_CODE_REF",
+  "V_URI",
+  "SYM_EXISTS",
+  "SYM_NOT",
+  "\"=\"",
+  "SYM_AND",
+  "SYM_OR",
+  "SYM_XOR",
+  "SYM_IMPLIES",
+  "Slash_code",
+  "\"^\"",
+  "SYM_EXISTENCE",
+  "SYM_CARDINALITY",
+  "SYM_ORDERED",
+  "SYM_UNORDERED",
+  "SYM_UNIQUE",
+  "SYM_OCCURRENCES",
+  "V_ISO8601_DATE_CONSTRAINT_PATTERN",
+  "V_ISO8601_TIME_CONSTRAINT_PATTERN",
+  "V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN",
+  "START_TERM_CODE_CONSTRAINT",
+  "END_TERM_CODE_CONSTRAINT",
+  "TERM_CODE",
+  "V_ISO8601_DURATION_CONSTRAINT_PATTERN",
+  "$start",
+  "input",
+  "archetype",
+  "arch_identification",
+  "arch_specialisation",
+  "arch_concept",
+  "arch_language",
+  "arch_description",
+  "arch_definition",
+  "arch_invariant",
+  "arch_ontology",
+  "arch_head",
+  "arch_meta_data",
+  "arch_meta_data_items",
+  "arch_meta_data_item",
+  "dadl_section",
+  "cadl_section",
+  "c_complex_object",
+  "assertions",
+  "c_complex_object_head",
+  "c_complex_object_body",
+  "c_complex_object_id",
+  "c_occurrences",
+  "type_identifier",
+  "c_any",
+  "c_attributes",
+  "c_object",
+  "archetype_internal_ref",
+  "archetype_slot",
+  "constraint_ref",
+  "c_code_phrase",
+  "c_ordinal",
+  "c_primitive_object",
+  "v_c_domain_type",
+  "absolute_path",
+  "c_archetype_slot_head",
+  "c_includes",
+  "c_excludes",
+  "c_archetype_slot_id",
+  "c_primitive",
+  "c_integer",
+  "c_real",
+  "c_date",
+  "c_time",
+  "c_date_time",
+  "c_duration",
+  "c_string",
+  "c_boolean",
+  "c_attribute",
+  "c_attr_head",
+  "c_attr_values",
+  "c_existence",
+  "c_cardinality",
+  "invariants",
+  "invariant",
+  "any_identifier",
+  "boolean_expression",
+  "dadl_input",
+  "attr_vals",
+  "complex_object_block",
+  "attr_val",
+  "attr_id",
+  "object_block",
+  "primitive_object_block",
+  "single_attr_object_block",
+  "multiple_attr_object_block",
+  "untyped_multiple_attr_object_block",
+  "multiple_attr_object_block_head",
+  "keyed_objects",
+  "keyed_object",
+  "object_key",
+  "simple_value",
+  "untyped_single_attr_object_block",
+  "single_attr_object_complex_head",
+  "untyped_primitive_object_block",
+  "primitive_object_value",
+  "simple_list_value",
+  "simple_interval_value",
+  "term_code",
+  "term_code_list_value",
+  "string_value",
+  "integer_value",
+  "real_value",
+  "boolean_value",
+  "character_value",
+  "date_value",
+  "time_value",
+  "date_time_value",
+  "duration_value",
+  "uri_value",
+  "string_list_value",
+  "integer_list_value",
+  "real_list_value",
+  "boolean_list_value",
+  "character_list_value",
+  "date_list_value",
+  "time_list_value",
+  "date_time_list_value",
+  "duration_list_value",
+  "integer_interval_value",
+  "real_interval_value",
+  "date_interval_value",
+  "time_interval_value",
+  "date_time_interval_value",
+  "duration_interval_value",
+  "assertion",
+  "boolean_leaf",
+  "boolean_node",
+  "relative_path",
+  "arithmetic_expression",
+  "arithmetic_leaf",
+  "arithmetic_node",
+  "path_segment",
+  "existence_spec",
+  "cardinality_spec",
+  "occurrence_spec",
+  "cardinality_limit_value",
+  "c_integer_spec",
+  "c_real_spec",
+  "c_date_constraint",
+  "c_time_constraint",
+  "c_date_time_constraint",
+  "c_duration_constraint",
+  "duration_pattern",
+  "c_string_spec",
+  "c_boolean_spec",
+  "c_ordinal_spec",
+  "ordinal",
+  "term_code_constraint_section",
+  "term_code_body" ]
+
+Racc_debug_parser = false
+
+##### State transition tables end #####
+
+# reduce 0 omitted
+
+module_eval(<<'.,.,', 'parser.y', 30)
+  def _reduce_1(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+# reduce 2 omitted
+
+module_eval(<<'.,.,', 'parser.y', 36)
+  def _reduce_3(val, _values, result)
+        assert_at(__FILE__,__LINE__) do
+      val[4].instance_of?(OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION) and val[5].instance_of?(OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT) and val[7].instance_of?(OpenEHR::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY) 
+    end
+    
+    archetype_id = val[0][:archetype_id]
+    parent_archtype_id = val[1][:parent_archtype_id] if val[1]
+    adl_version = val[0][:arch_head][:arch_meta_data][:adl_version]
+    concept = val[2]
+    language = val[3][:arch_language]
+    archetype = OpenEHR::AM::Archetype::ARCHETYPE.create(
+                                                         :archetype_id => archetype_id,
+                                                         :parent_archtype_id => parent_archtype_id,
+                                                         :adl_version => adl_version,
+                                                         :concept => concept,
+                                                         :description => val[4],
+                                                         :definition => val[5],
+                                                         :ontology => val[7]
+                                                         ) do |archetype|
+      archetype.original_language = language
+    end
+    @@logger.debug("#{__FILE__}:#{__LINE__}: archetype = #{archetype.to_yaml} at #{@filename}:#{@lineno}")
+    result = archetype
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 63)
+  def _reduce_4(val, _values, result)
+        result = {:arch_head => val[0], :archetype_id => val[1] }
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 67)
+  def _reduce_5(val, _values, result)
+        raise
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 72)
+  def _reduce_6(val, _values, result)
+        result = {:arch_meta_data => nil }
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 76)
+  def _reduce_7(val, _values, result)
+        result = val[1]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 81)
+  def _reduce_8(val, _values, result)
+        result = {:arch_meta_data => val[1] }
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 86)
+  def _reduce_9(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 90)
+  def _reduce_10(val, _values, result)
+        result = val[0].merge(val[2])
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 96)
+  def _reduce_11(val, _values, result)
+        result = {:adl_version => val[2], :is_controlled => false }
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 100)
+  def _reduce_12(val, _values, result)
+        result = {:is_controlled => true }
+  
+    result
+  end
+.,.,
+
+# reduce 13 omitted
+
+module_eval(<<'.,.,', 'parser.y', 108)
+  def _reduce_14(val, _values, result)
+        result = {:parent_archtype_id => val[1]}
+  
+    result
+  end
+.,.,
+
+# reduce 15 omitted
+
+module_eval(<<'.,.,', 'parser.y', 114)
+  def _reduce_16(val, _values, result)
+        result = {:arch_concept => val[1] }
+  
+    result
+  end
+.,.,
+
+# reduce 17 omitted
+
+module_eval(<<'.,.,', 'parser.y', 124)
+  def _reduce_18(val, _values, result)
+        result = {:arch_language => nil}
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 128)
+  def _reduce_19(val, _values, result)
+        result = {:arch_language => val[1]}
+  
+    result
+  end
+.,.,
+
+# reduce 20 omitted
+
+# reduce 21 omitted
+
+module_eval(<<'.,.,', 'parser.y', 139)
+  def _reduce_22(val, _values, result)
+        result = OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION.new(:details => val[1])
+  
+    result
+  end
+.,.,
+
+# reduce 23 omitted
+
+module_eval(<<'.,.,', 'parser.y', 147)
+  def _reduce_24(val, _values, result)
+        result = val[1]
+  
+    result
+  end
+.,.,
+
+# reduce 25 omitted
+
+module_eval(<<'.,.,', 'parser.y', 155)
+  def _reduce_26(val, _values, result)
+        assert_at(__FILE__,__LINE__){val[0].instance_of?(OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT)}
+    @@logger.debug("#{__FILE__}:#{__LINE__}: c_complex_object = #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 161)
+  def _reduce_27(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 168)
+  def _reduce_28(val, _values, result)
+        result = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.create(:attributes => val[3]) do |c_complex_object|
+      c_complex_object.node_id = val[0][:c_complex_object_id][:local_term_code_ref]
+      c_complex_object.rm_type_name = val[0][:c_complex_object_id][:type_identifier]
+      c_complex_object.occurrences = val[0][:c_occurrences]
+    end
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 176)
+  def _reduce_29(val, _values, result)
+        result = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.create(:attributes => val[3]) do |c_complex_object|
+      c_complex_object.node_id = val[0][:c_complex_object_id][:local_term_code_ref]
+      c_complex_object.rm_type_name = val[0][:c_complex_object_id][:type_identifier]
+      c_complex_object.occurrences = val[0][:c_occurrences]
+    end
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 187)
+  def _reduce_30(val, _values, result)
+        result = {:c_complex_object_id => val[0], :c_occurrences => val[1]}
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 192)
+  def _reduce_31(val, _values, result)
+        result = {:type_identifier => val[0]}
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 196)
+  def _reduce_32(val, _values, result)
+        result = {:type_identifier => val[0], :local_term_code_ref => val[1]}
+  
+    result
+  end
+.,.,
+
+# reduce 33 omitted
+
+module_eval(<<'.,.,', 'parser.y', 202)
+  def _reduce_34(val, _values, result)
+        result = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.new(:attributes => val[0])
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 220)
+  def _reduce_35(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}: c_complex_object = #{val[0].inspect} at #{@filename}:#{@lineno}")
+    result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 225)
+  def _reduce_36(val, _values, result)
+        result = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_INTERNAL_REF.create do |archetype_internal_ref|
+      archetype_internal_ref.target_path = val[0][:absolute_path]
+      archetype_internal_ref.rm_type_name = val[0][:type_identifier]
+      archetype_internal_ref.occurrences = val[0][:c_occurrences]
+    end
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 233)
+  def _reduce_37(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 237)
+  def _reduce_38(val, _values, result)
+        result = OpenEHR::AM::Archetype::Constraint_Model::CONSTRAINT_REF.create do |constraint_ref|
+      constraint_ref.reference = val[0]
+    end
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 243)
+  def _reduce_39(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 247)
+  def _reduce_40(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 251)
+  def _reduce_41(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 255)
+  def _reduce_42(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+# reduce 43 omitted
+
+# reduce 44 omitted
+
+module_eval(<<'.,.,', 'parser.y', 271)
+  def _reduce_45(val, _values, result)
+        result = val[1]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 277)
+  def _reduce_46(val, _values, result)
+        result = {:type_identifier => val[1], :c_occurrences => val[2], :absolute_path => val[3] }
+  
+    result
+  end
+.,.,
+
+# reduce 47 omitted
+
+module_eval(<<'.,.,', 'parser.y', 284)
+  def _reduce_48(val, _values, result)
+        result = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_SLOT.create do |archetype_slot|
+      archetype_slot.includes = val[3]
+      archetype_slot.excludes = val[4]
+      archetype_slot.rm_type_name = val[0][:c_archetype_slot_id]
+      archetype_slot.occurrences = val[0][:c_occurrences]
+    end
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 293)
+  def _reduce_49(val, _values, result)
+        result = {:c_archetype_slot_id => val[0],:c_occurrences => val[1]}
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 298)
+  def _reduce_50(val, _values, result)
+        result = val[1]
+  
+    result
+  end
+.,.,
+
+# reduce 51 omitted
+
+# reduce 52 omitted
+
+module_eval(<<'.,.,', 'parser.y', 306)
+  def _reduce_53(val, _values, result)
+        assert_at(__FILE__,__LINE__){val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_PRIMITIVE)}
+    result = OpenEHR::AM::Archetype::Constraint_Model::C_PRIMITIVE_OBJECT.create do |c_primitive_object|
+      c_primitive_object.item = val[0]
+    end
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 314)
+  def _reduce_54(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}: c_integer = #{val[0]} at #{@filename}:#{@lineno}")
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_INTEGER.create do |c_integer|
+      c_integer.list
+      c_integer.range
+      c_integer.assumed_value
+    end
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 323)
+  def _reduce_55(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}: c_real = #{val[0]} at #{@filename}:#{@lineno}")
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_REAL.new
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 328)
+  def _reduce_56(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}: c_date = #{val[0]} at #{@filename}:#{@lineno}")
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE.new
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 333)
+  def _reduce_57(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}: c_time = #{val[0]} at #{@filename}:#{@lineno}")
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_TIME.new
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 338)
+  def _reduce_58(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}: c_date_time = #{val[0]} at #{@filename}:#{@lineno}")
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME.new
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 343)
+  def _reduce_59(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}: c_duration = #{val[0]} at #{@filename}:#{@lineno}")
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DURATION.new
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 348)
+  def _reduce_60(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}: c_string = #{val[0]} at #{@filename}:#{@lineno}")
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_STRING.new
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 353)
+  def _reduce_61(val, _values, result)
+        assert_at(__FILE__,__LINE__){val[0].instance_of?(OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN)}
+    @@logger.debug("#{__FILE__}:#{__LINE__}: c_boolean = #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  
+    result
+  end
+.,.,
+
+# reduce 62 omitted
+
+module_eval(<<'.,.,', 'parser.y', 365)
+  def _reduce_63(val, _values, result)
+        result = [val[0]]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 369)
+  def _reduce_64(val, _values, result)
+        result = (val[0] << val[1])
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 375)
+  def _reduce_65(val, _values, result)
+        assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE)}
+    c_attribute = val[0]
+    c_attribute.children = val[3]
+    result = c_attribute
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 382)
+  def _reduce_66(val, _values, result)
+        assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE)}
+    result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 387)
+  def _reduce_67(val, _values, result)
+        assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE)}
+    result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 394)
+  def _reduce_68(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER = #{val[0]}, c_existence = #{val[1]} at #{@filename}")
+    result = OpenEHR::AM::Archetype::Constraint_Model::C_SINGLE_ATTRIBUTE.new(
+                                                                              :rm_attribute_name => val[0],
+                                                                              :existence => val[1]
+                                                                              )
+
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 403)
+  def _reduce_69(val, _values, result)
+        assert_at(__FILE__,__LINE__){ val[2].instance_of?(OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY) }
+    @@logger.debug("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER: #{val[0]}, c_existence = #{val[1]}, c_cardinality = #{val[2]} at #{@filename}") 
+    result = OpenEHR::AM::Archetype::Constraint_Model::C_MULTIPLE_ATTRIBUTE.new(
+                                                                                :rm_attribute_name => val[0],
+                                                                                :existence => val[1],
+                                                                                :cardinality => val[2]
+                                                                                )
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 414)
+  def _reduce_70(val, _values, result)
+        result = Array[val[0]]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 418)
+  def _reduce_71(val, _values, result)
+        result = (val[0] << val[1])
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 422)
+  def _reduce_72(val, _values, result)
+        result = Array[val[0]]
+  
+    result
+  end
+.,.,
+
+# reduce 73 omitted
+
+module_eval(<<'.,.,', 'parser.y', 430)
+  def _reduce_74(val, _values, result)
+        result = val[1]
+
+    result
+  end
+.,.,
+
+# reduce 75 omitted
+
+module_eval(<<'.,.,', 'parser.y', 438)
+  def _reduce_76(val, _values, result)
+        result = val[1]
+
+    result
+  end
+.,.,
+
+# reduce 77 omitted
+
+# reduce 78 omitted
+
+# reduce 79 omitted
+
+# reduce 80 omitted
+
+# reduce 81 omitted
+
+# reduce 82 omitted
+
+# reduce 83 omitted
+
+# reduce 84 omitted
+
+module_eval(<<'.,.,', 'parser.y', 458)
+  def _reduce_85(val, _values, result)
+        dadl_section = val[1]
+    result = OpenEHR::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY.new
+  
+    result
+  end
+.,.,
+
+# reduce 86 omitted
+
+# reduce 87 omitted
+
+# reduce 88 omitted
+
+# reduce 89 omitted
+
+module_eval(<<'.,.,', 'parser.y', 473)
+  def _reduce_90(val, _values, result)
+        result = Array[val[0]]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 477)
+  def _reduce_91(val, _values, result)
+        result = (val[0] << val[1])
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 481)
+  def _reduce_92(val, _values, result)
+        result = (val[0] << val[2])
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 486)
+  def _reduce_93(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}: attr_id = #{val[0]} at #{@filename}:#{@lineno}")
+    result = {:attr_id => val[0], :object_block => val[2]}
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 492)
+  def _reduce_94(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  
+    result
+  end
+.,.,
+
+# reduce 95 omitted
+
+module_eval(<<'.,.,', 'parser.y', 499)
+  def _reduce_96(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 503)
+  def _reduce_97(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 508)
+  def _reduce_98(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 512)
+  def _reduce_99(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 517)
+  def _reduce_100(val, _values, result)
+        result = {:untyped_multiple_attr_object_block => val[0]}
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 521)
+  def _reduce_101(val, _values, result)
+        result = {:type_identifier => val[0], :untyped_multiple_attr_object_block => val[1]}
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 526)
+  def _reduce_102(val, _values, result)
+        result = {:multiple_attr_object_block_head => val[0], :keyed_objects => val[1]}
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 531)
+  def _reduce_103(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 536)
+  def _reduce_104(val, _values, result)
+        result = Array[val[0]]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 540)
+  def _reduce_105(val, _values, result)
+        result = (val[0] << val[1])
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 545)
+  def _reduce_106(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}: keyed_object = #{val[0]} at #{@filename}:#{@lineno}")
+    result = {:object_key => val[0], :object_block => val[2]}
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 551)
+  def _reduce_107(val, _values, result)
+        @@logger.debug("object_key: [#{val[1]}] at #{@filename}:#{@lineno}")
+    result = val[1]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 557)
+  def _reduce_108(val, _values, result)
+        result = {:untyped_single_attr_object_block => val[0]}
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 561)
+  def _reduce_109(val, _values, result)
+        result = {:type_identifier => val[0], :untyped_single_attr_object_block => val[1]}
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 566)
+  def _reduce_110(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}: single_attr_object_complex_head = #{val[0]} at #{@filename}:#{@lineno}")
+    result = {:single_attr_object_complex_head => val[0]}
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 571)
+  def _reduce_111(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}: attr_vals = #{val[1]} at #{@filename}:#{@lineno}")
+    result = {:single_attr_object_complex_head => val[0], :attr_vals => val[1]}
+  
+    result
+  end
+.,.,
+
+# reduce 112 omitted
+
+module_eval(<<'.,.,', 'parser.y', 577)
+  def _reduce_113(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}: untyped_primitive_object_block = #{val[0]} at #{@filename}:#{@lineno}")
+    result = {:untyped_primitive_object_block => val[0]}
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 582)
+  def _reduce_114(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}: type_identifier = #{val[0]}, untyped_primitive_object_block = #{val[1]} at #{@filename}:#{@lineno}")
+    result = {:type_identifier => val[0], :untyped_primitive_object_block => val[1]}
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 587)
+  def _reduce_115(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}: primitive_object_block = <#{val[1]}> at #{@filename}:#{@lineno}")
+    result = val[1]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 592)
+  def _reduce_116(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 596)
+  def _reduce_117(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 600)
+  def _reduce_118(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 604)
+  def _reduce_119(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 608)
+  def _reduce_120(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 612)
+  def _reduce_121(val, _values, result)
+        @@logger.debug("string_value: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 617)
+  def _reduce_122(val, _values, result)
+        @@logger.debug("integer_value: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 622)
+  def _reduce_123(val, _values, result)
+        @@logger.debug("real_value: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 627)
+  def _reduce_124(val, _values, result)
+        @@logger.debug("boolean_value: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 632)
+  def _reduce_125(val, _values, result)
+        @@logger.debug("character_value: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 637)
+  def _reduce_126(val, _values, result)
+        @@logger.debug("date_value: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 642)
+  def _reduce_127(val, _values, result)
+        @@logger.debug("time_value: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 647)
+  def _reduce_128(val, _values, result)
+        @@logger.debug("date_time_value: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 652)
+  def _reduce_129(val, _values, result)
+        @@logger.debug("duration_value: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 657)
+  def _reduce_130(val, _values, result)
+        @@logger.debug("uri_value: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  
+    result
+  end
+.,.,
+
+# reduce 131 omitted
+
+# reduce 132 omitted
+
+# reduce 133 omitted
+
+# reduce 134 omitted
+
+# reduce 135 omitted
+
+# reduce 136 omitted
+
+# reduce 137 omitted
+
+# reduce 138 omitted
+
+# reduce 139 omitted
+
+# reduce 140 omitted
+
+# reduce 141 omitted
+
+# reduce 142 omitted
+
+# reduce 143 omitted
+
+# reduce 144 omitted
+
+# reduce 145 omitted
+
+module_eval(<<'.,.,', 'parser.y', 680)
+  def _reduce_146(val, _values, result)
+        @@logger.debug("V_TYPE_IDENTIFIER: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 685)
+  def _reduce_147(val, _values, result)
+        @@logger.debug("V_GENERIC_TYPE_IDENTIFIER: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 691)
+  def _reduce_148(val, _values, result)
+        @@logger.debug("V_STRING: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  
+    result
+  end
+.,.,
+
+# reduce 149 omitted
+
+# reduce 150 omitted
+
+# reduce 151 omitted
+
+module_eval(<<'.,.,', 'parser.y', 701)
+  def _reduce_152(val, _values, result)
+        begin
+      integer = Integer(val[0])
+    rescue
+      raise
+    end
+    result = integer
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 710)
+  def _reduce_153(val, _values, result)
+        begin
+      integer = Integer(val[0])
+    rescue
+      raise
+    end
+    result = integer
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 719)
+  def _reduce_154(val, _values, result)
+        begin
+      integer = Integer(val[0])
+    rescue
+      raise
+    end
+    result = - integer
+  
+    result
+  end
+.,.,
+
+# reduce 155 omitted
+
+# reduce 156 omitted
+
+# reduce 157 omitted
+
+# reduce 158 omitted
+
+# reduce 159 omitted
+
+# reduce 160 omitted
+
+# reduce 161 omitted
+
+# reduce 162 omitted
+
+# reduce 163 omitted
+
+# reduce 164 omitted
+
+# reduce 165 omitted
+
+# reduce 166 omitted
+
+module_eval(<<'.,.,', 'parser.y', 745)
+  def _reduce_167(val, _values, result)
+        begin
+      real = Float(val[0])
+    rescue
+      raise
+    end
+    result = real
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 754)
+  def _reduce_168(val, _values, result)
+        begin
+      real = Float(val[1])
+    rescue
+      raise
+    end
+    result = real
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 763)
+  def _reduce_169(val, _values, result)
+        begin
+      real = Float(val[1])
+    rescue
+      raise
+    end
+    result = - real
+  
+    result
+  end
+.,.,
+
+# reduce 170 omitted
+
+# reduce 171 omitted
+
+# reduce 172 omitted
+
+# reduce 173 omitted
+
+# reduce 174 omitted
+
+# reduce 175 omitted
+
+# reduce 176 omitted
+
+# reduce 177 omitted
+
+# reduce 178 omitted
+
+# reduce 179 omitted
+
+# reduce 180 omitted
+
+# reduce 181 omitted
+
+module_eval(<<'.,.,', 'parser.y', 788)
+  def _reduce_182(val, _values, result)
+        result = true
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 792)
+  def _reduce_183(val, _values, result)
+        result = false
+  
+    result
+  end
+.,.,
+
+# reduce 184 omitted
+
+# reduce 185 omitted
+
+# reduce 186 omitted
+
+# reduce 187 omitted
+
+# reduce 188 omitted
+
+# reduce 189 omitted
+
+# reduce 190 omitted
+
+module_eval(<<'.,.,', 'parser.y', 807)
+  def _reduce_191(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+# reduce 192 omitted
+
+# reduce 193 omitted
+
+# reduce 194 omitted
+
+# reduce 195 omitted
+
+# reduce 196 omitted
+
+# reduce 197 omitted
+
+# reduce 198 omitted
+
+# reduce 199 omitted
+
+# reduce 200 omitted
+
+# reduce 201 omitted
+
+# reduce 202 omitted
+
+# reduce 203 omitted
+
+# reduce 204 omitted
+
+# reduce 205 omitted
+
+# reduce 206 omitted
+
+# reduce 207 omitted
+
+# reduce 208 omitted
+
+# reduce 209 omitted
+
+# reduce 210 omitted
+
+# reduce 211 omitted
+
+# reduce 212 omitted
+
+# reduce 213 omitted
+
+# reduce 214 omitted
+
+# reduce 215 omitted
+
+# reduce 216 omitted
+
+# reduce 217 omitted
+
+# reduce 218 omitted
+
+# reduce 219 omitted
+
+# reduce 220 omitted
+
+# reduce 221 omitted
+
+# reduce 222 omitted
+
+# reduce 223 omitted
+
+# reduce 224 omitted
+
+# reduce 225 omitted
+
+# reduce 226 omitted
+
+# reduce 227 omitted
+
+# reduce 228 omitted
+
+# reduce 229 omitted
+
+module_eval(<<'.,.,', 'parser.y', 858)
+  def _reduce_230(val, _values, result)
+        @@logger.debug("V_ISO8601_DURATION: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  
+    result
+  end
+.,.,
+
+# reduce 231 omitted
+
+# reduce 232 omitted
+
+# reduce 233 omitted
+
+# reduce 234 omitted
+
+# reduce 235 omitted
+
+# reduce 236 omitted
+
+# reduce 237 omitted
+
+# reduce 238 omitted
+
+# reduce 239 omitted
+
+# reduce 240 omitted
+
+# reduce 241 omitted
+
+# reduce 242 omitted
+
+module_eval(<<'.,.,', 'parser.y', 878)
+  def _reduce_243(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}: V_QUALIFIED_TERM_CODE_REF = #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  
+    result
+  end
+.,.,
+
+# reduce 244 omitted
+
+# reduce 245 omitted
+
+# reduce 246 omitted
+
+module_eval(<<'.,.,', 'parser.y', 888)
+  def _reduce_247(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}: V_URI = #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  
+    result
+  end
+.,.,
+
+# reduce 248 omitted
+
+# reduce 249 omitted
+
+# reduce 250 omitted
+
+# reduce 251 omitted
+
+# reduce 252 omitted
+
+# reduce 253 omitted
+
+# reduce 254 omitted
+
+# reduce 255 omitted
+
+# reduce 256 omitted
+
+# reduce 257 omitted
+
+# reduce 258 omitted
+
+# reduce 259 omitted
+
+# reduce 260 omitted
+
+# reduce 261 omitted
+
+# reduce 262 omitted
+
+# reduce 263 omitted
+
+# reduce 264 omitted
+
+# reduce 265 omitted
+
+# reduce 266 omitted
+
+# reduce 267 omitted
+
+# reduce 268 omitted
+
+# reduce 269 omitted
+
+# reduce 270 omitted
+
+# reduce 271 omitted
+
+# reduce 272 omitted
+
+# reduce 273 omitted
+
+# reduce 274 omitted
+
+# reduce 275 omitted
+
+# reduce 276 omitted
+
+# reduce 277 omitted
+
+# reduce 278 omitted
+
+# reduce 279 omitted
+
+# reduce 280 omitted
+
+# reduce 281 omitted
+
+# reduce 282 omitted
+
+# reduce 283 omitted
+
+# reduce 284 omitted
+
+# reduce 285 omitted
+
+# reduce 286 omitted
+
+# reduce 287 omitted
+
+module_eval(<<'.,.,', 'parser.y', 958)
+  def _reduce_288(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}") 
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 962)
+  def _reduce_289(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}") 
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 973)
+  def _reduce_290(val, _values, result)
+        result = Range.new(1,1)
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 977)
+  def _reduce_291(val, _values, result)
+        result = val[3]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 982)
+  def _reduce_292(val, _values, result)
+        begin
+      integer = Integer(val[0])
+    rescue
+      raise
+    end
+    result = integer
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 991)
+  def _reduce_293(val, _values, result)
+        begin
+      from_integer = Integer(val[0])
+      to_integer = Integer(val[2])
+    rescue
+      raise
+    end
+    result = Range.new(from_integer,to_integer)
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1002)
+  def _reduce_294(val, _values, result)
+        result = OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY.new
+  
+    result
+  end
+.,.,
+
+# reduce 295 omitted
+
+# reduce 296 omitted
+
+# reduce 297 omitted
+
+# reduce 298 omitted
+
+# reduce 299 omitted
+
+# reduce 300 omitted
+
+# reduce 301 omitted
+
+# reduce 302 omitted
+
+module_eval(<<'.,.,', 'parser.y', 1016)
+  def _reduce_303(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1020)
+  def _reduce_304(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+# reduce 305 omitted
+
+module_eval(<<'.,.,', 'parser.y', 1027)
+  def _reduce_306(val, _values, result)
+        result = val[3]
+  
+    result
+  end
+.,.,
+
+# reduce 307 omitted
+
+# reduce 308 omitted
+
+# reduce 309 omitted
+
+# reduce 310 omitted
+
+# reduce 311 omitted
+
+# reduce 312 omitted
+
+# reduce 313 omitted
+
+# reduce 314 omitted
+
+# reduce 315 omitted
+
+# reduce 316 omitted
+
+# reduce 317 omitted
+
+# reduce 318 omitted
+
+# reduce 319 omitted
+
+# reduce 320 omitted
+
+# reduce 321 omitted
+
+# reduce 322 omitted
+
+# reduce 323 omitted
+
+# reduce 324 omitted
+
+# reduce 325 omitted
+
+# reduce 326 omitted
+
+# reduce 327 omitted
+
+# reduce 328 omitted
+
+# reduce 329 omitted
+
+# reduce 330 omitted
+
+# reduce 331 omitted
+
+# reduce 332 omitted
+
+# reduce 333 omitted
+
+# reduce 334 omitted
+
+# reduce 335 omitted
+
+# reduce 336 omitted
+
+# reduce 337 omitted
+
+# reduce 338 omitted
+
+# reduce 339 omitted
+
+# reduce 340 omitted
+
+# reduce 341 omitted
+
+# reduce 342 omitted
+
+# reduce 343 omitted
+
+# reduce 344 omitted
+
+# reduce 345 omitted
+
+# reduce 346 omitted
+
+# reduce 347 omitted
+
+# reduce 348 omitted
+
+# reduce 349 omitted
+
+# reduce 350 omitted
+
+# reduce 351 omitted
+
+# reduce 352 omitted
+
+module_eval(<<'.,.,', 'parser.y', 1097)
+  def _reduce_353(val, _values, result)
+        result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true)
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1101)
+  def _reduce_354(val, _values, result)
+        result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => false)
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1105)
+  def _reduce_355(val, _values, result)
+        result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true,:false_valid => false)
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1109)
+  def _reduce_356(val, _values, result)
+        result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => false,:false_valid => true)
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1114)
+  def _reduce_357(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1118)
+  def _reduce_358(val, _values, result)
+        raise 'Not implemented yet'
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1122)
+  def _reduce_359(val, _values, result)
+        raise 'Not implemented yet'
+  
+    result
+  end
+.,.,
+
+# reduce 360 omitted
+
+# reduce 361 omitted
+
+# reduce 362 omitted
+
+# reduce 363 omitted
+
+# reduce 364 omitted
+
+module_eval(<<'.,.,', 'parser.y', 1134)
+  def _reduce_365(val, _values, result)
+        @in_interval = false
+    @@logger.debug("#{__FILE__}:#{__LINE__}, #{val[0]}|#{val[2]} at #{@filename}") 
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1141)
+  def _reduce_366(val, _values, result)
+          result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1145)
+  def _reduce_367(val, _values, result)
+          result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1151)
+  def _reduce_368(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}, START_TERM_CODE_CONSTRAINT = #{val[0]} at #{@filename}")
+    @@logger.debug("#{__FILE__}:#{__LINE__}, term_code_body = #{val[1]}")
+    @@logger.debug("#{__FILE__}:#{__LINE__}, END_TERM_CODE_CONSTRAINT = #{val[2]}")
+    result = val[1]
+  
+    result
+  end
+.,.,
+
+# reduce 369 omitted
+
+# reduce 370 omitted
+
+# reduce 371 omitted
+
+module_eval(<<'.,.,', 'parser.y', 1167)
+  def _reduce_372(val, _values, result)
+          result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1172)
+  def _reduce_373(val, _values, result)
+          result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1176)
+  def _reduce_374(val, _values, result)
+        @@logger.debug("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{word} at #{@filename}")
+      result = val[0]
+  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1187)
+  def _reduce_375(val, _values, result)
+        result = val[0]
+  
+    result
+  end
+.,.,
+
+def _reduce_none(val, _values, result)
+  val[0]
+end
+
+    end   # class Parser
+    end   # module ADL
+  end   # module OpenEHR
Index: /ruby/tags/release-0.5.0/lib/adl_parser/lib/parser.y
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/lib/parser.y	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/lib/parser.y	(revision 367)
@@ -0,0 +1,1331 @@
+
+class OpenEHR::ADL::Parser
+
+#options omit_action_call
+
+prechigh
+
+  nonassoc UMINUS UPLUS
+  left '*' '/'
+  left '+' '-'
+
+  nonassoc SYM_EQ
+  nonassoc SYM_NE
+  nonassoc SYM_LT
+  nonassoc SYM_START_DBLOCK
+  nonassoc SYM_START_CBLOCK
+  nonassoc SYM_GT
+  nonassoc SYM_END_CBLOCK
+  nonassoc SYM_END_DBLOCK
+  nonassoc SYM_LE
+  nonassoc SYM_GE
+
+preclow
+
+
+rule
+### http://svn.openehr.org/ref_impl_eiffel/TRUNK/components/adl_parser/src/syntax/adl/parser/adl_validator.y
+
+input: archetype EOF
+  { 
+    result = val[0]
+  }
+  | error
+
+archetype: arch_identification arch_specialisation arch_concept arch_language arch_description arch_definition arch_invariant arch_ontology
+  { 
+    assert_at(__FILE__,__LINE__) do
+      val[4].instance_of?(OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION) and val[5].instance_of?(OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT) and val[7].instance_of?(OpenEHR::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY) 
+    end
+    
+    archetype_id = val[0][:archetype_id]
+    parent_archtype_id = val[1][:parent_archtype_id] if val[1]
+    adl_version = val[0][:arch_head][:arch_meta_data][:adl_version]
+    concept = val[2]
+    language = val[3][:arch_language]
+    archetype = OpenEHR::AM::Archetype::ARCHETYPE.create(
+                                                         :archetype_id => archetype_id,
+                                                         :parent_archtype_id => parent_archtype_id,
+                                                         :adl_version => adl_version,
+                                                         :concept => concept,
+                                                         :description => val[4],
+                                                         :definition => val[5],
+                                                         :ontology => val[7]
+                                                         ) do |archetype|
+      archetype.original_language = language
+    end
+    @@logger.debug("#{__FILE__}:#{__LINE__}: archetype = #{archetype.to_yaml} at #{@filename}:#{@lineno}")
+    result = archetype
+  }
+
+
+arch_identification: arch_head V_ARCHETYPE_ID
+  { 
+    result = {:arch_head => val[0], :archetype_id => val[1] }
+  }
+  | SYM_ARCHETYPE error
+  { 
+    raise
+  }
+
+arch_head: SYM_ARCHETYPE
+  { 
+    result = {:arch_meta_data => nil }
+  }
+  | SYM_ARCHETYPE arch_meta_data
+  { 
+    result = val[1]
+  }
+
+arch_meta_data: Left_parenthesis_code arch_meta_data_items Right_parenthesis_code
+  { 
+    result = {:arch_meta_data => val[1] }
+  }
+
+arch_meta_data_items: arch_meta_data_item
+  { 
+    result = val[0]
+  }
+  | arch_meta_data_items Semicolon_code arch_meta_data_item
+  { 
+    result = val[0].merge(val[2])
+  }
+
+
+arch_meta_data_item: SYM_ADL_VERSION SYM_EQ V_VERSION_STRING
+  { 
+    result = {:adl_version => val[2], :is_controlled => false }
+  }
+  | SYM_IS_CONTROLLED
+  { 
+    result = {:is_controlled => true }
+  }
+
+# Define specialization in which its constraints are narrower than those of the parent.
+# Any data created via the use of the specialized archetype shall be conformant both to it and its parent.
+arch_specialisation: #-- empty is ok
+  | SYM_SPECIALIZE V_ARCHETYPE_ID
+  {
+    result = {:parent_archtype_id => val[1]}
+  }
+  | SYM_SPECIALIZE error
+
+arch_concept: SYM_CONCEPT V_LOCAL_TERM_CODE_REF
+  { 
+    result = {:arch_concept => val[1] }
+  }
+  | SYM_CONCEPT error
+
+#arch_language: #-- empty is ok for ADL 1.4 tools
+#    | SYM_LANGUAGE V_DADL_TEXT
+#  | SYM_LANGUAGE error
+
+arch_language: #-- empty is ok for ADL 1.4 tools
+  {
+    result = {:arch_language => nil}
+  }
+    | SYM_LANGUAGE dadl_section
+  {
+    result = {:arch_language => val[1]}
+  }
+  | SYM_LANGUAGE error
+
+#arch_description: #-- no meta-data ok
+#    | SYM_DESCRIPTION V_DADL_TEXT
+#  | SYM_DESCRIPTION error
+
+arch_description: #-- no meta-data ok
+    | SYM_DESCRIPTION dadl_section
+  { 
+    result = OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION.new(:details => val[1])
+  }
+  | SYM_DESCRIPTION error
+  
+#arch_definition: SYM_DEFINITION V_CADL_TEXT
+#  | SYM_DEFINITION error
+arch_definition: SYM_DEFINITION cadl_section
+  { 
+    result = val[1]
+  }
+  | SYM_DEFINITION error
+
+
+### cADL section
+cadl_section: c_complex_object
+  {
+    assert_at(__FILE__,__LINE__){val[0].instance_of?(OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT)}
+    @@logger.debug("#{__FILE__}:#{__LINE__}: c_complex_object = #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  }
+  | assertions
+  { 
+    result = val[0]
+  }
+#  | error
+
+#c_complex_object: c_complex_object_head SYM_MATCHES SYM_START_CBLOCK c_complex_object_body SYM_END_CBLOCK
+c_complex_object: c_complx_object_head SYM_MATCHES START_REGEXP_BLOCK REGEXP_BODY END_REGEXP_BLOCK # added by akimichi
+  { 
+    result = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.create(:attributes => val[3]) do |c_complex_object|
+      c_complex_object.node_id = val[0][:c_complex_object_id][:local_term_code_ref]
+      c_complex_object.rm_type_name = val[0][:c_complex_object_id][:type_identifier]
+      c_complex_object.occurrences = val[0][:c_occurrences]
+    end
+  }
+    | c_complex_object_head SYM_MATCHES SYM_START_CBLOCK c_complex_object_body SYM_END_CBLOCK
+  { 
+    result = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.create(:attributes => val[3]) do |c_complex_object|
+      c_complex_object.node_id = val[0][:c_complex_object_id][:local_term_code_ref]
+      c_complex_object.rm_type_name = val[0][:c_complex_object_id][:type_identifier]
+      c_complex_object.occurrences = val[0][:c_occurrences]
+    end
+  }
+#    | c_complex_object_head error SYM_END_CBLOCK
+#    | c_complex_object_head SYM_MATCHES SYM_START_CBLOCK c_complex_object_body c_invariants SYM_END_CBLOCK
+
+c_complex_object_head: c_complex_object_id c_occurrences
+  {
+    result = {:c_complex_object_id => val[0], :c_occurrences => val[1]}
+  }
+
+c_complex_object_id: type_identifier
+  {
+    result = {:type_identifier => val[0]}
+  }
+  | type_identifier V_LOCAL_TERM_CODE_REF
+  {
+    result = {:type_identifier => val[0], :local_term_code_ref => val[1]}
+  }
+
+c_complex_object_body: c_any #-- used to indicate that any value of a type is ok
+  | c_attributes
+  { 
+    result = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.new(:attributes => val[0])
+  }
+
+
+#------------------------- node types -----------------------
+### http://www.openehr.org/svn/ref_impl_eiffel/TRUNK/components/adl_parser/src/syntax/cadl/parser/cadl_validator.html
+### c_object:  c_complex_object
+### | archetype_internal_ref
+### | archetype_slot
+### | constraint_ref
+### | c_code_phrase
+### | c_ordinal
+### | c_primitive_object
+### | V_C_DOMAIN_TYPE
+### | ERR_C_DOMAIN_TYPE
+### | error
+c_object: c_complex_object
+  {
+    @@logger.debug("#{__FILE__}:#{__LINE__}: c_complex_object = #{val[0].inspect} at #{@filename}:#{@lineno}")
+    result = val[0]
+  }
+  | archetype_internal_ref
+  {
+    result = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_INTERNAL_REF.create do |archetype_internal_ref|
+      archetype_internal_ref.target_path = val[0][:absolute_path]
+      archetype_internal_ref.rm_type_name = val[0][:type_identifier]
+      archetype_internal_ref.occurrences = val[0][:c_occurrences]
+    end
+  }
+  | archetype_slot
+  {
+    result = val[0]
+  }
+  | constraint_ref
+  {
+    result = OpenEHR::AM::Archetype::Constraint_Model::CONSTRAINT_REF.create do |constraint_ref|
+      constraint_ref.reference = val[0]
+    end
+  }
+  | c_code_phrase
+  {
+    result = val[0]
+  }
+  | c_ordinal
+  {
+    result = val[0]
+  }
+  | c_primitive_object
+  {
+    result = val[0]
+  }
+  | v_c_domain_type
+  {
+    result = val[0]
+  }
+
+#  | v_c_domain_type
+#  | V_C_DOMAIN_TYPE
+  #   this is an attempt to match a dADL section inside cADL. It will
+  #   probably never work 100% properly since there can be '>' inside "||"
+  #   ranges, and also strings containing any character, e.g. units string
+  #   contining "{}" chars. The real solution is to use the dADL parser on
+  #   the buffer from the current point on and be able to fast-forward the
+  #   cursor to the last character matched by the dADL scanner
+  | ERR_C_DOMAIN_TYPE
+  | error
+
+v_c_domain_type: START_V_C_DOMAIN_TYPE_BLOCK dadl_section END_V_C_DOMAIN_TYPE_BLOCK
+  { 
+    result = val[1]
+  }
+
+# 'archetype_internal_ref' is a node that refers to a previously defined object node in the same archetype.
+archetype_internal_ref: SYM_USE_NODE type_identifier c_occurrences absolute_path
+  {
+    result = {:type_identifier => val[1], :c_occurrences => val[2], :absolute_path => val[3] }
+  }
+  | SYM_USE_NODE type_identifier error
+
+# 'archetype_slot' is a node whose statements define a constraint that determines which other archetypes may appear at that point in the current archetype.
+archetype_slot: c_archetype_slot_head SYM_MATCHES SYM_START_CBLOCK c_includes c_excludes SYM_END_CBLOCK
+  {
+    result = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_SLOT.create do |archetype_slot|
+      archetype_slot.includes = val[3]
+      archetype_slot.excludes = val[4]
+      archetype_slot.rm_type_name = val[0][:c_archetype_slot_id]
+      archetype_slot.occurrences = val[0][:c_occurrences]
+    end
+  }
+c_archetype_slot_head: c_archetype_slot_id c_occurrences
+  {
+    result = {:c_archetype_slot_id => val[0],:c_occurrences => val[1]}
+  }
+
+c_archetype_slot_id: SYM_ALLOW_ARCHETYPE type_identifier
+  {
+    result = val[1]
+  }
+  | SYM_ALLOW_ARCHETYPE type_identifier V_LOCAL_TERM_CODE_REF
+  | SYM_ALLOW_ARCHETYPE error
+
+# 'c_primitive_object' is an node representing a constraint on a primitive object type.
+c_primitive_object: c_primitive
+  {
+    assert_at(__FILE__,__LINE__){val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_PRIMITIVE)}
+    result = OpenEHR::AM::Archetype::Constraint_Model::C_PRIMITIVE_OBJECT.create do |c_primitive_object|
+      c_primitive_object.item = val[0]
+    end
+  }
+
+c_primitive: c_integer
+  {
+    @@logger.debug("#{__FILE__}:#{__LINE__}: c_integer = #{val[0]} at #{@filename}:#{@lineno}")
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_INTEGER.create do |c_integer|
+      c_integer.list
+      c_integer.range
+      c_integer.assumed_value
+    end
+  }
+  | c_real
+  {
+    @@logger.debug("#{__FILE__}:#{__LINE__}: c_real = #{val[0]} at #{@filename}:#{@lineno}")
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_REAL.new
+  }
+  | c_date
+  {
+    @@logger.debug("#{__FILE__}:#{__LINE__}: c_date = #{val[0]} at #{@filename}:#{@lineno}")
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE.new
+  }
+  | c_time
+  {
+    @@logger.debug("#{__FILE__}:#{__LINE__}: c_time = #{val[0]} at #{@filename}:#{@lineno}")
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_TIME.new
+  }
+  | c_date_time
+  {
+    @@logger.debug("#{__FILE__}:#{__LINE__}: c_date_time = #{val[0]} at #{@filename}:#{@lineno}")
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME.new
+  }
+  | c_duration
+  {
+    @@logger.debug("#{__FILE__}:#{__LINE__}: c_duration = #{val[0]} at #{@filename}:#{@lineno}")
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DURATION.new
+  }
+  | c_string
+  {
+    @@logger.debug("#{__FILE__}:#{__LINE__}: c_string = #{val[0]} at #{@filename}:#{@lineno}")
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_STRING.new
+  }
+  | c_boolean
+  {
+    assert_at(__FILE__,__LINE__){val[0].instance_of?(OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN)}
+    @@logger.debug("#{__FILE__}:#{__LINE__}: c_boolean = #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  }
+
+c_any: Star_code
+#c_any: '*'
+
+#---------------- BODY - relationships ----------------
+
+c_attributes: c_attribute
+  { 
+    result = [val[0]]
+  }
+  | c_attributes c_attribute
+  { 
+    result = (val[0] << val[1])
+  }
+
+# 'c_attribute' is a node representing a constraint on an attribute in an object model.
+c_attribute: c_attr_head SYM_MATCHES SYM_START_CBLOCK c_attr_values SYM_END_CBLOCK
+  { 
+    assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE)}
+    c_attribute = val[0]
+    c_attribute.children = val[3]
+    result = c_attribute
+  }
+  | c_attr_head SYM_MATCHES START_REGEXP_BLOCK REGEXP_BODY END_REGEXP_BLOCK # added by akimichi
+  { 
+    assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE)}
+    result = val[0]
+  }
+  | c_attr_head SYM_MATCHES SYM_START_CBLOCK error SYM_END_CBLOCK
+  { 
+    assert_at(__FILE__,__LINE__){ val[0].kind_of?(OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE)}
+    result = val[0]
+  }
+
+
+c_attr_head: V_ATTRIBUTE_IDENTIFIER c_existence
+  {
+    @@logger.debug("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER = #{val[0]}, c_existence = #{val[1]} at #{@filename}")
+    result = OpenEHR::AM::Archetype::Constraint_Model::C_SINGLE_ATTRIBUTE.new(
+                                                                              :rm_attribute_name => val[0],
+                                                                              :existence => val[1]
+                                                                              )
+
+  }
+  | V_ATTRIBUTE_IDENTIFIER c_existence c_cardinality
+  {
+    assert_at(__FILE__,__LINE__){ val[2].instance_of?(OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY) }
+    @@logger.debug("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER: #{val[0]}, c_existence = #{val[1]}, c_cardinality = #{val[2]} at #{@filename}") 
+    result = OpenEHR::AM::Archetype::Constraint_Model::C_MULTIPLE_ATTRIBUTE.new(
+                                                                                :rm_attribute_name => val[0],
+                                                                                :existence => val[1],
+                                                                                :cardinality => val[2]
+                                                                                )
+  }
+
+c_attr_values: c_object
+  { 
+    result = Array[val[0]]
+  }
+  | c_attr_values c_object
+  { 
+    result = (val[0] << val[1])
+  }
+  | c_any #	-- to allow a property to have any value
+  { 
+    result = Array[val[0]]
+  }
+
+### c_includes: #-- Empty
+###     | SYM_INCLUDE assertions
+c_includes: #-- Empty
+    | SYM_INCLUDE invariants
+{
+    result = val[1]
+}
+
+### c_excludes: #-- Empty
+###     | SYM_EXCLUDE assertions
+c_excludes: #-- Empty
+    | SYM_EXCLUDE invariants
+{
+    result = val[1]
+}
+
+invariants: invariant
+  | invariants invariant
+
+invariant: any_identifier ':' boolean_expression
+  | boolean_expression
+  | any_identifier ':' error
+
+arch_invariant: #-- no invariant ok
+    | SYM_INVARIANT V_ASSERTION_TEXT
+    | SYM_INVARIANT error
+
+# define all linguistic entries in this part as dADL.
+#arch_ontology: SYM_ONTOLOGY V_DADL_TEXT
+#  | SYM_ONTOLOGY error
+
+arch_ontology: SYM_ONTOLOGY dadl_section
+  { 
+    dadl_section = val[1]
+    result = OpenEHR::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY.new
+  }
+  | SYM_ONTOLOGY error
+
+
+### dADL section
+dadl_section: dadl_input
+
+dadl_input: attr_vals
+  | complex_object_block
+#  | error
+
+attr_vals: attr_val
+  {
+    result = Array[val[0]]
+  }
+  | attr_vals attr_val
+  {
+    result = (val[0] << val[1])
+  }
+  | attr_vals Semicolon_code attr_val
+  {
+    result = (val[0] << val[2])
+  }
+
+attr_val: attr_id SYM_EQ object_block
+  {
+    @@logger.debug("#{__FILE__}:#{__LINE__}: attr_id = #{val[0]} at #{@filename}:#{@lineno}")
+    result = {:attr_id => val[0], :object_block => val[2]}
+  }
+
+attr_id: V_ATTRIBUTE_IDENTIFIER
+  {
+    @@logger.debug("#{__FILE__}:#{__LINE__}: V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  }
+  | V_ATTRIBUTE_IDENTIFIER error
+
+object_block: complex_object_block
+  { 
+    result = val[0]
+  }
+  | primitive_object_block
+  { 
+    result = val[0]
+  }
+
+complex_object_block: single_attr_object_block
+  { 
+    result = val[0]
+  }
+  | multiple_attr_object_block
+  { 
+    result = val[0]
+  }
+
+multiple_attr_object_block: untyped_multiple_attr_object_block
+  { 
+    result = {:untyped_multiple_attr_object_block => val[0]}
+  }
+  | type_identifier untyped_multiple_attr_object_block
+  { 
+    result = {:type_identifier => val[0], :untyped_multiple_attr_object_block => val[1]}
+  }
+
+untyped_multiple_attr_object_block: multiple_attr_object_block_head keyed_objects SYM_END_DBLOCK
+  { 
+    result = {:multiple_attr_object_block_head => val[0], :keyed_objects => val[1]}
+  }
+
+multiple_attr_object_block_head: SYM_START_DBLOCK
+  { 
+    result = val[0]
+  }
+
+keyed_objects: keyed_object
+  { 
+    result = Array[val[0]]
+  }
+  | keyed_objects keyed_object
+  { 
+    result = (val[0] << val[1])
+  }
+
+keyed_object: object_key SYM_EQ object_block
+  {
+    @@logger.debug("#{__FILE__}:#{__LINE__}: keyed_object = #{val[0]} at #{@filename}:#{@lineno}")
+    result = {:object_key => val[0], :object_block => val[2]}
+  }
+
+object_key: Left_bracket_code simple_value Right_bracket_code
+  {
+    @@logger.debug("object_key: [#{val[1]}] at #{@filename}:#{@lineno}")
+    result = val[1]
+  }
+
+single_attr_object_block: untyped_single_attr_object_block
+  {
+    result = {:untyped_single_attr_object_block => val[0]}
+  }
+  | type_identifier untyped_single_attr_object_block
+  {
+    result = {:type_identifier => val[0], :untyped_single_attr_object_block => val[1]}
+  }
+
+untyped_single_attr_object_block: single_attr_object_complex_head SYM_END_DBLOCK # >
+  {
+    @@logger.debug("#{__FILE__}:#{__LINE__}: single_attr_object_complex_head = #{val[0]} at #{@filename}:#{@lineno}")
+    result = {:single_attr_object_complex_head => val[0]}
+  }
+  | single_attr_object_complex_head attr_vals SYM_END_DBLOCK
+  {
+    @@logger.debug("#{__FILE__}:#{__LINE__}: attr_vals = #{val[1]} at #{@filename}:#{@lineno}")
+    result = {:single_attr_object_complex_head => val[0], :attr_vals => val[1]}
+  }
+single_attr_object_complex_head: SYM_START_DBLOCK
+primitive_object_block: untyped_primitive_object_block
+  {
+    @@logger.debug("#{__FILE__}:#{__LINE__}: untyped_primitive_object_block = #{val[0]} at #{@filename}:#{@lineno}")
+    result = {:untyped_primitive_object_block => val[0]}
+  }
+  | type_identifier untyped_primitive_object_block
+  {
+    @@logger.debug("#{__FILE__}:#{__LINE__}: type_identifier = #{val[0]}, untyped_primitive_object_block = #{val[1]} at #{@filename}:#{@lineno}")
+    result = {:type_identifier => val[0], :untyped_primitive_object_block => val[1]}
+  }
+untyped_primitive_object_block: SYM_START_DBLOCK primitive_object_value SYM_END_DBLOCK
+  {
+    @@logger.debug("#{__FILE__}:#{__LINE__}: primitive_object_block = <#{val[1]}> at #{@filename}:#{@lineno}")
+    result = val[1]
+  }
+primitive_object_value: simple_value
+  {
+    result = val[0]
+  }
+  | simple_list_value
+  {
+    result = val[0]
+  }
+  | simple_interval_value
+  {
+    result = val[0]
+  }
+  | term_code
+  {
+    result = val[0]
+  }
+  | term_code_list_value
+  {
+    result = val[0]
+  }
+simple_value: string_value
+  {
+    @@logger.debug("string_value: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  }
+  | integer_value
+  {
+    @@logger.debug("integer_value: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  }
+  | real_value
+  {
+    @@logger.debug("real_value: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  }
+  | boolean_value
+  {
+    @@logger.debug("boolean_value: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  }
+  | character_value
+  {
+    @@logger.debug("character_value: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  }
+  | date_value
+  {
+    @@logger.debug("date_value: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  }
+  | time_value
+  {
+    @@logger.debug("time_value: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  }
+  | date_time_value
+  {
+    @@logger.debug("date_time_value: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  }
+  | duration_value
+  {
+    @@logger.debug("duration_value: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  }
+  | uri_value
+  {
+    @@logger.debug("uri_value: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  }
+
+simple_list_value: string_list_value
+  | integer_list_value
+  | real_list_value
+  | boolean_list_value
+  | character_list_value
+  | date_list_value
+  | time_list_value
+  | date_time_list_value
+  | duration_list_value
+
+simple_interval_value: integer_interval_value
+  | real_interval_value
+  | date_interval_value
+  | time_interval_value
+  | date_time_interval_value
+  | duration_interval_value
+
+type_identifier: V_TYPE_IDENTIFIER
+  {
+    @@logger.debug("V_TYPE_IDENTIFIER: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  }
+  | V_GENERIC_TYPE_IDENTIFIER
+  {
+    @@logger.debug("V_GENERIC_TYPE_IDENTIFIER: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  }
+
+string_value: V_STRING
+  {
+    @@logger.debug("V_STRING: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  }
+
+string_list_value: V_STRING Comma_code V_STRING
+  | string_list_value Comma_code V_STRING
+  | V_STRING Comma_code SYM_LIST_CONTINUE
+
+integer_value: V_INTEGER
+  { 
+    begin
+      integer = Integer(val[0])
+    rescue
+      raise
+    end
+    result = integer
+  }
+  | Plus_code V_INTEGER
+  {
+    begin
+      integer = Integer(val[0])
+    rescue
+      raise
+    end
+    result = integer
+  }
+  | Minus_code V_INTEGER
+  {
+    begin
+      integer = Integer(val[0])
+    rescue
+      raise
+    end
+    result = - integer
+  }
+###   | '+' V_INTEGER
+###   | '-' V_INTEGER
+
+integer_list_value: integer_value Comma_code integer_value
+  | integer_list_value Comma_code integer_value
+  | integer_value Comma_code SYM_LIST_CONTINUE
+
+integer_interval_value: SYM_INTERVAL_DELIM integer_value SYM_ELLIPSIS integer_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_GT integer_value SYM_ELLIPSIS integer_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM integer_value SYM_ELLIPSIS SYM_LT integer_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_GT integer_value SYM_ELLIPSIS SYM_LT integer_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_LT integer_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_LE integer_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_GT integer_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_GE integer_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM integer_value SYM_INTERVAL_DELIM
+
+real_value: V_REAL
+  {
+    begin
+      real = Float(val[0])
+    rescue
+      raise
+    end
+    result = real
+  }
+  | Plus_code V_REAL
+  {
+    begin
+      real = Float(val[1])
+    rescue
+      raise
+    end
+    result = real
+  }
+  | Minus_code V_REAL
+  {
+    begin
+      real = Float(val[1])
+    rescue
+      raise
+    end
+    result = - real
+  }
+
+real_list_value: real_value Comma_code real_value
+  | real_list_value Comma_code real_value
+  | real_value Comma_code SYM_LIST_CONTINUE
+
+real_interval_value: SYM_INTERVAL_DELIM real_value SYM_ELLIPSIS real_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_GT real_value SYM_ELLIPSIS real_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM real_value SYM_ELLIPSIS SYM_LT real_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_GT real_value SYM_ELLIPSIS SYM_LT real_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_LT real_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_LE real_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_GT real_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_GE real_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM real_value SYM_INTERVAL_DELIM
+
+
+boolean_value: SYM_TRUE
+  { 
+    result = true
+  }
+  | SYM_FALSE
+  { 
+    result = false
+  }
+
+boolean_list_value: boolean_value Comma_code boolean_value
+  | boolean_list_value Comma_code boolean_value
+  | boolean_value Comma_code SYM_LIST_CONTINUE
+
+character_value: V_CHARACTER
+
+character_list_value: character_value Comma_code character_value
+  | character_list_value Comma_code character_value
+  | character_value Comma_code SYM_LIST_CONTINUE
+
+date_value: V_ISO8601_EXTENDED_DATE
+  { 
+    result = val[0]
+  }
+
+date_list_value: date_value Comma_code date_value
+  | date_list_value Comma_code date_value
+  | date_value Comma_code SYM_LIST_CONTINUE
+
+date_interval_value: SYM_INTERVAL_DELIM date_value SYM_ELLIPSIS date_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_GT date_value SYM_ELLIPSIS date_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM date_value SYM_ELLIPSIS SYM_LT date_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_GT date_value SYM_ELLIPSIS SYM_LT date_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_LT date_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_LE date_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_GT date_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_GE date_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM date_value SYM_INTERVAL_DELIM
+
+time_value: V_ISO8601_EXTENDED_TIME
+
+time_list_value: time_value Comma_code time_value
+  | time_list_value Comma_code time_value
+  | time_value Comma_code SYM_LIST_CONTINUE
+
+time_interval_value: SYM_INTERVAL_DELIM time_value SYM_ELLIPSIS time_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_GT time_value SYM_ELLIPSIS time_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM time_value SYM_ELLIPSIS SYM_LT time_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_GT time_value SYM_ELLIPSIS SYM_LT time_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_LT time_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_LE time_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_GT time_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_GE time_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM time_value SYM_INTERVAL_DELIM
+
+date_time_value: V_ISO8601_EXTENDED_DATE_TIME
+
+date_time_list_value: date_time_value Comma_code date_time_value
+  | date_time_list_value Comma_code date_time_value
+  | date_time_value Comma_code SYM_LIST_CONTINUE
+
+date_time_interval_value: SYM_INTERVAL_DELIM date_time_value SYM_ELLIPSIS date_time_value  SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_GT date_time_value SYM_ELLIPSIS date_time_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM date_time_value SYM_ELLIPSIS SYM_LT date_time_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_GT date_time_value SYM_ELLIPSIS SYM_LT date_time_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_LT date_time_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_LE date_time_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_GT date_time_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_GE date_time_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM date_time_value SYM_INTERVAL_DELIM
+
+duration_value: V_ISO8601_DURATION
+  {
+    @@logger.debug("V_ISO8601_DURATION: #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  }
+
+duration_list_value: duration_value Comma_code duration_value
+  | duration_list_value Comma_code duration_value
+  | duration_value Comma_code SYM_LIST_CONTINUE
+
+duration_interval_value: SYM_INTERVAL_DELIM duration_value SYM_ELLIPSIS duration_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_GT duration_value SYM_ELLIPSIS duration_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM duration_value SYM_ELLIPSIS SYM_LT duration_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_GT duration_value SYM_ELLIPSIS SYM_LT duration_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_LT duration_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_LE duration_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_GT duration_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM SYM_GE duration_value SYM_INTERVAL_DELIM
+  | SYM_INTERVAL_DELIM duration_value SYM_INTERVAL_DELIM
+
+term_code: V_QUALIFIED_TERM_CODE_REF
+  {
+    @@logger.debug("#{__FILE__}:#{__LINE__}: V_QUALIFIED_TERM_CODE_REF = #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  }
+
+term_code_list_value: term_code Comma_code term_code
+  | term_code_list_value Comma_code term_code
+  | term_code Comma_code SYM_LIST_CONTINUE
+
+uri_value: V_URI
+  {
+    @@logger.debug("#{__FILE__}:#{__LINE__}: V_URI = #{val[0]} at #{@filename}:#{@lineno}")
+    result = val[0]
+  }
+
+
+#---------------------- ASSERTIONS ------------------------
+
+assertions: assertion
+  | assertions assertion
+
+assertion: any_identifier ':' boolean_expression
+  | boolean_expression
+  | any_identifier ':' error
+
+#---------------------- expressions ---------------------
+
+boolean_expression: boolean_leaf
+  | boolean_node
+
+boolean_node: SYM_EXISTS absolute_path
+#  | absolute_path
+  | SYM_EXISTS error
+  | relative_path SYM_MATCHES SYM_START_CBLOCK c_primitive SYM_END_CBLOCK
+  | relative_path SYM_MATCHES START_REGEXP_BLOCK REGEXP_BODY END_REGEXP_BLOCK # added by akimichi
+  | SYM_NOT boolean_leaf
+  | arithmetic_expression '=' arithmetic_expression
+  | arithmetic_expression SYM_NE arithmetic_expression
+  | arithmetic_expression SYM_LT arithmetic_expression
+  | arithmetic_expression SYM_GT arithmetic_expression
+  | arithmetic_expression SYM_LE arithmetic_expression
+  | arithmetic_expression SYM_GE arithmetic_expression
+  | boolean_expression SYM_AND boolean_expression
+  | boolean_expression SYM_OR boolean_expression
+  | boolean_expression SYM_XOR boolean_expression
+  | boolean_expression SYM_IMPLIES boolean_expression
+
+boolean_leaf: Left_parenthesis_code boolean_expression Right_parenthesis_code
+  | SYM_TRUE
+  | SYM_FALSE
+
+arithmetic_expression: arithmetic_leaf
+  | arithmetic_node
+
+arithmetic_node: arithmetic_expression '+' arithmetic_leaf
+  | arithmetic_expression '-' arithmetic_leaf
+  | arithmetic_expression Star_code arithmetic_leaf
+  | arithmetic_expression Slash_code arithmetic_leaf
+  | arithmetic_expression '^' arithmetic_leaf
+
+arithmetic_leaf:  Left_parenthesis_code arithmetic_expression Right_parenthesis_code
+  | integer_value
+  | real_value
+  | absolute_path
+
+
+#--------------- THE FOLLOWING SOURCE TAKEN FROM OG_PATH_VALIDATOR.Y -------------
+#--------------- except to remove movable_path ----------------------------------------------------
+
+
+absolute_path: Slash_code
+  | Slash_code relative_path
+#  | absolute_path Slash_code relative_path
+
+
+
+relative_path: path_segment
+  | relative_path Slash_code path_segment
+
+path_segment: V_ATTRIBUTE_IDENTIFIER V_LOCAL_TERM_CODE_REF
+  {
+    @@logger.debug("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}") 
+  }
+  | V_ATTRIBUTE_IDENTIFIER
+  {
+    @@logger.debug("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}") 
+  }
+
+
+#-------------------------------- END SOURCE TAKEN FROM OG_PATH_VALIDATOR.Y ----------------------
+
+
+#---------------- existence, occurrences, cardinality ----------------
+
+c_existence: #-- default to 1..1
+    { 
+    result = Range.new(1,1)
+  }
+  | SYM_EXISTENCE SYM_MATCHES SYM_START_CBLOCK existence_spec SYM_END_CBLOCK
+  { 
+    result = val[3]
+  }
+
+existence_spec:  V_INTEGER #-- can only be 0 or 1
+  { 
+    begin
+      integer = Integer(val[0])
+    rescue
+      raise
+    end
+    result = integer
+  }
+  | V_INTEGER SYM_ELLIPSIS V_INTEGER #-- can only be 0..0, 0..1, 1..1
+  { 
+    begin
+      from_integer = Integer(val[0])
+      to_integer = Integer(val[2])
+    rescue
+      raise
+    end
+    result = Range.new(from_integer,to_integer)
+  }
+
+c_cardinality: SYM_CARDINALITY SYM_MATCHES SYM_START_CBLOCK cardinality_spec SYM_END_CBLOCK
+  { 
+    result = OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY.new
+  }
+
+cardinality_spec: occurrence_spec
+  | occurrence_spec Semicolon_code SYM_ORDERED
+  | occurrence_spec Semicolon_code SYM_UNORDERED
+  | occurrence_spec Semicolon_code SYM_UNIQUE
+  | occurrence_spec Semicolon_code SYM_ORDERED Semicolon_code SYM_UNIQUE
+  | occurrence_spec Semicolon_code SYM_UNORDERED Semicolon_code SYM_UNIQUE
+  | occurrence_spec Semicolon_code SYM_UNIQUE Semicolon_code SYM_ORDERED
+  | occurrence_spec Semicolon_code SYM_UNIQUE Semicolon_code SYM_UNORDERED
+
+cardinality_limit_value: integer_value
+  {
+    result = val[0]
+  }
+  | Star_code # '*'
+  {
+    result = val[0]
+  }
+
+
+c_occurrences:  #-- default to 1..1
+  | SYM_OCCURRENCES SYM_MATCHES SYM_START_CBLOCK occurrence_spec SYM_END_CBLOCK
+  { 
+    result = val[3]
+  }
+  | SYM_OCCURRENCES error
+
+occurrence_spec: cardinality_limit_value #-- single integer or '*'
+  | V_INTEGER SYM_ELLIPSIS cardinality_limit_value
+
+#---------------------- leaf constraint types -----------------------
+
+c_integer_spec: integer_value
+  | integer_list_value
+  | integer_interval_value
+
+c_integer: c_integer_spec
+  | c_integer_spec Semicolon_code integer_value
+  | c_integer_spec Semicolon_code error
+
+c_real_spec: real_value
+  | real_list_value
+  | real_interval_value
+
+c_real: c_real_spec
+  | c_real_spec Semicolon_code real_value
+  | c_real_spec Semicolon_code error
+
+c_date_constraint: V_ISO8601_DATE_CONSTRAINT_PATTERN
+  | date_value
+  | date_interval_value
+
+c_date: c_date_constraint
+  | c_date_constraint Semicolon_code date_value
+  | c_date_constraint Semicolon_code error
+
+c_time_constraint: V_ISO8601_TIME_CONSTRAINT_PATTERN
+  | time_value
+  | time_interval_value
+
+c_time: c_time_constraint
+  | c_time_constraint Semicolon_code time_value
+  | c_time_constraint Semicolon_code error
+
+c_date_time_constraint: V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN
+  | date_time_value
+  | date_time_interval_value
+
+c_date_time: c_date_time_constraint
+  | c_date_time_constraint Semicolon_code date_time_value
+  | c_date_time_constraint Semicolon_code error
+
+c_duration_constraint: duration_pattern
+  | duration_pattern Slash_code duration_interval_value
+  | duration_value
+  | duration_interval_value
+
+c_duration: c_duration_constraint
+  | c_duration_constraint Semicolon_code duration_value
+  | c_duration_constraint Semicolon_code error
+
+c_string_spec:  V_STRING #-- single value, generates closed list
+  | string_list_value #-- closed list
+  | string_list_value Comma_code SYM_LIST_CONTINUE #-- open list
+#  | string_list_value ',' SYM_LIST_CONTINUE #-- open list
+#  | V_REGEXP #-- regular expression with "//" or "^^" delimiters
+
+c_string: c_string_spec
+  | c_string_spec Semicolon_code string_value
+  | c_string_spec Semicolon_code error
+
+c_boolean_spec: SYM_TRUE
+  { 
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true)
+  }
+  | SYM_FALSE
+  { 
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => false)
+  }
+  | SYM_TRUE Comma_code SYM_FALSE
+  { 
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true,:false_valid => false)
+  }
+  | SYM_FALSE Comma_code SYM_TRUE
+  { 
+    result = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => false,:false_valid => true)
+  }
+
+c_boolean: c_boolean_spec
+  { 
+    result = val[0]
+  }
+  | c_boolean_spec Semicolon_code boolean_value
+  {
+    raise 'Not implemented yet'
+  }
+  | c_boolean_spec Semicolon_code error
+  {
+    raise 'Not implemented yet'
+  }
+
+c_ordinal: c_ordinal_spec
+  | c_ordinal_spec Semicolon_code integer_value
+  | c_ordinal_spec Semicolon_code error
+
+c_ordinal_spec: ordinal
+  | c_ordinal_spec Comma_code ordinal
+
+ordinal: integer_value SYM_INTERVAL_DELIM V_QUALIFIED_TERM_CODE_REF
+  {
+    @in_interval = false
+    @@logger.debug("#{__FILE__}:#{__LINE__}, #{val[0]}|#{val[2]} at #{@filename}") 
+  }
+
+#c_code_phrase: V_TERM_CODE_CONSTRAINT #-- e.g. "[local::at0040, at0041; at0040]"
+c_code_phrase: term_code_constraint_section #-- e.g. "[local::at0040, at0041; at0040]"
+  {
+      result = val[0]
+  }
+  | V_QUALIFIED_TERM_CODE_REF
+  {
+      result = val[0]
+  }
+
+#                             [[a-zA-Z0-9\(\)\._\-]+::[ \t\n]*          [[a-zA-Z0-9\._\-]*[ \t]*]
+term_code_constraint_section: START_TERM_CODE_CONSTRAINT term_code_body END_TERM_CODE_CONSTRAINT
+  {
+    @@logger.debug("#{__FILE__}:#{__LINE__}, START_TERM_CODE_CONSTRAINT = #{val[0]} at #{@filename}")
+    @@logger.debug("#{__FILE__}:#{__LINE__}, term_code_body = #{val[1]}")
+    @@logger.debug("#{__FILE__}:#{__LINE__}, END_TERM_CODE_CONSTRAINT = #{val[2]}")
+    result = val[1]
+  }
+
+
+term_code_body: # empty
+  | TERM_CODE
+  | term_code_body TERM_CODE
+### term_code_body: TERM_CODE
+###   | term_code_body TERM_CODE
+
+# A Constraint_Ref is a proxy for a set of constraints on an object.
+constraint_ref: V_LOCAL_TERM_CODE_REF #-- e.g. "ac0003"
+  {
+      result = val[0]
+  }
+
+any_identifier: type_identifier
+  {
+      result = val[0]
+  }
+  | V_ATTRIBUTE_IDENTIFIER
+  {
+    @@logger.debug("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{word} at #{@filename}")
+      result = val[0]
+  }
+
+
+#----------------- TAKEN FROM DADL_VALIDATOR.Y -------------------
+#-----------------        DO NOT MODIFY        -------------------
+#---------------------- BASIC DATA VALUES -----------------------
+
+duration_pattern: V_ISO8601_DURATION_CONSTRAINT_PATTERN
+  { 
+    result = val[0]
+  }
+
+
+
+---- header
+
+
+$:.unshift File.join(File.dirname(__FILE__))
+require 'logger'
+require 'yaml'
+require 'rubygems'
+require 'adl_parser.rb'
+require 'am.rb'
+require 'rm.rb'
+$DEBUG = false
+
+
+
+---- inner
+
+def assert_at(file,line, message = "")
+  unless yield
+    raise "Assertion failed !: #{file}, #{line}: #{message}"
+  end
+end
+
+if $DEBUG
+  @@logger = Logger.new('log/parser.log','daily')
+  @@logger.level = Logger::DEBUG
+else
+  @@logger = Logger.new(STDOUT)
+  @@logger.level = Logger::WARN
+end
+
+
+###----------/* keywords */ --------------------------------------------- 
+@@adl_reserved = {
+    'archetype' => :SYM_ARCHETYPE,
+    'adl_version' => :SYM_ADL_VERSION,
+    'controlled' => :SYM_IS_CONTROLLED,
+    'specialize' => :SYM_SPECIALIZE,
+    'concept' => :SYM_CONCEPT,
+    'language' => :SYM_LANGUAGE,
+    'description' => :SYM_DESCRIPTION,
+    'definition' => :SYM_DEFINITION,
+    'invariant' => :SYM_INVARIANT,
+    'ontology' => :SYM_ONTOLOGY,
+    'matches' => :SYM_MATCHES,
+    'is_in' => :SYM_MATCHES,
+    'occurrences' => :SYM_OCCURRENCES,
+    'true' => :SYM_TRUE, #[Tt][Rr][Uu][Ee] -- -> SYM_TRUE 
+    'false' => :SYM_FALSE, # [Ff][Aa][Ll][Ss][Ee] -- -> SYM_FALSE 
+    'infinity' => :SYM_INFINITY # [Ii][Nn][Ff][Ii][Nn][Ii][Tt][Yy] -- -> SYM_INFINITY 
+}
+
+@@dadl_reserved = {
+  'true' => :SYM_TRUE, #[Tt][Rr][Uu][Ee] -- -> SYM_TRUE 
+  'false' => :SYM_FALSE, # [Ff][Aa][Ll][Ss][Ee] -- -> SYM_FALSE 
+  'infinity' => :SYM_INFINITY # [Ii][Nn][Ff][Ii][Nn][Ii][Tt][Yy] -- -> SYM_INFINITY 
+}
+
+@@cadl_reserved = {
+  'then' => :SYM_THEN, # [Tt][Hh][Ee][Nn]
+  'else' => :SYM_ELSE, # [Ee][Ll][Ss][Ee]
+  'and' => :SYM_AND, # [Aa][Nn][Dd]
+  'or' => :SYM_OR, # [Oo][Rr]
+  'xor' => :SYM_XOR, # [Xx][Oo][Rr]
+  'not' => :SYM_NOT, # [Nn][Oo][Tt]
+  'implies' => :SYM_IMPLIES, # [Ii][Mm][Pp][Ll][Ii][Ee][Ss]
+  'true' => :SYM_TRUE, #[Tt][Rr][Uu][Ee] -- -> SYM_TRUE 
+  'false' => :SYM_FALSE, # [Ff][Aa][Ll][Ss][Ee] -- -> SYM_FALSE 
+  'forall' => :SYM_FORALL, # [Ff][Oo][Rr][_][Aa][Ll][Ll]
+  'exists' => :SYM_EXISTS, # [Ee][Xx][Ii][Ss][Tt][Ss]
+  'existence' => :SYM_EXISTENCE, # [Ee][Xx][Iu][Ss][Tt][Ee][Nn][Cc][Ee]
+  'occurrences' => :SYM_OCCURRENCES, # [Oo][Cc][Cc][Uu][Rr][Rr][Ee][Nn][Cc][Ee][Ss]
+  'cardinality' => :SYM_CARDINALITY, # [Cc][Aa][Rr][Dd][Ii][Nn][Aa][Ll][Ii][Tt][Yy]
+  'ordered' => :SYM_ORDERED, # [Oo][Rr][Dd][Ee][Rr][Ee][Dd]
+  'unordered' => :SYM_UNORDERED, # [Uu][Nn][Oo][Rr][Dd][Ee][Rr][Ee][Dd]
+  'unique' => :SYM_UNIQUE, # [Uu][Nn][Ii][Qq][Uu][Ee]
+  'matches' => :SYM_MATCHES, # [Mm][Aa][Tt][Cc][Hh][Ee][Ss]
+  'is_in' => :SYM_MATCHES, # [Ii][Ss][_][Ii][Nn]
+  'invariant' => :SYM_INVARIANT, # [Ii][Nn][Vv][Aa][Rr][Ii][Aa][Nn][Tt]
+  'infinity' => :SYM_INFINITY, # [Ii][Nn][Ff][Ii][Nn][Ii][Tt][Yy] -- -> SYM_INFINITY 
+  'use_node' => :SYM_USE_NODE, # [Uu][Ss][Ee][_][Nn][Oo][Dd][Ee]
+  'use_archetype' => :SYM_ALLOW_ARCHETYPE, # [Uu][Ss][Ee][_][Aa][Rr][Cc][Hh][Ee][Tt][Yy][Pp][Ee]
+  'allow_archetype' => :SYM_ALLOW_ARCHETYPE, # [Aa][Ll][Ll][Oo][Ww][_][Aa][Rr][Cc][Hh][Ee][Tt][Yy][Pp][Ee]
+  'include' => :SYM_INCLUDE, # [Ii][Nn][Cc][Ll][Uu][Dd][Ee]
+  'exclude' => :SYM_EXCLUDE # [Ee][Xx][Cc][Ll][Uu][Dd][Ee]
+}
+
+
+###----------/* Scanner */ ----------------------------------------------- 
+
+
+def scan
+  @@logger.debug("#{__FILE__}:#{__LINE__}: Entering scan at #{@filename}:#{@lineno}:")
+  scanner = OpenEHR::ADL::Scanner::ADLScanner.new(@adl_type, @filename)
+
+  until @data.nil?  do
+    @data = scanner.scan(@data) do |sym, val|
+        yield sym, val
+    end
+    @data = $' # variable $' receives the string after the match
+  end
+  yield :EOF, nil
+  yield false, '$'
+end # of scan
+
+
+def parse(data, filename, lineno = 1, debug = false)
+  @yydebug = true
+  @parsestring = data
+  @data = data
+  @lineno = lineno
+  @filename = filename
+  @adl_type = [:adl] # {:adl, :cadl, :dadl}
+  @in_regexp = false
+  @in_interval = false
+  @in_c_domain_type = false
+  yyparse self, :scan
+end
+
+def on_error( t, v, values)
+  raise Racc::ParseError, "#{@filename}:#{@lineno}: Inline syntax error on #{v.inspect}"
+end
+
+
+__END__
+
+
+
+
+### Local Variables:
+### mode:ruby
+### mode:font-lock
+### comment-column:0
+### comment-start: "### "
+### comment-end:"" 
+### End:
+
+
+
+
Index: /ruby/tags/release-0.5.0/lib/adl_parser/lib/scanner.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/lib/scanner.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/lib/scanner.rb	(revision 367)
@@ -0,0 +1,326 @@
+require 'rubygems'
+gem 'yaparc'
+require 'yaparc'
+
+
+module OpenEhr
+  module ADL
+    module Scanner
+      module Common
+        class V_QUALIFIED_TERM_CODE_REF
+          include Yaparc::Parsable
+          def initialize
+            @parser = lambda do |input|
+              Yaparc::Apply.new(Yaparc::Regex.new(/\A\[[a-zA-Z0-9()\._-]+::[a-zA-Z0-9\._-]+\]/)) do |match|
+                OpenEhr::LOG.debug("V_QUALIFIED_TERM_CODE_REF: #{match}")
+                [:V_QUALIFIED_TERM_CODE_REF, match]
+              end
+            end
+          end
+        end
+        
+        class V_LOCAL_TERM_CODE_REF
+          include Yaparc::Parsable
+          def initialize
+            @parser = lambda do |input|
+              Yaparc::Apply.new(Yaparc::Regex.new(/\A\[[a-zA-Z0-9][a-zA-Z0-9._\-]*\]/)) do |match|
+                OpenEhr::LOG.debug("V_TERM_CODE_REF: #{match}")
+                [:V_LOCAL_TERM_CODE_REF, match]
+              end
+            end
+          end
+        end
+
+        class ERR_V_QUALIFIED_TERM_CODE_REF
+          include Yaparc::Parsable
+          def initialize
+            @parser = lambda do |input|
+              Yaparc::Apply.new(Yaparc::Regex.new(/\A\[[a-zA-Z0-9._\- ]+::[a-zA-Z0-9._\- ]+\]/)) do |match|
+                OpenEhr::LOG.debug("ERR_V_QUALIFIED_TERM_CODE_REF: #{match}")
+                [:ERR_V_QUALIFIED_TERM_CODE_REF, match]
+              end
+            end
+          end
+        end
+
+        class V_TYPE_IDENTIFIER
+          include Yaparc::Parsable
+          def initialize
+            @parser = lambda do |input|
+              Yaparc::Apply.new(Yaparc::Regex.new(/\A[A-Z][a-zA-Z0-9_]*/)) do |match|
+                OpenEhr::LOG.debug("V_TYPE_IDENTIFIER: #{match}")
+                [:V_TYPE_IDENTIFIER, match]
+              end
+            end
+          end
+        end
+
+        class V_GENERIC_TYPE_IDENTIFIER
+          include Yaparc::Parsable
+          def initialize
+            @parser = lambda do |input|
+              Yaparc::Apply.new(Yaparc::Regex.new(/\A[A-Z][a-zA-Z0-9_]*<[a-zA-Z0-9,_<>]+>/)) do |match|
+                OpenEhr::LOG.debug("V_GENERIC_TYPE_IDENTIFIER: #{match}")
+                [:V_GENERIC_TYPE_IDENTIFIER, match]
+              end
+            end
+          end
+        end
+
+
+        class V_LOCAL_CODE
+          include Yaparc::Parsable
+          def initialize
+            @parser = lambda do |input|
+              Yaparc::Apply.new(Yaparc::Regex.new(/\Aa[ct][0-9.]+/)) do |match|
+                OpenEhr::LOG.debug("V_LOCAL_CODE: #{match}")
+                [:V_LOCAL_CODE, match]
+              end
+            end
+          end
+        end
+
+        class V_STRING
+          include Yaparc::Parsable
+          def initialize
+            @parser = lambda do |input|
+              Yaparc::Apply.new(Yaparc::Regex.new(/\A"([^"]*)"/m)) do |match|
+                OpenEhr::LOG.debug("V_STRING: #{match}")
+                [:V_STRING, match]
+              end
+            end
+          end
+        end
+
+        class V_REAL
+          include Yaparc::Parsable
+          def initialize
+            @parser = lambda do |input|
+              Yaparc::Apply.new(Yaparc::Regex.new(/\A[0-9]+\.[0-9]+|[0-9]+\.[0-9]+[eE][+-]?[0-9]+/)) do |match|
+                OpenEhr::LOG.debug("V_REAL: #{match}")
+                [:V_REAL, match]
+              end
+            end
+          end
+        end
+
+        #V_ISO8601_DURATION PnYnMnWnDTnnHnnMnnS
+        class V_ISO8601_DURATION
+          include Yaparc::Parsable
+          def initialize
+            @parser = lambda do |input|
+              Yaparc::Apply.new(
+                                Yaparc::Alt.new(Yaparc::Regex.new(/\AP([0-9]+|[yY])?([0-9]+|[mM])?([0-9]+|[wW])?([0-9]+|[dD])?T([0-9]+|[hH])?([0-9]+|[mM])?([0-9]+|[sS])?/),
+                                                Yaparc::Regex.new(/\AP([0-9]+|[yY])?([0-9]+|[mM])?([0-9]+|[wW])?([0-9]+|[dD])?/))) do |match|
+                OpenEhr::LOG.debug("V_ISO8601_DURATION: #{match}")
+                [:V_ISO8601_DURATION, match]
+              end
+            end
+          end
+        end
+
+      end # of Common
+
+      module DADL
+        # c.f. http://www.openehr.org/svn/ref_impl_eiffel/TRUNK/components/adl_parser/src/syntax/adl/parser/adl_scanner.l
+        RESERVED = {
+          'true' => :SYM_TRUE, #[Tt][Rr][Uu][Ee] -- -> SYM_TRUE 
+          'false' => :SYM_FALSE, # [Ff][Aa][Ll][Ss][Ee] -- -> SYM_FALSE 
+          'infinity' => :SYM_INFINITY # [Ii][Nn][Ff][Ii][Nn][Ii][Tt][Yy] -- -> SYM_INFINITY 
+        }
+
+        class RootScanner
+          include Yaparc::Parsable
+          def initialize
+            @parser = lambda do |input|
+              Yaparc::Alt.new(Reserved.new,
+                              OpenEhr::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF.new,
+                              OpenEhr::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF.new,
+                              OpenEhr::ADL::Scanner::Common::ERR_V_QUALIFIED_TERM_CODE_REF.new,
+                              OpenEhr::ADL::Scanner::Common::V_TYPE_IDENTIFIER.new,
+                              OpenEhr::ADL::Scanner::Common::V_GENERIC_TYPE_IDENTIFIER.new,
+                              OpenEhr::ADL::Scanner::Common::V_STRING.new,
+                              OpenEhr::ADL::Scanner::Common::V_LOCAL_CODE.new,
+                              OpenEhr::ADL::Scanner::Common::V_REAL.new,
+                              OpenEhr::ADL::Scanner::Common::V_ISO8601_DURATION.new
+                              )
+            end
+          end
+        end
+=begin <DADL::Reserved class>
+=end
+        class Reserved
+          include Yaparc::Parsable
+          
+          def initialize
+            @parser = lambda do |input|
+              reserved_parsers = OpenEhr::ADL::Scanner::DADL::RESERVED.map do |keyword|
+                Yaparc::Tokenize.new(
+                                     Yaparc::Literal.new(keyword[0],false)
+                                     )
+              end
+              Yaparc::Alt.new(Yaparc::Apply.new(Yaparc::Alt.new(*reserved_parsers)) do |match|
+                                OpenEhr::LOG.debug("Reserved: #{match}")
+                                [OpenEhr::ADL::Scanner::DADL::RESERVED[match], OpenEhr::ADL::Scanner::DADL::RESERVED[match]]
+                              end,
+                              Yaparc::Apply.new(Yaparc::Regex.new(/\A[a-z][a-zA-Z0-9_]*/)) do |match|
+                                OpenEhr::LOG.debug("V_ATTRIBUTE_IDENTIFIER: #{match}")
+                                [:V_ATTRIBUTE_IDENTIFIER, match]
+                              end)
+            end
+          end
+        end
+
+
+
+      end # of DADL
+
+      module CADL
+        # c.f. http://www.openehr.org/svn/ref_impl_eiffel/TRUNK/components/adl_parser/src/syntax/cadl/parser/cadl_scanner.l
+        RESERVED = {
+          'ordered' => :SYM_ORDERED, # [Oo][Rr][Dd][Ee][Rr][Ee][Dd]
+          'unordered' => :SYM_UNORDERED, # [Uu][Nn][Oo][Rr][Dd][Ee][Rr][Ee][Dd]
+          'then' => :SYM_THEN, # [Tt][Hh][Ee][Nn]
+          'else' => :SYM_ELSE, # [Ee][Ll][Ss][Ee]
+          'and' => :SYM_AND, # [Aa][Nn][Dd]
+          'or' => :SYM_OR, # [Oo][Rr]
+          'xor' => :SYM_XOR, # [Xx][Oo][Rr]
+          'not' => :SYM_NOT, # [Nn][Oo][Tt]
+          'implies' => :SYM_IMPLIES, # [Ii][Mm][Pp][Ll][Ii][Ee][Ss]
+          'true' => :SYM_TRUE, #[Tt][Rr][Uu][Ee] -- -> SYM_TRUE 
+          'false' => :SYM_FALSE, # [Ff][Aa][Ll][Ss][Ee] -- -> SYM_FALSE 
+          'forall' => :SYM_FORALL, # [Ff][Oo][Rr][_][Aa][Ll][Ll]
+          'exists' => :SYM_EXISTS, # [Ee][Xx][Ii][Ss][Tt][Ss]
+          'existence' => :SYM_EXISTENCE, # [Ee][Xx][Iu][Ss][Tt][Ee][Nn][Cc][Ee]
+          'occurrences' => :SYM_OCCURRENCES, # [Oo][Cc][Cc][Uu][Rr][Rr][Ee][Nn][Cc][Ee][Ss]
+          'cardinality' => :SYM_CARDINALITY, # [Cc][Aa][Rr][Dd][Ii][Nn][Aa][Ll][Ii][Tt][Yy]
+          'unique' => :SYM_UNIQUE, # [Uu][Nn][Ii][Qq][Uu][Ee]
+          'matches' => :SYM_MATCHES, # [Mm][Aa][Tt][Cc][Hh][Ee][Ss]
+          'is_in' => :SYM_MATCHES, # [Ii][Ss][_][Ii][Nn]
+          'invariant' => :SYM_INVARIANT, # [Ii][Nn][Vv][Aa][Rr][Ii][Aa][Nn][Tt]
+          'infinity' => :SYM_INFINITY, # [Ii][Nn][Ff][Ii][Nn][Ii][Tt][Yy] -- -> SYM_INFINITY 
+          'use_node' => :SYM_USE_NODE, # [Uu][Ss][Ee][_][Nn][Oo][Dd][Ee]
+          'use_archetype' => :SYM_ALLOW_ARCHETYPE, # [Uu][Ss][Ee][_][Aa][Rr][Cc][Hh][Ee][Tt][Yy][Pp][Ee]
+          'allow_archetype' => :SYM_ALLOW_ARCHETYPE, # [Aa][Ll][Ll][Oo][Ww][_][Aa][Rr][Cc][Hh][Ee][Tt][Yy][Pp][Ee]
+          'include' => :SYM_INCLUDE, # [Ii][Nn][Cc][Ll][Uu][Dd][Ee]
+          'exclude' => :SYM_EXCLUDE # [Ee][Xx][Cc][Ll][Uu][Dd][Ee]
+        }
+
+        #V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN, /\A[yY][yY][yY][yY]-[mM?X][mM?X]-[dD?X][dD?X][T\t][hH?X][hH?X]:[mM?X][mM?X]:[sS?X][sS?X]/
+        class V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN
+          include Yaparc::Parsable
+          def initialize
+            @parser = lambda do |input|
+              Yaparc::Apply.new(Yaparc::Regex.new(/\A[yY][yY][yY][yY]-[mM?X][mM?X]-[dD?X][dD?X][T\t][hH?X][hH?X]:[mM?X][mM?X]:[sS?X][sS?X]/)) do |match|
+                OpenEhr::LOG.debug("V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN: #{match}")
+                [:V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN, match]
+              end
+            end
+          end
+        end
+
+        #V_ISO8601_DATE_CONSTRAINT_PATTERN  /\A[yY][yY][yY][yY]-[mM?X][mM?X]-[dD?X][dD?X]/
+        class V_ISO8601_DATE_CONSTRAINT_PATTERN
+          include Yaparc::Parsable
+          def initialize
+            @parser = lambda do |input|
+              Yaparc::Apply.new(Yaparc::Regex.new(/\A[yY][yY][yY][yY]-[mM?X][mM?X]-[dD?X][dD?X]/)) do |match|
+                OpenEhr::LOG.debug("V_ISO8601_DATE_CONSTRAINT_PATTERN: #{match}")
+                [:V_ISO8601_DATE_CONSTRAINT_PATTERN, match]
+              end
+            end
+          end
+        end
+
+        #V_ISO8601_TIME_CONSTRAINT_PATTERN /\A[hH][hH]:[mM?X][mM?X]:[sS?X][sS?X]/
+        class V_ISO8601_TIME_CONSTRAINT_PATTERN
+          include Yaparc::Parsable
+          def initialize
+            @parser = lambda do |input|
+              Yaparc::Apply.new(Yaparc::Regex.new(/\A[hH][hH]:[mM?X][mM?X]:[sS?X][sS?X]/)) do |match|
+                OpenEhr::LOG.debug("V_ISO8601_TIME_CONSTRAINT_PATTERN: #{match}")
+                [:V_ISO8601_TIME_CONSTRAINT_PATTERN, match]
+              end
+            end
+          end
+        end
+
+        #V_ISO8601_DURATION_CONSTRAINT_PATTERN 
+        class V_ISO8601_DURATION_CONSTRAINT_PATTERN
+          include Yaparc::Parsable
+          def initialize
+            @parser = lambda do |input|
+              Yaparc::Apply.new(Yaparc::Alt.new(Yaparc::Regex.new(/\AP[yY]?[mM]?[wW]?[dD]?T[hH]?[mM]?[sS]?/),
+                                                Yaparc::Regex.new(/\AP[yY]?[mM]?[wW]?[dD]?/))) do |match|
+                OpenEhr::LOG.debug("V_ISO8601_DURATION_CONSTRAINT_PATTERN: #{match}")
+                [:V_ISO8601_DURATION_CONSTRAINT_PATTERN, match]
+              end
+            end
+          end
+        end
+
+        #V_C_DOMAIN_TYPE /\A[A-Z][a-zA-Z0-9_]*[ \n]*\</
+        class V_C_DOMAIN_TYPE
+          include Yaparc::Parsable
+          def initialize
+            @parser = lambda do |input|
+              Yaparc::Apply.new(Yaparc::Regex.new(/\A[A-Z][a-zA-Z0-9_]*[ \n]*\</)) do |match|
+                OpenEhr::LOG.debug("V_C_DOMAIN_TYPE: #{match}")
+                [:START_V_C_DOMAIN_TYPE_BLOCK, match]
+              end
+            end
+          end
+        end
+
+        class RootScanner
+          include Yaparc::Parsable
+          def initialize
+            @parser = lambda do |input|
+              Yaparc::Alt.new(V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN.new,
+                              V_ISO8601_DATE_CONSTRAINT_PATTERN.new,
+                              V_ISO8601_TIME_CONSTRAINT_PATTERN.new,
+                              OpenEhr::ADL::Scanner::Common::V_ISO8601_DURATION.new,
+                              V_C_DOMAIN_TYPE.new,
+                              V_ISO8601_DURATION_CONSTRAINT_PATTERN.new,
+                              Reserved.new,
+                              OpenEhr::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF.new,
+                              OpenEhr::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF.new,
+                              OpenEhr::ADL::Scanner::Common::ERR_V_QUALIFIED_TERM_CODE_REF.new,
+                              OpenEhr::ADL::Scanner::Common::V_TYPE_IDENTIFIER.new,
+                              OpenEhr::ADL::Scanner::Common::V_GENERIC_TYPE_IDENTIFIER.new,
+                              OpenEhr::ADL::Scanner::Common::V_STRING.new,
+                              OpenEhr::ADL::Scanner::Common::V_LOCAL_CODE.new,
+                              OpenEhr::ADL::Scanner::Common::V_REAL.new,
+                              OpenEhr::ADL::Scanner::Common::V_ISO8601_DURATION.new
+                              )
+            end
+          end
+        end
+
+=begin <CADL::Reserved class>
+=end
+        class Reserved
+          include Yaparc::Parsable
+          
+          def initialize
+            @parser = lambda do |input|
+              orderd_reserved = RESERVED.keys.sort{|x,y| y.length <=> x.length  }
+              reserved_parsers = orderd_reserved.map do |keyword| 
+                Yaparc::Literal.new(keyword,false)
+              end
+              Yaparc::Alt.new(Yaparc::Apply.new(Yaparc::Alt.new(*reserved_parsers)) do |match|
+                                OpenEhr::LOG.debug("Reserved: #{match}")
+                                [OpenEhr::ADL::Scanner::CADL::RESERVED[match], OpenEhr::ADL::Scanner::CADL::RESERVED[match]]
+                              end,
+                              Yaparc::Apply.new(Yaparc::Regex.new(/\A[a-z][a-zA-Z0-9_]*/)) do |match|
+                                OpenEhr::LOG.debug("V_ATTRIBUTE_IDENTIFIER: #{match}")
+                                [:V_ATTRIBUTE_IDENTIFIER, match]
+                              end)
+            end
+          end
+        end
+
+      end
+    end
+  end
+end
Index: /ruby/tags/release-0.5.0/lib/adl_parser/lib/shell.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/lib/shell.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/lib/shell.rb	(revision 367)
@@ -0,0 +1,34 @@
+$:.unshift File.join(File.dirname(__FILE__))
+require 'validator.rb'
+require 'stringio'
+
+module OpenEhr
+  module Application
+    class Shell
+      def run
+        raise 'not implemented'
+      end
+    end
+
+    class ADLValidator < Shell
+      def initialize(validator)
+        @validator = validator
+      end
+
+      def run(input, name = nil)
+        input_stream = case input
+                       when String
+                         StringIO.new(input)
+                       when File
+                         input
+                       when StringIO
+                         input
+                       else
+                         raise
+                       end
+        @validator.validate(input_stream.read, name)
+        input_stream.close
+      end
+    end
+  end
+end
Index: /ruby/tags/release-0.5.0/lib/adl_parser/lib/util.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/lib/util.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/lib/util.rb	(revision 367)
@@ -0,0 +1,6 @@
+
+def assert_at(file,line, message = "")
+  unless yield
+    raise "Assertion failed !: #{file}, #{line}: #{message}"
+  end
+end
Index: /ruby/tags/release-0.5.0/lib/adl_parser/lib/validator.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/lib/validator.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/lib/validator.rb	(revision 367)
@@ -0,0 +1,20 @@
+$:.unshift File.join(File.dirname(__FILE__))
+require 'parser.rb'
+
+
+module OpenEhr
+  module ADL
+
+    class Validator
+      def initialize(parser)
+        @parser = parser
+      end
+
+      def validate(input_string, name = nil)
+        @parser.parse(input_string, name)
+      end
+    end
+
+  end
+end
+
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-ACTION.imaging.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-ACTION.imaging.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-ACTION.imaging.v1.adl	(revision 367)
@@ -0,0 +1,275 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-ACTION.imaging.v1
+
+concept
+	[at0000]	-- Imaging investigation
+language
+	original_language = <[ISO_639-1::en]>
+description
+	original_author = <
+		["name"] = <"Sam Heard">
+		["organisation"] = <"Ocean Informatics">
+		["date"] = <"17/04/2006">
+		["email"] = <"sam.heard@oceaninformatics.biz">
+	>
+	details = <
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"To record actions regarding imaging investigations.">
+			use = <"">
+			keywords = <"Xray", "ultrasound", "MRI", "magnetic resonance", "CT", "scan", "tomography">
+			misuse = <"Not used for recording the findings of the investigation; use openEHR-EHR-OBSERVATION.imaging for the findings.">
+		>
+	>
+	lifecycle_state = <"AuthorDraft">
+	other_contributors = <>
+
+definition
+	ACTION[at0000] matches {	-- Imaging investigation
+		ism_transition matches {
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::524]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0001]}		-- Planned
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::524]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0004]}		-- Requested
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::527]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0002]}		-- Postponed
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::528]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0003]}		-- Cancelled
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::529]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0005]}		-- Appointment made
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::529]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0006]}		-- Resheduled
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::245]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0007]}		-- Commenced
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::245]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0008]}		-- Investigation complete
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::245]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0009]}		-- Reported
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::245]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0011]}		-- Report communicated
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::245]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0012]}		-- Further imaging required
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::530]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0013]}		-- Imaging suspended
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::531]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0014]}		-- Imaging aborted
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::532]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0010]}		-- Completed
+					}
+				}
+			}
+		}
+		description matches {
+			allow_archetype ITEM_TREE occurrences matches {0..1} matches {
+				include
+					archetype_id/value matches {/imaging\.v1/}
+				exclude
+					archetype_id/value matches {/.*/}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["en"] = <
+			items = <
+				["at0000"] = <
+					description = <"An action related to an investigation by an imaging technique">
+					text = <"Imaging investigation">
+				>
+				["at0001"] = <
+					description = <"Imaging investigation is planned">
+					text = <"Planned">
+				>
+				["at0002"] = <
+					description = <"Imaging investigation is postponed">
+					text = <"Postponed">
+				>
+				["at0003"] = <
+					description = <"Imaging investigation is cancelled">
+					text = <"Cancelled">
+				>
+				["at0004"] = <
+					description = <"Imaging investigation has been requested">
+					text = <"Requested">
+				>
+				["at0005"] = <
+					description = <"Imaging investigation scheduled for specific date and time">
+					text = <"Appointment made">
+				>
+				["at0006"] = <
+					description = <"Appointment for imaging investigation has been altered">
+					text = <"Resheduled">
+				>
+				["at0007"] = <
+					description = <"Imaging investigation has commenced">
+					text = <"Commenced">
+				>
+				["at0008"] = <
+					description = <"The imaging investigation has been completed; awaiting report">
+					text = <"Investigation complete">
+				>
+				["at0009"] = <
+					description = <"The imaging investigation has been reported">
+					text = <"Reported">
+				>
+				["at0010"] = <
+					description = <"The imaging investigation is completed and report processed">
+					text = <"Completed">
+				>
+				["at0011"] = <
+					description = <"The imaging investigation has been reported and communicated to the referer">
+					text = <"Report communicated">
+				>
+				["at0012"] = <
+					description = <"The investigator has established that further imaging is required">
+					text = <"Further imaging required">
+				>
+				["at0013"] = <
+					description = <"The imaging was not able to be completed">
+					text = <"Imaging suspended">
+				>
+				["at0014"] = <
+					description = <"The imaging investigation was not and will not be completed.">
+					text = <"Imaging aborted">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-ACTION.referral.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-ACTION.referral.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-ACTION.referral.v1.adl	(revision 367)
@@ -0,0 +1,351 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-ACTION.referral.v1
+
+concept
+	[at0000]	-- Referral actions
+language
+	original_language = <[ISO_639-1::en]>
+	translations = <
+		["de"] = <
+			language = <[ISO_639-1::de]>
+			author = <
+				["name"] = <"Jasmin Buck, Sebastian Garde">
+				["organisation"] = <"University of Heidelberg, Central Queensland University">
+			>
+		>
+	>
+description
+	original_author = <
+		["name"] = <"Sam Heard">
+		["email"] = <"sam.heard@oceaninformatics.biz">
+	>
+	details = <
+		["de"] = <
+			language = <[ISO_639-1::de]>
+			purpose = <"Zur Dokumentation von Handlungen, die auf eine Behandlungsanfrage an einen zweiten Gesundheitsdienstleister basieren">
+			use = <"">
+			misuse = <"">
+		>
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"For recording actions based on a request for a second provider to provide care">
+			use = <"">
+			misuse = <"">
+		>
+	>
+	lifecycle_state = <"NotSet">
+	other_contributors = <>
+
+definition
+	ACTION[at0000] matches {	-- Referral actions
+		ism_transition matches {
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::524]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0001]}		-- Planned
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::524]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0002]}		-- Communicated
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::524]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0003]}		-- Acknowledged
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::527]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0005]}		-- Postponed
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::528]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0006]}		-- Cancelled
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::529]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0004]}		-- Appointment
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::245]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0008]}		-- Attended
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::245]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0009]}		-- Secondary referral
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::245]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0010]}		-- Secondary referral completed
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::245]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0011]}		-- Return of care
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::530]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0007]}		-- Did not attend
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::531]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0013]}		-- No further contact
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::531]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0014]}		-- Multiple 'did not attend'
+					}
+				}
+			}
+			ISM_TRANSITION matches {
+				current_state matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[openehr::532]}
+					}
+				}
+				careflow_step matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::at0012]}		-- Completed
+					}
+				}
+			}
+		}
+		description matches {
+			allow_archetype ITEM_TREE occurrences matches {0..1} matches {
+				include
+					domain_concept matches {/referral\.v1/}
+				exclude
+					domain_concept matches {/.*/}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["de"] = <
+			items = <
+				["at0000"] = <
+					description = <"Zur Dokumentation von Handlungen, die auf eine Behandlungsanfrage an einen zweiten Gesundheitsdienstleister basieren">
+					text = <"Überweisungshandlungen">
+				>
+				["at0001"] = <
+					description = <"Überweisung wurde geplant, aber keine weiter Handlung hat stattgefunden">
+					text = <"Geplant">
+				>
+				["at0002"] = <
+					description = <"Die Anfrage für die Überweisung wurde übermittelt">
+					text = <"Übermittelt">
+				>
+				["at0003"] = <
+					description = <"Die Überweisungsanfrage wurde vom zweiten Gesundheitsdienstleister bestätigt">
+					text = <"Bestätigt">
+				>
+				["at0004"] = <
+					description = <"Ein Termin mit dem zweiten Gesundheitsdienstleister wurde vereinbart">
+					text = <"Termin">
+				>
+				["at0005"] = <
+					description = <"Die Überweisung wurde verschoben, wird aber in der Zukunft durchgeführt werden">
+					text = <"Verschoben">
+				>
+				["at0006"] = <
+					description = <"Die Überweisung wurde gestrichen">
+					text = <"Gestrichen">
+				>
+				["at0007"] = <
+					description = <"Die Person ist zu ihrem Termin nicht erschienen">
+					text = <"Nicht erschienen">
+				>
+				["at0008"] = <
+					description = <"Die Person suchte den zweiten Gesundheitsdienstleister auf">
+					text = <"Erschienen">
+				>
+				["at0009"] = <
+					description = <"Eine Überweisung zu einem dritten Gesundheisdienstleister wurde organisiert">
+					text = <"Zweite Überweisung">
+				>
+				["at0010"] = <
+					description = <"Die zweite Überweisung ist abgeschlossen">
+					text = <"Zweite Überweisung abgeschlossen">
+				>
+				["at0011"] = <
+					description = <"Die Behandlung wurde zurück zum überweisenden Gesundheitsdienstleister gegeben">
+					text = <"Behandlung zurückgegeben">
+				>
+				["at0012"] = <
+					description = <"Der Überweisungsprozess ist abgeschlossen">
+					text = <"Abgeschlossen">
+				>
+				["at0013"] = <
+					description = <"Der Überweisungsprozess ist nicht abgeschlossen, es besteht aber kein Kontakt zum zweiten Gesundheitsdienstleister mehr">
+					text = <"Kein weiterer Kontakt">
+				>
+				["at0014"] = <
+					description = <"Die Person ist zu wiederholten Gelegenheiten nicht erschienen - es werden keine weiteren Termine vereinbart">
+					text = <"Wiederholtes 'nicht erschienen'">
+				>
+			>
+		>
+		["en"] = <
+			items = <
+				["at0000"] = <
+					description = <"Actions arising based on a request for health care from a second health care provider.">
+					text = <"Referral actions">
+				>
+				["at0001"] = <
+					description = <"Referral has been planned but no further action">
+					text = <"Planned">
+				>
+				["at0002"] = <
+					description = <"The request for referral has been communicated">
+					text = <"Communicated">
+				>
+				["at0003"] = <
+					description = <"The referral request has been acknowledged by second provider">
+					text = <"Acknowledged">
+				>
+				["at0004"] = <
+					description = <"An appointment with the second provider has been arranged">
+					text = <"Appointment">
+				>
+				["at0005"] = <
+					description = <"Referral has been postponed but will be organised in the future">
+					text = <"Postponed">
+				>
+				["at0006"] = <
+					description = <"Referral has been cancelled">
+					text = <"Cancelled">
+				>
+				["at0007"] = <
+					description = <"The person did not attend for their appointment">
+					text = <"Did not attend">
+				>
+				["at0008"] = <
+					description = <"The person attended the second provider">
+					text = <"Attended">
+				>
+				["at0009"] = <
+					description = <"Referral to a third provider has been organised">
+					text = <"Secondary referral">
+				>
+				["at0010"] = <
+					description = <"Secondary referral is complete">
+					text = <"Secondary referral completed">
+				>
+				["at0011"] = <
+					description = <"Care is transferred back to referrer">
+					text = <"Return of care">
+				>
+				["at0012"] = <
+					description = <"Referral process is complete">
+					text = <"Completed">
+				>
+				["at0013"] = <
+					description = <"The referral process was not completed but no further contact with second provider is organised">
+					text = <"No further contact">
+				>
+				["at0014"] = <
+					description = <"The person did not attend on multiple occasions - no further appointments will been sent">
+					text = <"Multiple 'did not attend'">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.auscultation-chest.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.auscultation-chest.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.auscultation-chest.v1.adl	(revision 367)
@@ -0,0 +1,765 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-CLUSTER.auscultation-chest.v1
+specialize
+	openEHR-EHR-CLUSTER.auscultation.v1
+
+concept
+	[at0000.1]	-- Auscultation of the chest
+language
+	original_language = <[ISO_639-1::en]>
+description
+	original_author = <
+		["name"] = <"Sam Heard">
+		["organisation"] = <"Ocean Informatics">
+		["date"] = <"7/04/2007">
+		["email"] = <"sam.heard@oceaninformatics.biz">
+	>
+	details = <
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"To record data found on examination of the chest by auscultation/listening">
+			use = <"To be embedded in an openEHR-EHR-OBSERVATION.exam cluster to express findings determined by auscultation of the chest">
+			keywords = <"auscultate", "listen", "auscultation", "listening", "lungs", "chest", "bruit", "heart", "bowel sounds", "breath sounds", "heart sounds">
+			misuse = <"Not for use in any other context at present">
+		>
+	>
+	lifecycle_state = <"Initial">
+	other_contributors = <"Heather Leslie", ...>
+
+definition
+	CLUSTER[at0000.1] matches {	-- Auscultation of the chest
+		items cardinality matches {0..*; unordered} matches {
+			CLUSTER[at0001] occurrences matches {0..1} matches {	-- Normal Statements
+				items cardinality matches {0..*; unordered} matches {
+					ELEMENT[at0003] occurrences matches {0..*} matches {	-- Normal Statement
+						value matches {
+							DV_CODED_TEXT matches {
+								defining_code matches {
+									[local::
+									at0.1, 	-- Clear
+									at0.2, 	-- No rhonchi
+									at0.3, 	-- No wheeze
+									at0.4, 	-- No crepitations
+									at0.5, 	-- No crackles
+									at0.6, 	-- Two heart sounds, no bruits
+									at0.7, 	-- Two heart sounds, no murmurs
+									at0.8, 	-- Two normal heart sounds
+									at0056, 	-- No murmur
+									at0057, 	-- No bruit
+									at0.9, 	-- Normal first heart sound
+									at0.10, 	-- Normal second heart sound
+									at0.11, 	-- No Bronchial breathing
+									at0.12, 	-- No Amphoric breathing
+									at0.13, 	-- Normal Vocal Resonance
+									at0.14, 	-- No abnormal added sounds
+									at0073, 	-- Normal bowel sounds
+									at0085]	-- No abnormality detected
+								}
+							}
+						}
+					}
+				}
+			}
+			ELEMENT[at0004] occurrences matches {0..1} matches {	-- Clinical Description
+				value matches {
+					DV_TEXT matches {*}
+				}
+			}
+			CLUSTER[at0002] occurrences matches {0..1} matches {	-- Findings
+				items cardinality matches {0..*; unordered} matches {
+					CLUSTER[at0.15] occurrences matches {0..1} matches {	-- Heart sounds and bruits
+						items cardinality matches {0..*; unordered} matches {
+							CLUSTER[at0.16] occurrences matches {0..1} matches {	-- First heart sound
+								items cardinality matches {0..*; unordered} matches {
+									ELEMENT[at0.17] occurrences matches {0..1} matches {	-- Volume
+										value matches {
+											0|[local::at0.18], 	-- Not heard
+											1|[local::at0.19], 	-- Variable
+											2|[local::at0.20], 	-- Soft
+											3|[local::at0.21], 	-- Normal
+											4|[local::at0.22]; 	-- Loud
+											0  	-- assumed value
+										}
+									}
+									ELEMENT[at0.23] occurrences matches {0..1} matches {	-- Splitting
+										value matches {
+											DV_CODED_TEXT matches {
+												defining_code matches {
+													[local::
+													at0.24, 	-- No splitting
+													at0.25, 	-- Physiological splitting
+													at0.26, 	-- Fixed splitting
+													at0.27, 	-- Paradoxical splitting
+													at0.28]	-- Exaggerated splitting
+												}
+											}
+										}
+									}
+									use_node ELEMENT /items[at0004]
+								}
+							}
+							CLUSTER[at0.29] occurrences matches {0..1} matches {	-- Second heart sound
+								items cardinality matches {0..*; unordered} matches {
+									use_node ELEMENT /items[at0002]/items[at0.15]/items[at0.16]/items[at0.17]
+									use_node ELEMENT /items[at0002]/items[at0.15]/items[at0.16]/items[at0.23]
+									use_node ELEMENT /items[at0004]
+								}
+							}
+							CLUSTER[at0.75] occurrences matches {0..*} matches {	-- Added heart sound
+								items cardinality matches {0..*; unordered} matches {
+									ELEMENT[at0.76] occurrences matches {0..*} matches {	-- Specific sound
+										value matches {
+											DV_CODED_TEXT matches {
+												defining_code matches {
+													[local::
+													at0.30, 	-- Opening snap
+													at0.32, 	-- Ejection click
+													at0.33, 	-- Pericardial rub
+													at0.57, 	-- Third heart sound
+													at0.58, 	-- Fourth heart sound
+													at0.65, 	-- Prosthetic valve sound
+													at0.66]	-- Gallop rythm
+												}
+											}
+										}
+									}
+									ELEMENT[at0.43] occurrences matches {0..*} matches {	-- Phase of heart cycle
+										value matches {
+											DV_CODED_TEXT matches {
+												defining_code matches {
+													[local::
+													at0.44, 	-- Continuous
+													at0.45, 	-- Systolic
+													at0.46, 	-- Diastolic
+													at0.47, 	-- Pan-systolic
+													at0.48, 	-- Pan-diastolic
+													at0.49, 	-- Early systolic
+													at0.50, 	-- Mid-Systolic
+													at0.51, 	-- Late Systolic
+													at0.52, 	-- Early Diastolic
+													at0.53, 	-- Mid-diastolic
+													at0.54]	-- Late Diastolic
+												}
+											}
+										}
+									}
+									ELEMENT[at0.59] occurrences matches {0..1} matches {	-- Volume
+										value matches {
+											0|[local::at0.60], 	-- Not audible
+											1|[local::at0.61], 	-- Variable
+											2|[local::at0.62], 	-- Soft
+											3|[local::at0.63], 	-- Moderate
+											4|[local::at0.64]; 	-- Loud
+											0  	-- assumed value
+										}
+									}
+									use_node ELEMENT /items[at0004]
+								}
+							}
+							CLUSTER[at0.31] occurrences matches {0..*} matches {	-- Bruits
+								items cardinality matches {0..*; unordered} matches {
+									ELEMENT[at0.35] occurrences matches {0..1} matches {	-- Maximal Location
+										value matches {
+											DV_TEXT matches {*}
+										}
+									}
+									ELEMENT[at0.36] occurrences matches {0..*} matches {	-- Radiation
+										value matches {
+											DV_TEXT matches {*}
+										}
+									}
+									ELEMENT[at0.34] occurrences matches {0..1} matches {	-- Grading
+										value matches {
+											1|[local::at0.37], 	-- Grade 1
+											2|[local::at0.38], 	-- Grade 2
+											3|[local::at0.39], 	-- Grade 3
+											4|[local::at0.40], 	-- Grade 4
+											5|[local::at0.41], 	-- Grade 5
+											6|[local::at0.42]  	-- Grade 6
+										}
+									}
+									ELEMENT[at0.55] occurrences matches {0..1} matches {	-- Character
+										value matches {
+											DV_TEXT matches {*}
+										}
+									}
+									ELEMENT[at0.56] occurrences matches {0..1} matches {	-- Pitch
+										value matches {
+											DV_TEXT matches {*}
+										}
+									}
+									use_node ELEMENT /items[at0002]/items[at0.15]/items[at0.75]/items[at0.43]
+									use_node ELEMENT /items[at0004]
+								}
+							}
+							ELEMENT[at0.67] occurrences matches {0..1} matches {	-- Drawing
+								value matches {
+									DV_MULTIMEDIA matches {
+										media_type matches {
+											[openEHR::
+											425, 
+											426, 
+											427, 
+											428, 
+											429]
+										}
+									}
+								}
+							}
+							ELEMENT[at0.68] occurrences matches {0..1} matches {	-- Phonogram
+								value matches {
+									DV_MULTIMEDIA matches {
+										media_type matches {
+											[openEHR::
+											409, 
+											410]
+										}
+									}
+								}
+							}
+						}
+					}
+					CLUSTER[at0.69] occurrences matches {0..1} matches {	-- Lung
+						items cardinality matches {0..*; unordered} matches {
+							CLUSTER[at0.70] occurrences matches {0..1} matches {	-- Area
+								items cardinality matches {0..*; unordered} matches {
+									ELEMENT[at0.83] occurrences matches {0..1} matches {	-- Region
+										value matches {
+											DV_TEXT matches {*}
+										}
+									}
+									ELEMENT[at0.72] occurrences matches {0..1} matches {	-- Phase of respiratory cycle
+										value matches {
+											DV_CODED_TEXT matches {
+												defining_code matches {
+													[local::
+													at0.73, 	-- Inspiratory
+													at0.74, 	-- Expiratory
+													at0.77, 	-- Early Inspiratory
+													at0.78, 	-- Late inspiratory
+													at0.79, 	-- Early expiratory
+													at0.80]	-- Late expiratory
+												}
+											}
+										}
+									}
+									ELEMENT[at0.81] occurrences matches {0..1} matches {	-- Findings
+										value matches {
+											DV_TEXT matches {*}
+										}
+									}
+								}
+							}
+							ELEMENT[at0.82] occurrences matches {0..1} matches {	-- Drawing
+								value matches {
+									DV_MULTIMEDIA matches {
+										media_type matches {
+											[openEHR::
+											425, 
+											426, 
+											427, 
+											428, 
+											429]
+										}
+									}
+								}
+							}
+							use_node ELEMENT /items[at0004]
+						}
+					}
+					CLUSTER[at0009] occurrences matches {0..1} matches {	-- Bowel sounds
+						items cardinality matches {0..*; unordered} matches {
+							ELEMENT[at0074] occurrences matches {0..*} matches {	-- Specific Findings
+								value matches {
+									DV_CODED_TEXT matches {
+										defining_code matches {
+											[local::
+											at0078, 	-- Absent bowel sounds
+											at0079, 	-- Decreased bowel sounds
+											at0080, 	-- Increased bowel sounds
+											at0081]	-- Tinkling bowel sounds
+										}
+									}
+								}
+							}
+							use_node ELEMENT /items[at0004]
+						}
+					}
+					CLUSTER[at0010] occurrences matches {0..1} matches {	-- Vessel bruit
+						items cardinality matches {0..*; unordered} matches {
+							ELEMENT[at0088] matches {	-- Vessel name
+								value matches {
+									DV_TEXT matches {*}
+								}
+							}
+							ELEMENT[at0030] occurrences matches {0..1} matches {	-- Maximal Location
+								value matches {
+									DV_TEXT matches {*}
+								}
+							}
+							ELEMENT[at0091] occurrences matches {0..1} matches {	-- Description
+								value matches {
+									DV_TEXT matches {*}
+								}
+							}
+						}
+					}
+					CLUSTER[at0089] occurrences matches {0..1} matches {	-- Other sounds
+						items cardinality matches {0..*; unordered} matches {
+							ELEMENT[at0090] matches {	-- Description
+								value matches {
+									DV_TEXT matches {*}
+								}
+							}
+							use_node ELEMENT /items[at0002]/items[at0010]/items[at0030]
+						}
+					}
+					CLUSTER[at0086] occurrences matches {0..*} matches {	-- Localised auscultation
+						items cardinality matches {0..*; unordered} matches {
+							ELEMENT[at0087] matches {	-- Site or region
+								value matches {
+									DV_TEXT matches {*}
+								}
+							}
+							allow_archetype CLUSTER occurrences matches {0..1} matches {
+								include
+									archetype_id/value matches {/auscultation\.v1/}
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["en"] = <
+			items = <
+				["at0.1"] = <
+					description = <"No abnormal breath sounds">
+					text = <"Clear">
+				>
+				["at0.10"] = <
+					description = <"*">
+					text = <"Normal second heart sound">
+				>
+				["at0.11"] = <
+					description = <"*">
+					text = <"No Bronchial breathing">
+				>
+				["at0.12"] = <
+					description = <"*">
+					text = <"No Amphoric breathing">
+				>
+				["at0.13"] = <
+					description = <"*">
+					text = <"Normal Vocal Resonance">
+				>
+				["at0.14"] = <
+					description = <"*">
+					text = <"No abnormal added sounds">
+				>
+				["at0.15"] = <
+					description = <"*">
+					text = <"Heart sounds and bruits">
+				>
+				["at0.16"] = <
+					description = <"Findings about the first heart sound">
+					text = <"First heart sound">
+				>
+				["at0.17"] = <
+					description = <"The volume of the first heart sound">
+					text = <"Volume">
+				>
+				["at0.18"] = <
+					description = <"The first heart sound is not heard">
+					text = <"Not heard">
+				>
+				["at0.19"] = <
+					description = <"The sound is variable in volume">
+					text = <"Variable">
+				>
+				["at0.2"] = <
+					description = <"No high or low pitched wheezes">
+					text = <"No rhonchi">
+				>
+				["at0.20"] = <
+					description = <"The sound is softer than normal">
+					text = <"Soft">
+				>
+				["at0.21"] = <
+					description = <"The sound is of normal volume">
+					text = <"Normal">
+				>
+				["at0.22"] = <
+					description = <"The volume is increased">
+					text = <"Loud">
+				>
+				["at0.23"] = <
+					description = <"Splitting of the heart sound">
+					text = <"Splitting">
+				>
+				["at0.24"] = <
+					description = <"The heart sound is not split">
+					text = <"No splitting">
+				>
+				["at0.25"] = <
+					description = <"The heart sound is split due to physiological changes">
+					text = <"Physiological splitting">
+				>
+				["at0.26"] = <
+					description = <"The heart sound is always split">
+					text = <"Fixed splitting">
+				>
+				["at0.27"] = <
+					description = <"The variable splitting is not physiological">
+					text = <"Paradoxical splitting">
+				>
+				["at0.28"] = <
+					description = <"The timing of the splitting is physiological but it is more obvious than normal">
+					text = <"Exaggerated splitting">
+				>
+				["at0.29"] = <
+					description = <"Findings about the second heart sound">
+					text = <"Second heart sound">
+				>
+				["at0.3"] = <
+					description = <"No wheezing noises">
+					text = <"No wheeze">
+				>
+				["at0.30"] = <
+					description = <"Opening sound of the mitral valve">
+					text = <"Opening snap">
+				>
+				["at0.31"] = <
+					description = <"Group of findings about auscultation of the heart">
+					text = <"Bruits">
+				>
+				["at0.32"] = <
+					description = <"Systolic click when the heart contracts">
+					text = <"Ejection click">
+				>
+				["at0.33"] = <
+					description = <"Rubbing noise during contractions on the pericardium">
+					text = <"Pericardial rub">
+				>
+				["at0.34"] = <
+					description = <"Grading of the loudness of a heart murmur">
+					text = <"Grading">
+				>
+				["at0.35"] = <
+					description = <"Site where finding is heard maximally">
+					text = <"Maximal Location">
+				>
+				["at0.36"] = <
+					description = <"Sites where finding is heard in addition to maximal site">
+					text = <"Radiation">
+				>
+				["at0.37"] = <
+					description = <"very faint to recognize the murmur even after listening for a while">
+					text = <"Grade 1">
+				>
+				["at0.38"] = <
+					description = <"faint, but easy to recognize the murmur right after the stethoscope is placed on the chest">
+					text = <"Grade 2">
+				>
+				["at0.39"] = <
+					description = <"intermediate loudness between II/VI -IV/VI">
+					text = <"Grade 3">
+				>
+				["at0.4"] = <
+					description = <"No high pitched crackling sounds">
+					text = <"No crepitations">
+				>
+				["at0.40"] = <
+					description = <"with loud murmur (palpable thrill)">
+					text = <"Grade 4">
+				>
+				["at0.41"] = <
+					description = <"very loud, but you can not hear the murmur, if the stethoscope is away from the chest wall">
+					text = <"Grade 5">
+				>
+				["at0.42"] = <
+					description = <"the loudest murmur you can hear, even if the stethoscope is off the chest wall">
+					text = <"Grade 6">
+				>
+				["at0.43"] = <
+					description = <"The timing in relation to the contraction of the heart">
+					text = <"Phase of heart cycle">
+				>
+				["at0.44"] = <
+					description = <"*">
+					text = <"Continuous">
+				>
+				["at0.45"] = <
+					description = <"*">
+					text = <"Systolic">
+				>
+				["at0.46"] = <
+					description = <"*">
+					text = <"Diastolic">
+				>
+				["at0.47"] = <
+					description = <"*">
+					text = <"Pan-systolic">
+				>
+				["at0.48"] = <
+					description = <"*">
+					text = <"Pan-diastolic">
+				>
+				["at0.49"] = <
+					description = <"*">
+					text = <"Early systolic">
+				>
+				["at0.5"] = <
+					description = <"No high pitched crackling sounds">
+					text = <"No crackles">
+				>
+				["at0.50"] = <
+					description = <"*">
+					text = <"Mid-Systolic">
+				>
+				["at0.51"] = <
+					description = <"*">
+					text = <"Late Systolic">
+				>
+				["at0.52"] = <
+					description = <"*">
+					text = <"Early Diastolic">
+				>
+				["at0.53"] = <
+					description = <"*">
+					text = <"Mid-diastolic">
+				>
+				["at0.54"] = <
+					description = <"*">
+					text = <"Late Diastolic">
+				>
+				["at0.55"] = <
+					description = <"The character of the sound">
+					text = <"Character">
+				>
+				["at0.56"] = <
+					description = <"The pitch of the sound">
+					text = <"Pitch">
+				>
+				["at0.57"] = <
+					description = <"A heart sound in early diastole">
+					text = <"Third heart sound">
+				>
+				["at0.58"] = <
+					description = <"A heart sound in late diastole">
+					text = <"Fourth heart sound">
+				>
+				["at0.59"] = <
+					description = <"The volume of the sound">
+					text = <"Volume">
+				>
+				["at0.6"] = <
+					description = <"Normal heart sounds">
+					text = <"Two heart sounds, no bruits">
+				>
+				["at0.60"] = <
+					description = <"The sound is not audible">
+					text = <"Not audible">
+				>
+				["at0.61"] = <
+					description = <"The sound is variable">
+					text = <"Variable">
+				>
+				["at0.62"] = <
+					description = <"The sound is soft">
+					text = <"Soft">
+				>
+				["at0.63"] = <
+					description = <"The sound is at about the expected level the first heart sound">
+					text = <"Moderate">
+				>
+				["at0.64"] = <
+					description = <"The sound is louder than the first heart sound">
+					text = <"Loud">
+				>
+				["at0.65"] = <
+					description = <"Sound due to a prosthetic heart valve">
+					text = <"Prosthetic valve sound">
+				>
+				["at0.66"] = <
+					description = <"Audible rythm similar to a horse galloping due to added heart sounds">
+					text = <"Gallop rythm">
+				>
+				["at0.67"] = <
+					description = <"Drawing of the sounds of the heart">
+					text = <"Drawing">
+				>
+				["at0.68"] = <
+					description = <"Recording of the heart sounds">
+					text = <"Phonogram">
+				>
+				["at0.69"] = <
+					description = <"Group of findings about auscultation of the lung">
+					text = <"Lung">
+				>
+				["at0.7"] = <
+					description = <"Normal heart sounds">
+					text = <"Two heart sounds, no murmurs">
+				>
+				["at0.70"] = <
+					description = <"*">
+					text = <"Area">
+				>
+				["at0.72"] = <
+					description = <"The timing of the sounds in relation to breathing">
+					text = <"Phase of respiratory cycle">
+				>
+				["at0.73"] = <
+					description = <"During inspiration">
+					text = <"Inspiratory">
+				>
+				["at0.74"] = <
+					description = <"During expiration">
+					text = <"Expiratory">
+				>
+				["at0.75"] = <
+					description = <"A grouping of discription of one or more added heart sounds">
+					text = <"Added heart sound">
+				>
+				["at0.76"] = <
+					description = <"Specific auscultatory findings related to examination of the heart">
+					text = <"Specific sound">
+				>
+				["at0.77"] = <
+					description = <"Soon after inspiration begins">
+					text = <"Early Inspiratory">
+				>
+				["at0.78"] = <
+					description = <"At the final stages of inspiration">
+					text = <"Late inspiratory">
+				>
+				["at0.79"] = <
+					description = <"Soon after expiration begins">
+					text = <"Early expiratory">
+				>
+				["at0.8"] = <
+					description = <"*">
+					text = <"Two normal heart sounds">
+				>
+				["at0.80"] = <
+					description = <"At the late stages of expiration">
+					text = <"Late expiratory">
+				>
+				["at0.81"] = <
+					description = <"Specific auscultatory findings related to examination of the lungs">
+					text = <"Findings">
+				>
+				["at0.82"] = <
+					description = <"Drawing of the breath sounds">
+					text = <"Drawing">
+				>
+				["at0.83"] = <
+					description = <"The region to which the findings relate">
+					text = <"Region">
+				>
+				["at0.9"] = <
+					description = <"*">
+					text = <"Normal first heart sound">
+				>
+				["at0000"] = <
+					description = <"Findings on Auscultation">
+					text = <"Auscultation">
+				>
+				["at0000.1"] = <
+					description = <"Findings on auscultation of the chest">
+					text = <"Auscultation of the chest">
+				>
+				["at0001"] = <
+					description = <"A group of statements about the normality of auscultation">
+					text = <"Normal Statements">
+				>
+				["at0002"] = <
+					description = <"Findings on auscultation">
+					text = <"Findings">
+				>
+				["at0003"] = <
+					description = <"Statements about the normality of the auscultation">
+					text = <"Normal Statement">
+				>
+				["at0004"] = <
+					description = <"Detailed clinical description of the findings on auscultation">
+					text = <"Clinical Description">
+				>
+				["at0009"] = <
+					description = <"Group of findings about auscultation of the bowel">
+					text = <"Bowel sounds">
+				>
+				["at0010"] = <
+					description = <"Group of findings about auscultation of a major blood vessel">
+					text = <"Vessel bruit">
+				>
+				["at0030"] = <
+					description = <"Site where finding is heard maximally">
+					text = <"Maximal Location">
+				>
+				["at0056"] = <
+					description = <"No murmur is heard">
+					text = <"No murmur">
+				>
+				["at0057"] = <
+					description = <"No bruit is heard">
+					text = <"No bruit">
+				>
+				["at0073"] = <
+					description = <"Bowel sounds are normal in intensity and character">
+					text = <"Normal bowel sounds">
+				>
+				["at0074"] = <
+					description = <"Specific auscultatory findings related to examination of the bowels">
+					text = <"Specific Findings">
+				>
+				["at0078"] = <
+					description = <"No bowel sounds can be heard">
+					text = <"Absent bowel sounds">
+				>
+				["at0079"] = <
+					description = <"Bowel sounds are less than normal">
+					text = <"Decreased bowel sounds">
+				>
+				["at0080"] = <
+					description = <"Bowel sounds are more intense than normal">
+					text = <"Increased bowel sounds">
+				>
+				["at0081"] = <
+					description = <"High pitched and very frequent bowel sounds can be heard">
+					text = <"Tinkling bowel sounds">
+				>
+				["at0085"] = <
+					description = <"Nothing abnormal on auscultation">
+					text = <"No abnormality detected">
+				>
+				["at0086"] = <
+					description = <"Auscultation in a particular site">
+					text = <"Localised auscultation">
+				>
+				["at0087"] = <
+					description = <"The site of the localised findings">
+					text = <"Site or region">
+				>
+				["at0088"] = <
+					description = <"The name of the vessel to which is being listened">
+					text = <"Vessel name">
+				>
+				["at0089"] = <
+					description = <"Recording of sounds of a different nature">
+					text = <"Other sounds">
+				>
+				["at0090"] = <
+					description = <"Description of other sounds">
+					text = <"Description">
+				>
+				["at0091"] = <
+					description = <"Description of the bruit">
+					text = <"Description">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.auscultation.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.auscultation.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.auscultation.v1.adl	(revision 367)
@@ -0,0 +1,217 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-CLUSTER.auscultation.v1
+
+concept
+	[at0000]	-- Auscultation
+language
+	original_language = <[ISO_639-1::en]>
+description
+	original_author = <
+		["name"] = <"Sam Heard">
+		["organisation"] = <"Ocean Informatics">
+		["date"] = <"7/04/2007">
+		["email"] = <"sam.heard@oceaninformatics.biz">
+	>
+	details = <
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"To record data found on examination by auscultation/listening">
+			use = <"To be embedded in an openEHR-EHR-OBSERVATION.exam cluster to express findings determined by auscultation">
+			keywords = <"auscultate", "listen", "auscultation", "listening", "bruit", "bowel sounds", "sounds">
+			misuse = <"Not for use in any other context at present">
+		>
+	>
+	lifecycle_state = <"OrganisationDraft">
+	other_contributors = <"Heather Leslie", ...>
+
+definition
+	CLUSTER[at0000] matches {	-- Auscultation
+		items cardinality matches {0..*; unordered} matches {
+			CLUSTER[at0001] occurrences matches {0..1} matches {	-- Normal Statements
+				items cardinality matches {0..*; unordered} matches {
+					ELEMENT[at0003] occurrences matches {0..*} matches {	-- Normal Statement
+						value matches {
+							DV_CODED_TEXT matches {
+								defining_code matches {
+									[local::
+									at0056, 	-- No murmur
+									at0057, 	-- No bruit
+									at0073, 	-- Normal bowel sounds
+									at0085]	-- No abnormality detected
+								}
+							}
+						}
+					}
+				}
+			}
+			ELEMENT[at0004] occurrences matches {0..1} matches {	-- Clinical Description
+				value matches {
+					DV_TEXT matches {*}
+				}
+			}
+			CLUSTER[at0002] occurrences matches {0..1} matches {	-- Findings
+				items cardinality matches {0..*; unordered} matches {
+					CLUSTER[at0009] occurrences matches {0..1} matches {	-- Bowel sounds
+						items cardinality matches {0..*; unordered} matches {
+							ELEMENT[at0074] occurrences matches {0..*} matches {	-- Specific Findings
+								value matches {
+									DV_CODED_TEXT matches {
+										defining_code matches {
+											[local::
+											at0078, 	-- Absent bowel sounds
+											at0079, 	-- Decreased bowel sounds
+											at0080, 	-- Increased bowel sounds
+											at0081]	-- Tinkling bowel sounds
+										}
+									}
+								}
+							}
+							use_node ELEMENT /items[at0004]
+						}
+					}
+					CLUSTER[at0010] occurrences matches {0..1} matches {	-- Vessel bruit
+						items cardinality matches {0..*; unordered} matches {
+							ELEMENT[at0088] matches {	-- Vessel name
+								value matches {
+									DV_TEXT matches {*}
+								}
+							}
+							ELEMENT[at0030] occurrences matches {0..1} matches {	-- Maximal Location
+								value matches {
+									DV_TEXT matches {*}
+								}
+							}
+							ELEMENT[at0091] occurrences matches {0..1} matches {	-- Description
+								value matches {
+									DV_TEXT matches {*}
+								}
+							}
+						}
+					}
+					CLUSTER[at0089] occurrences matches {0..1} matches {	-- Other sounds
+						items cardinality matches {0..*; unordered} matches {
+							ELEMENT[at0090] matches {	-- Description
+								value matches {
+									DV_TEXT matches {*}
+								}
+							}
+							use_node ELEMENT /items[at0002]/items[at0010]/items[at0030]
+						}
+					}
+					CLUSTER[at0086] occurrences matches {0..*} matches {	-- Localised auscultation
+						items cardinality matches {0..*; unordered} matches {
+							ELEMENT[at0087] matches {	-- Site or region
+								value matches {
+									DV_TEXT matches {*}
+								}
+							}
+							allow_archetype CLUSTER occurrences matches {0..1} matches {
+								include
+									archetype_id/value matches {/auscultation\.v1/}
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["en"] = <
+			items = <
+				["at0000"] = <
+					description = <"Findings on Auscultation">
+					text = <"Auscultation">
+				>
+				["at0001"] = <
+					description = <"A group of statements about the normality of auscultation">
+					text = <"Normal Statements">
+				>
+				["at0002"] = <
+					description = <"Findings on auscultation">
+					text = <"Findings">
+				>
+				["at0003"] = <
+					description = <"Statements about the normality of the auscultation">
+					text = <"Normal Statement">
+				>
+				["at0004"] = <
+					description = <"Detailed clinical description of the findings on auscultation">
+					text = <"Clinical Description">
+				>
+				["at0009"] = <
+					description = <"Group of findings about auscultation of the bowel">
+					text = <"Bowel sounds">
+				>
+				["at0010"] = <
+					description = <"Group of findings about auscultation of a major blood vessel">
+					text = <"Vessel bruit">
+				>
+				["at0030"] = <
+					description = <"Site where finding is heard maximally">
+					text = <"Maximal Location">
+				>
+				["at0056"] = <
+					description = <"No murmur is heard">
+					text = <"No murmur">
+				>
+				["at0057"] = <
+					description = <"No bruit is heard">
+					text = <"No bruit">
+				>
+				["at0073"] = <
+					description = <"Bowel sounds are normal in intensity and character">
+					text = <"Normal bowel sounds">
+				>
+				["at0074"] = <
+					description = <"Specific auscultatory findings related to examination of the bowels">
+					text = <"Specific Findings">
+				>
+				["at0078"] = <
+					description = <"No bowel sounds can be heard">
+					text = <"Absent bowel sounds">
+				>
+				["at0079"] = <
+					description = <"Bowel sounds are less than normal">
+					text = <"Decreased bowel sounds">
+				>
+				["at0080"] = <
+					description = <"Bowel sounds are more intense than normal">
+					text = <"Increased bowel sounds">
+				>
+				["at0081"] = <
+					description = <"High pitched and very frequent bowel sounds can be heard">
+					text = <"Tinkling bowel sounds">
+				>
+				["at0085"] = <
+					description = <"Nothing abnormal on auscultation">
+					text = <"No abnormality detected">
+				>
+				["at0086"] = <
+					description = <"Auscultation in a particular site">
+					text = <"Localised auscultation">
+				>
+				["at0087"] = <
+					description = <"The site of the localised findings">
+					text = <"Site or region">
+				>
+				["at0088"] = <
+					description = <"The name of the vessel to which is being listened">
+					text = <"Vessel name">
+				>
+				["at0089"] = <
+					description = <"Recording of sounds of a different nature">
+					text = <"Other sounds">
+				>
+				["at0090"] = <
+					description = <"Description of other sounds">
+					text = <"Description">
+				>
+				["at0091"] = <
+					description = <"Description of the bruit">
+					text = <"Description">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.dimensions-circumference.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.dimensions-circumference.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.dimensions-circumference.v1.adl	(revision 367)
@@ -0,0 +1,134 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-CLUSTER.dimensions-circumference.v1
+specialize
+	openEHR-EHR-CLUSTER.dimensions.v1
+
+concept
+	[at0000.1]	-- Circumference
+language
+	original_language = <[ISO_639-1::en]>
+	translations = <
+		["de"] = <
+			language = <[ISO_639-1::de]>
+			author = <
+				["name"] = <"Jasmin Buck, Sebastian Garde">
+				["organisation"] = <"University of Heidelberg, Central Queensland University">
+			>
+		>
+	>
+description
+	original_author = <
+		["name"] = <"unknown">
+	>
+	details = <
+		["de"] = <
+			language = <[ISO_639-1::de]>
+			purpose = <"Zur Beschreibung der Umfangs eines betrachteten Körperteils.">
+			use = <"Zur Messung des Umfangs von Körperteilen, wie Taille oder Kopfumfang">
+			keywords = <"Umfang", ...>
+			misuse = <"">
+		>
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"To describe the circumference of a body part examined">
+			use = <"For use when measuring the circumference of body parts such as waist, head circumference">
+			keywords = <"circumference", ...>
+			misuse = <"">
+		>
+	>
+	lifecycle_state = <"OrganisationDraft">
+	other_contributors = <>
+
+definition
+	CLUSTER[at0000.1] matches {	-- Circumference
+		items cardinality matches {0..*; unordered} matches {
+			ELEMENT[at0001] occurrences matches {0..1} matches {	-- Circumference
+				value matches {
+					C_DV_QUANTITY <
+						property = <[openehr::122]>
+						list = <
+							["1"] = <
+								units = <"cm">
+							>
+						>
+					>
+				}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["de"] = <
+			items = <
+				["at0000"] = <
+					description = <"Die Ausmaße eines betrachteten Teils">
+					text = <"Ausmaße">
+				>
+				["at0000.1"] = <
+					description = <"Der Umfang des betrachteten Körperteils">
+					text = <"Umfang">
+				>
+				["at0001"] = <
+					description = <"Der Umfang des betrachteten Teils">
+					text = <"Umfang">
+				>
+				["at0002"] = <
+					description = <"Die Länge des betrachteten Teils (longidudinale Körperachse)">
+					text = <"Länge">
+				>
+				["at0003"] = <
+					description = <"Die Breite oder Weite (transversale Körperachse)">
+					text = <"Breite">
+				>
+				["at0004"] = <
+					description = <"Die Tiefe des betrachteten Teils (dorsal-ventrale Körperachse)">
+					text = <"Tiefe">
+				>
+				["at0005"] = <
+					description = <"Die Fläche des betrachteten Teils">
+					text = <"Fläche">
+				>
+				["at0006"] = <
+					description = <"Das Volumen des betrachteten Teils">
+					text = <"Volumen">
+				>
+			>
+		>
+		["en"] = <
+			items = <
+				["at0000"] = <
+					description = <"The physical dimensions of a part examined">
+					text = <"Dimensions">
+				>
+				["at0000.1"] = <
+					description = <"The circumference of the body part examined">
+					text = <"Circumference">
+				>
+				["at0001"] = <
+					description = <"The circumference of the part examined">
+					text = <"Circumference">
+				>
+				["at0002"] = <
+					description = <"The length of the part examined (longitudinal anatomical axis)">
+					text = <"Length">
+				>
+				["at0003"] = <
+					description = <"The width or breadth (transverse anatomical axis)">
+					text = <"Breadth">
+				>
+				["at0004"] = <
+					description = <"The depth of the part examined (dorso-ventral anatomical axis)">
+					text = <"Depth">
+				>
+				["at0005"] = <
+					description = <"The area of the part examined">
+					text = <"Area">
+				>
+				["at0006"] = <
+					description = <"The volume of the part examined">
+					text = <"Volume">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.dimensions.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.dimensions.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.dimensions.v1.adl	(revision 367)
@@ -0,0 +1,241 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-CLUSTER.dimensions.v1
+
+concept
+	[at0000]	-- Dimensions
+language
+	original_language = <[ISO_639-1::en]>
+	translations = <
+		["de"] = <
+			language = <[ISO_639-1::de]>
+			author = <
+				["name"] = <"Jasmin Buck, Sebastian Garde">
+				["organisation"] = <"University of Heidelberg, Central Queensland University">
+			>
+		>
+	>
+description
+	original_author = <
+		["name"] = <"unknown">
+	>
+	details = <
+		["de"] = <
+			language = <[ISO_639-1::de]>
+			purpose = <"Zur Beschreibung der Ausmaße eines betrachteten Teils.">
+			use = <"">
+			keywords = <"Größe", "Volumen">
+			misuse = <"">
+		>
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"To describe the dimensions of a part examined or viewed">
+			use = <"">
+			keywords = <"size", "volume">
+			misuse = <"">
+		>
+	>
+	lifecycle_state = <"Initial">
+	other_contributors = <>
+
+definition
+	CLUSTER[at0000] matches {	-- Dimensions
+		items cardinality matches {0..*; unordered} matches {
+			ELEMENT[at0001] occurrences matches {0..1} matches {	-- Circumference
+				value matches {
+					C_DV_QUANTITY <
+						property = <[openehr::122]>
+						list = <
+							["1"] = <
+								units = <"µm">
+							>
+							["2"] = <
+								units = <"mm">
+							>
+							["3"] = <
+								units = <"cm">
+							>
+							["4"] = <
+								units = <"m">
+							>
+						>
+					>
+				}
+			}
+			ELEMENT[at0002] occurrences matches {0..1} matches {	-- Length
+				value matches {
+					C_DV_QUANTITY <
+						property = <[openehr::122]>
+						list = <
+							["1"] = <
+								units = <"µm">
+							>
+							["2"] = <
+								units = <"mm">
+							>
+							["3"] = <
+								units = <"cm">
+							>
+							["4"] = <
+								units = <"m">
+							>
+						>
+					>
+				}
+			}
+			ELEMENT[at0003] occurrences matches {0..1} matches {	-- Breadth
+				value matches {
+					C_DV_QUANTITY <
+						property = <[openehr::122]>
+						list = <
+							["1"] = <
+								units = <"µm">
+							>
+							["2"] = <
+								units = <"mm">
+							>
+							["3"] = <
+								units = <"cm">
+							>
+							["4"] = <
+								units = <"m">
+							>
+						>
+					>
+				}
+			}
+			ELEMENT[at0004] occurrences matches {0..1} matches {	-- Depth
+				value matches {
+					C_DV_QUANTITY <
+						property = <[openehr::122]>
+						list = <
+							["1"] = <
+								units = <"µm">
+							>
+							["2"] = <
+								units = <"mm">
+							>
+							["3"] = <
+								units = <"cm">
+							>
+							["4"] = <
+								units = <"m">
+							>
+						>
+					>
+				}
+			}
+			ELEMENT[at0005] occurrences matches {0..1} matches {	-- Area
+				value matches {
+					C_DV_QUANTITY <
+						property = <[openehr::335]>
+						list = <
+							["1"] = <
+								units = <"mm2">
+							>
+							["2"] = <
+								units = <"cm2">
+							>
+							["3"] = <
+								units = <"% body">
+							>
+							["4"] = <
+								units = <"% head, neck">
+							>
+							["5"] = <
+								units = <"% lower limb">
+							>
+							["6"] = <
+								units = <"% trunk">
+							>
+							["7"] = <
+								units = <"% upper limb">
+							>
+						>
+					>
+				}
+			}
+			ELEMENT[at0006] occurrences matches {0..1} matches {	-- Volume
+				value matches {
+					C_DV_QUANTITY <
+						property = <[openehr::129]>
+						list = <
+							["1"] = <
+								units = <"mm3">
+							>
+							["2"] = <
+								units = <"ml">
+							>
+						>
+					>
+				}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["de"] = <
+			items = <
+				["at0000"] = <
+					description = <"Die Ausmaße eines betrachteten Teils">
+					text = <"Ausmaße">
+				>
+				["at0001"] = <
+					description = <"Der Umfang des betrachteten Teils">
+					text = <"Umfang">
+				>
+				["at0002"] = <
+					description = <"Die Länge des betrachteten Teils (longidudinale Körperachse)">
+					text = <"Länge">
+				>
+				["at0003"] = <
+					description = <"Die Breite oder Weite (transversale Körperachse)">
+					text = <"Breite">
+				>
+				["at0004"] = <
+					description = <"Die Tiefe des betrachteten Teils (dorsal-ventrale Körperachse)">
+					text = <"Tiefe">
+				>
+				["at0005"] = <
+					description = <"Die Fläche des betrachteten Teils">
+					text = <"Fläche">
+				>
+				["at0006"] = <
+					description = <"Das Volumen des betrachteten Teils">
+					text = <"Volumen">
+				>
+			>
+		>
+		["en"] = <
+			items = <
+				["at0000"] = <
+					description = <"The physical dimensions of a part examined">
+					text = <"Dimensions">
+				>
+				["at0001"] = <
+					description = <"The circumference of the part examined">
+					text = <"Circumference">
+				>
+				["at0002"] = <
+					description = <"The length of the part examined (longitudinal anatomical axis)">
+					text = <"Length">
+				>
+				["at0003"] = <
+					description = <"The width or breadth (transverse anatomical axis)">
+					text = <"Breadth">
+				>
+				["at0004"] = <
+					description = <"The depth of the part examined (dorso-ventral anatomical axis)">
+					text = <"Depth">
+				>
+				["at0005"] = <
+					description = <"The area of the part examined">
+					text = <"Area">
+				>
+				["at0006"] = <
+					description = <"The volume of the part examined">
+					text = <"Volume">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-abdomen.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-abdomen.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-abdomen.v1.adl	(revision 367)
@@ -0,0 +1,321 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-CLUSTER.exam-abdomen.v1
+specialize
+	openEHR-EHR-CLUSTER.exam.v1
+
+concept
+	[at0000.1]	-- Examination of the abdomen
+language
+	original_language = <[ISO_639-1::en]>
+description
+	original_author = <
+		["name"] = <"Heather Leslie">
+		["organisation"] = <"Ocean Informatics">
+		["date"] = <"11/04/2007">
+		["email"] = <"heather.leslie@oceaninformatics.biz">
+	>
+	details = <
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"A cluster for recording findings on physical examination of the abdomen">
+			use = <"">
+			keywords = <"examination", "physical">
+			misuse = <"">
+		>
+	>
+	lifecycle_state = <"Initial">
+	other_contributors = <>
+
+definition
+	CLUSTER[at0000.1] matches {	-- Examination of the abdomen
+		items cardinality matches {0..*; unordered} matches {
+			CLUSTER[at0004] occurrences matches {0..1} matches {	-- Normal statements
+				items cardinality matches {0..*; unordered} matches {
+					ELEMENT[at0005] occurrences matches {0..*} matches {	-- Normal statement
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+				}
+			}
+			ELEMENT[at0002] occurrences matches {0..1} matches {	-- Clinical description
+				value matches {
+					DV_TEXT matches {*}
+				}
+			}
+			CLUSTER[at0008] occurrences matches {0..1} matches {	-- Findings
+				items cardinality matches {0..*; unordered} matches {
+					CLUSTER[at0.2] occurrences matches {0..1} matches {	-- Abdominal wall
+						items cardinality matches {0..*; unordered} matches {
+							ELEMENT[at0.3] occurrences matches {0..1} matches {	-- Description
+								value matches {
+									DV_CODED_TEXT matches {
+										defining_code matches {[local::]}
+									}
+								}
+							}
+							allow_archetype CLUSTER occurrences matches {0..1} matches {
+								include
+									archetype_id/value matches {/inspection\.v1draft/}
+									archetype_id/value matches {/exam-generic-mass\.v1/}
+									archetype_id/value matches {/palpation\.v1/}
+									archetype_id/value matches {/inspection-skin\.v1draft/}
+									archetype_id/value matches {/exam-generic-lymphnode\.v1/}
+							}
+						}
+					}
+					CLUSTER[at0.9] occurrences matches {0..1} matches {	-- Abdominal Region
+						items cardinality matches {0..*; unordered} matches {
+							ELEMENT[at0.10] occurrences matches {0..1} matches {	-- Region
+								value matches {
+									DV_CODED_TEXT matches {
+										defining_code matches {
+											[local::
+											at0.11, 	-- Left upper quadrant
+											at0.12, 	-- Epigastrium
+											at0.16, 	-- Left upper quadrant
+											at0.17, 	-- Right loin
+											at0.18, 	-- Central/peri-umbilical
+											at0.19, 	-- Left loin
+											at0.20, 	-- Right iliac fossa
+											at0.21]	-- Left iliac fossa
+										}
+									}
+								}
+							}
+							allow_archetype CLUSTER occurrences matches {0..1} matches {
+								include
+									archetype_id/value matches {/palpation\.v1/}
+									archetype_id/value matches {/percussion\.v1/}
+							}
+							use_node ELEMENT /items[at0008]/items[at0.2]/items[at0.3]
+						}
+					}
+					CLUSTER[at0.5] occurrences matches {0..1} matches {	-- Abdomen Contents
+						items cardinality matches {0..*; unordered} matches {
+							allow_archetype CLUSTER occurrences matches {0..1} matches {
+								include
+									archetype_id/value matches {/exam-generic-mass\.v1/}
+									archetype_id/value matches {/exam-generic-lympnode\.v1/}
+									archetype_id/value matches {/exam-generic\.v1/}
+									archetype_id/value matches {/exam\.v1/}
+									archetype_id/value matches {/auscultation\.v1/}
+							}
+							CLUSTER[at0.13] occurrences matches {0..1} matches {	-- Organs
+								items cardinality matches {0..*; unordered} matches {
+									CLUSTER[at0.14] occurrences matches {0..1} matches {	-- Liver
+										items cardinality matches {0..*; unordered} matches {
+											allow_archetype CLUSTER occurrences matches {0..1} matches {
+												include
+													archetype_id/value matches {/palpation\.v1/}
+													archetype_id/value matches {/percussion\.v1/}
+													archetype_id/value matches {/dimensions\.v1/}
+													archetype_id/value matches {/relative_position_abdomen\.v1draft/}
+													archetype_id/value matches {/size\.v1/}
+													archetype_id/value matches {/exam-generic-mass\.v1/}
+											}
+											use_node ELEMENT /items[at0008]/items[at0.2]/items[at0.3]
+										}
+									}
+									CLUSTER[at0.7] occurrences matches {0..1} matches {	-- Spleen
+										items cardinality matches {0..*; unordered} matches {
+											allow_archetype CLUSTER occurrences matches {0..1} matches {
+												include
+													archetype_id/value matches {/dimensions\.v1/}
+													archetype_id/value matches {/exam-generic-mass\.v1/}
+													archetype_id/value matches {/exam-generic\.v1/}
+													archetype_id/value matches {/exam\.v1/}
+													archetype_id/value matches {/palpation\.v1/}
+													archetype_id/value matches {/percussion\.v1/}
+													archetype_id/value matches {/relative_position_abdomen\.v1draft/}
+													archetype_id/value matches {/size\.v1/}
+											}
+											use_node ELEMENT /items[at0008]/items[at0.2]/items[at0.3]
+										}
+									}
+									CLUSTER[at0.8] occurrences matches {0..1} matches {	-- Kidney
+										items cardinality matches {0..*; unordered} matches {
+											allow_archetype CLUSTER occurrences matches {0..1} matches {
+												include
+													archetype_id/value matches {/dimensions\.v1/}
+													archetype_id/value matches {/exam-generic-mass\.v1/}
+													archetype_id/value matches {/exam-generic\.v1/}
+													archetype_id/value matches {/exam\.v1/}
+													archetype_id/value matches {/palpation\.v1/}
+													archetype_id/value matches {/percussion\.v1/}
+													archetype_id/value matches {/relative_position_abdomen\.v1draft/}
+											}
+											use_node ELEMENT /items[at0008]/items[at0.2]/items[at0.3]
+										}
+									}
+									CLUSTER[at0.15] occurrences matches {0..1} matches {	-- Bowel
+										items cardinality matches {0..*; unordered} matches {
+											allow_archetype CLUSTER occurrences matches {0..1} matches {
+												include
+													archetype_id/value matches {/palpation\.v1/}
+													archetype_id/value matches {/exam-generic-mass\.v1/}
+													archetype_id/value matches {/exam-generic\.v1/}
+													archetype_id/value matches {/exam\.v1/}
+													archetype_id/value matches {/percussion\.v1/}
+													archetype_id/value matches {/relative_position_abdomen\.v1draft/}
+											}
+											use_node ELEMENT /items[at0008]/items[at0.2]/items[at0.3]
+										}
+									}
+								}
+							}
+							use_node ELEMENT /items[at0008]/items[at0.2]/items[at0.3]
+						}
+					}
+					CLUSTER[at0003] occurrences matches {0..1} matches {	-- Detail
+						items cardinality matches {0..*; unordered} matches {
+							allow_archetype CLUSTER occurrences matches {0..1} matches {
+								include
+									archetype_id/value matches {/exam-generic\.v1/}
+							}
+						}
+					}
+				}
+			}
+			ELEMENT[at0006] occurrences matches {0..*} matches {	-- Image
+				value matches {
+					DV_MULTIMEDIA matches {
+						media_type matches {
+							[openEHR::
+							426, 
+							427, 
+							429]
+						}
+					}
+				}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["en"] = <
+			items = <
+				["at0.10"] = <
+					description = <"*">
+					text = <"Region">
+				>
+				["at0.11"] = <
+					description = <"*">
+					text = <"Left upper quadrant">
+				>
+				["at0.12"] = <
+					description = <"*">
+					text = <"Epigastrium">
+				>
+				["at0.13"] = <
+					description = <"*">
+					text = <"Organs">
+				>
+				["at0.14"] = <
+					description = <"*">
+					text = <"Liver">
+				>
+				["at0.15"] = <
+					description = <"*">
+					text = <"Bowel">
+				>
+				["at0.16"] = <
+					description = <"*">
+					text = <"Left upper quadrant">
+				>
+				["at0.17"] = <
+					description = <"*">
+					text = <"Right loin">
+				>
+				["at0.18"] = <
+					description = <"*">
+					text = <"Central/peri-umbilical">
+				>
+				["at0.19"] = <
+					description = <"*">
+					text = <"Left loin">
+				>
+				["at0.2"] = <
+					description = <"*">
+					text = <"Abdominal wall">
+				>
+				["at0.20"] = <
+					description = <"*">
+					text = <"Right iliac fossa">
+				>
+				["at0.21"] = <
+					description = <"*">
+					text = <"Left iliac fossa">
+				>
+				["at0.22"] = <
+					description = <"*">
+					text = <"New element">
+				>
+				["at0.23"] = <
+					description = <"Clinical description of finding">
+					text = <"Description">
+				>
+				["at0.3"] = <
+					description = <"Clincial description of findings">
+					text = <"Description">
+				>
+				["at0.4"] = <
+					description = <"Shape of abdomen">
+					text = <"Shape">
+				>
+				["at0.5"] = <
+					description = <"*">
+					text = <"Abdomen Contents">
+				>
+				["at0.6"] = <
+					description = <"Clinical description">
+					text = <"Description">
+				>
+				["at0.7"] = <
+					description = <"*">
+					text = <"Spleen">
+				>
+				["at0.8"] = <
+					description = <"*">
+					text = <"Kidney">
+				>
+				["at0.9"] = <
+					description = <"*">
+					text = <"Abdominal Region">
+				>
+				["at0000"] = <
+					description = <"Basic examination cluster for describing findings on physical examination when there is no named focus of examination">
+					text = <"Examination">
+				>
+				["at0000.1"] = <
+					description = <"For recording findings on physical examination of the abdomen">
+					text = <"Examination of the abdomen">
+				>
+				["at0002"] = <
+					description = <"Textural description of the part examined">
+					text = <"Clinical description">
+				>
+				["at0003"] = <
+					description = <"More focused examination findings">
+					text = <"Detail">
+				>
+				["at0004"] = <
+					description = <"A group of statements about the normality of the examination">
+					text = <"Normal statements">
+				>
+				["at0005"] = <
+					description = <"A specific statement of normality">
+					text = <"Normal statement">
+				>
+				["at0006"] = <
+					description = <"Drawing or image of the area examined">
+					text = <"Image">
+				>
+				["at0008"] = <
+					description = <"Clinical findings">
+					text = <"Findings">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-chest.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-chest.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-chest.v1.adl	(revision 367)
@@ -0,0 +1,379 @@
+archetype (adl_version=1.4)
+        openEHR-EHR-CLUSTER.exam-chest.v1
+specialize
+        openEHR-EHR-CLUSTER.exam.v1
+
+concept
+        [at0000.1]      -- Examination of the chest
+language
+        original_language = <[ISO_639-1::en]>
+description
+        original_author = <
+                ["name"] = <"Sam Heard">
+                ["organisation"] = <"Ocean Informatics">
+                ["date"] = <"9/04/2007">
+                ["email"] = <"Sam.Heard@OceanInformatics.biz">
+        >
+        details = <
+                ["en"] = <
+                        language = <[ISO_639-1::en]>
+                        purpose = <"A cluster for recording findings on physical examination of the chest">
+                        use = <"">
+                        keywords = <"examination", "physical", "chest", "thorax", "lungs">
+                        misuse = <"">
+                >
+        >
+        lifecycle_state = <"Initial">
+        other_contributors = <>
+
+definition
+        CLUSTER[at0000.1] matches {     -- Examination of the chest
+                items cardinality matches {0..*; unordered} matches {
+                        CLUSTER[at0004] occurrences matches {0..1} matches {    -- Normal statements
+                                items cardinality matches {0..*; unordered} matches {
+                                        ELEMENT[at0005] occurrences matches {0..*} matches {    -- Normal statement
+                                                value matches {
+                                                        DV_TEXT matches {*}
+                                                }
+                                        }
+                                }
+                        }
+                        ELEMENT[at0002] occurrences matches {0..1} matches {    -- Clinical description
+                                value matches {
+                                        DV_TEXT matches {*}
+                                }
+                        }
+                        CLUSTER[at0008] occurrences matches {0..1} matches {    -- Findings
+                                items cardinality matches {0..*; unordered} matches {
+                                        CLUSTER[at0.1] occurrences matches {0..1} matches {     -- Chest wall
+                                                items cardinality matches {0..*; unordered} matches {
+                                                        ELEMENT[at0.2] occurrences matches {0..1} matches {     -- Description
+                                                                value matches {
+                                                                        DV_CODED_TEXT matches {
+                                                                                defining_code matches {[local::]}
+                                                                        }
+                                                                }
+                                                        }
+                                                        ELEMENT[at0.28] occurrences matches {0..1} matches {    -- Shape
+                                                                value matches {
+                                                                        DV_TEXT matches {*}
+                                                                }
+                                                        }
+                                                        CLUSTER[at0.30] occurrences matches {0..1} matches {    -- Heart - Apex beat
+                                                                items cardinality matches {0..*; unordered} matches {
+                                                                        ELEMENT[at0.31] occurrences matches {0..1} matches {    -- Visible
+                                                                                value matches {
+                                                                                        DV_BOOLEAN matches {
+                                                                                                value matches {True, False}
+                                                                                        }
+                                                                                }
+                                                                        }
+                                                                        CLUSTER[at0.32] occurrences matches {0..1} matches {    -- Palpation
+                                                                                items cardinality matches {0..*; unordered} matches {
+                                                                                        ELEMENT[at0.33] occurrences matches {0..1} matches {    -- Palpable
+                                                                                                value matches {
+                                                                                                        DV_BOOLEAN matches {
+                                                                                                                value matches {True, False}
+                                                                                                        }
+                                                                                                }
+                                                                                        }
+                                                                                        ELEMENT[at0.34] occurrences matches {0..1} matches {    -- Maximal location
+                                                                                                value matches {
+                                                                                                        DV_TEXT matches {*}
+                                                                                                }
+                                                                                        }
+                                                                                }
+                                                                        }
+                                                                }
+                                                        }
+                                                        allow_archetype CLUSTER occurrences matches {0..1} matches {
+                                                                include
+                                                                        archetype_id/value matches {/palpation\.v1draft/}
+                                                                        archetype_id/value matches {/inspection\.v1draft/}
+                                                                        archetype_id/value matches {/auscultation-chest\.v1/}
+                                                        }
+                                                }
+                                        }
+                                        CLUSTER[at0.3] occurrences matches {0..1} matches {     -- Respiratory system
+                                                items cardinality matches {0..*; unordered} matches {
+                                                        ELEMENT[at0.4] occurrences matches {0..1} matches {     -- Trachea
+                                                                value matches {
+                                                                        DV_CODED_TEXT matches {
+                                                                                defining_code matches {
+                                                                                        [local::
+                                                                                        at0.5,  -- Midline
+                                                                                        at0.6,  -- Deviated to the left
+                                                                                        at0.7]  -- Deviated to the right
+                                                                                }
+                                                                        }
+                                                                }
+                                                        }
+                                                        CLUSTER[at0.8] occurrences matches {0..1} matches {     -- Breathing
+                                                                items cardinality matches {0..*; unordered} matches {
+                                                                        ELEMENT[at0.19] occurrences matches {0..1} matches {    -- Description
+                                                                                value matches {
+                                                                                        DV_TEXT matches {*}
+                                                                                }
+                                                                        }
+                                                                        ELEMENT[at0.9] occurrences matches {0..1} matches {     -- Type
+                                                                                value matches {
+                                                                                        DV_CODED_TEXT matches {
+                                                                                                defining_code matches {
+                                                                                                        [local::
+                                                                                                        at0.10,         -- Diaphragmatic breathing
+                                                                                                        at0.11] -- Thoracic breathing
+                                                                                                }
+                                                                                        }
+                                                                                }
+                                                                        }
+                                                                        ELEMENT[at0.12] occurrences matches {0..1} matches {    -- Effort
+                                                                                value matches {
+                                                                                        5|[local::at0.13],      -- Normal breathing effort
+                                                                                        6|[local::at0.14],      -- Mild increase in effort
+                                                                                        8|[local::at0.15],      -- Moderate increased effort
+                                                                                        10|[local::at0.16]      -- Major increased effort
+                                                                                }
+                                                                        }
+                                                                        CLUSTER[at0.17] occurrences matches {0..1} matches {    -- Signs of increased effort
+                                                                                items cardinality matches {0..*; unordered} matches {
+                                                                                        ELEMENT[at0.18] occurrences matches {0..*} matches {    -- Sign
+                                                                                                value matches {
+                                                                                                        DV_CODED_TEXT matches {
+                                                                                                                defining_code matches {
+                                                                                                                        [local::
+                                                                                                                        at0.25,         -- Using accessory muscles
+                                                                                                                        at0.20,         -- Intercostal recession
+                                                                                                                        at0.24,         -- Subcostal recession
+                                                                                                                        at0.23,         -- Suprasternal recession
+                                                                                                                        at0.21,         -- Sternal recession
+                                                                                                                        at0.22] -- Rib retraction
+                                                                                                                }
+                                                                                                        }
+                                                                                                }
+                                                                                        }
+                                                                                }
+                                                                        }
+                                                                        ELEMENT[at0.26] occurrences matches {0..1} matches {    -- Paradoxical movement (flail chest)
+                                                                                value matches {
+                                                                                        DV_BOOLEAN matches {
+                                                                                                value matches {True, False}
+                                                                                        }
+                                                                                }
+                                                                        }
+                                                                }
+                                                        }
+                                                }
+                                        }
+                                        CLUSTER[at0003] occurrences matches {0..1} matches {    -- Detail
+                                                items cardinality matches {0..*; unordered} matches {
+                                                        allow_archetype CLUSTER occurrences matches {0..1} matches {
+                                                                include
+                                                                        archetype_id/value matches {/exam-generic\.v1/}
+                                                                        archetype_id/value matches {/auscultation-chest\.v1/}
+                                                                        archetype_id/value matches {/palpation\.v1/}
+                                                                        archetype_id/value matches {/inspection\.v1draft/}
+                                                                        archetype_id/value matches {/percussion\.v1/}
+                                                        }
+                                                }
+                                        }
+                                }
+                        }
+                        CLUSTER[at0.27] occurrences matches {0..1} matches {    -- Lymph nodes
+                                items cardinality matches {0..*; unordered} matches {
+                                        allow_archetype CLUSTER occurrences matches {0..1} matches {
+                                                include
+                                                        archetype_id/value matches {/exam-generic-lympnode\.v1/}
+                                        }
+                                }
+                        }
+                        ELEMENT[at0006] occurrences matches {0..*} matches {    -- Image
+                                value matches {
+                                        DV_MULTIMEDIA matches {
+                                                media_type matches {
+                                                        [openEHR::
+                                                        426, 
+                                                        427, 
+                                                        429]
+                                                }
+                                        }
+                                }
+                        }
+                }
+        }
+
+ontology
+        term_definitions = <
+                ["en"] = <
+                        items = <
+                                ["at0.1"] = <
+                                        description = <"Findings about the chest wall">
+                                        text = <"Chest wall">
+                                >
+                                ["at0.10"] = <
+                                        description = <"Breathing using the diaphragm and not the chest wall">
+                                        text = <"Diaphragmatic breathing">
+                                >
+                                ["at0.11"] = <
+                                        description = <"Breathing using expansion of the chest wall">
+                                        text = <"Thoracic breathing">
+                                >
+                                ["at0.12"] = <
+                                        description = <"Effort required for breathing">
+                                        text = <"Effort">
+                                >
+                                ["at0.13"] = <
+                                        description = <"Diaphragmatic breathing as at rest">
+                                        text = <"Normal breathing effort">
+                                >
+                                ["at0.14"] = <
+                                        description = <"Breathing using obvious chest expansion">
+                                        text = <"Mild increase in effort">
+                                >
+                                ["at0.15"] = <
+                                        description = <"Breathing with signs of abnormal breathing">
+                                        text = <"Moderate increased effort">
+                                >
+                                ["at0.16"] = <
+                                        description = <"Many signs of increased breathing effort">
+                                        text = <"Major increased effort">
+                                >
+                                ["at0.17"] = <
+                                        description = <"Signs of increased respiratory effort">
+                                        text = <"Signs of increased effort">
+                                >
+                                ["at0.18"] = <
+                                        description = <"Use of accessory respiratory muscles">
+                                        text = <"Sign">
+                                >
+                                ["at0.19"] = <
+                                        description = <"Description of breathing">
+                                        text = <"Description">
+                                >
+                                ["at0.2"] = <
+                                        description = <"The contour of the chest wall">
+                                        text = <"Description">
+                                >
+                                ["at0.20"] = <
+                                        description = <"Drawing in between the ribs on inspiration">
+                                        text = <"Intercostal recession">
+                                >
+                                ["at0.21"] = <
+                                        description = <"Drawing in of the sternum on inspiration">
+                                        text = <"Sternal recession">
+                                >
+                                ["at0.22"] = <
+                                        description = <"Indrawing of the chest wall on inspiration">
+                                        text = <"Rib retraction">
+                                >
+                                ["at0.23"] = <
+                                        description = <"Indrawing above the sternum on inspiration">
+                                        text = <"Suprasternal recession">
+                                >
+                                ["at0.24"] = <
+                                        description = <"Indrawing of the subcostal abdominal wall ">
+                                        text = <"Subcostal recession">
+                                >
+                                ["at0.25"] = <
+                                        description = <"Use of accessory respiratory muscles during inspiration">
+                                        text = <"Using accessory muscles">
+                                >
+                                ["at0.26"] = <
+                                        description = <"Any paradoxical movement of the chest wall during respiration">
+                                        text = <"Paradoxical movement (flail chest)">
+                                >
+                                ["at0.27"] = <
+                                        description = <"Lymphnodes">
+                                        text = <"Lymph nodes">
+                                >
+                                ["at0.28"] = <
+                                        description = <"The shape of the chest">
+                                        text = <"Shape">
+                                        comment = <"ChestShape SNOMED query">
+                                >
+                                ["at0.29"] = <
+                                        description = <"Pidgeon chest, with prominent lower sternum">
+                                        text = <"Pectus carinatum">
+                                >
+                                ["at0.3"] = <
+                                        description = <"Respiratory findings">
+                                        text = <"Respiratory system">
+                                >
+                                ["at0.30"] = <
+                                        description = <"*">
+                                        text = <"Heart - Apex beat">
+                                >
+                                ["at0.31"] = <
+                                        description = <"Apex beat is visible">
+                                        text = <"Visible">
+                                >
+                                ["at0.32"] = <
+                                        description = <"*">
+                                        text = <"Palpation">
+                                >
+                                ["at0.33"] = <
+                                        description = <"Apex beat is palpable">
+                                        text = <"Palpable">
+                                >
+                                ["at0.34"] = <
+                                        description = <"Site of maximal location of apex beat">
+                                        text = <"Maximal location">
+                                >
+                                ["at0.4"] = <
+                                        description = <"The position of the trachea">
+                                        text = <"Trachea">
+                                >
+                                ["at0.5"] = <
+                                        description = <"The trachea is in the midline position">
+                                        text = <"Midline">
+                                >
+                                ["at0.6"] = <
+                                        description = <"The trachea is deviated to the left">
+                                        text = <"Deviated to the left">
+                                >
+                                ["at0.7"] = <
+                                        description = <"The trachea is deviated to the right">
+                                        text = <"Deviated to the right">
+                                >
+                                ["at0.8"] = <
+                                        description = <"Findings about breathing">
+                                        text = <"Breathing">
+                                >
+                                ["at0.9"] = <
+                                        description = <"Type of breathing">
+                                        text = <"Type">
+                                >
+                                ["at0000"] = <
+                                        description = <"Basic examination cluster for describing findings on physical examination when there is no named focus of examination">
+                                        text = <"Examination">
+                                >
+                                ["at0000.1"] = <
+                                        description = <"For recording findings on physical examination of the chest wall and lungs">
+                                        text = <"Examination of the chest">
+                                >
+                                ["at0002"] = <
+                                        description = <"Textural description of the part examined">
+                                        text = <"Clinical description">
+                                >
+                                ["at0003"] = <
+                                        description = <"More focused examination findings">
+                                        text = <"Detail">
+                                >
+                                ["at0004"] = <
+                                        description = <"A group of statements about the normality of the examination">
+                                        text = <"Normal statements">
+                                >
+                                ["at0005"] = <
+                                        description = <"A specific statement of normality">
+                                        text = <"Normal statement">
+                                >
+                                ["at0006"] = <
+                                        description = <"Drawing or image of the area examined">
+                                        text = <"Image">
+                                >
+                                ["at0008"] = <
+                                        description = <"Clinical findings">
+                                        text = <"Findings">
+                                >
+                        >
+                >
+        >
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-fetus.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-fetus.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-fetus.v1.adl	(revision 367)
@@ -0,0 +1,577 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-CLUSTER.exam-fetus.v1
+specialize
+	openEHR-EHR-CLUSTER.exam.v1
+
+concept
+	[at0000.1]	-- Examination of the fetus
+language
+	original_language = <[ISO_639-1::en]>
+description
+	original_author = <
+		["name"] = <"unknown">
+	>
+	details = <
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"For recording findings on physical examination relating to the fetus while in the uterus">
+			use = <"">
+			keywords = <"foetus", "fetal", "foetal">
+			misuse = <"">
+		>
+	>
+	lifecycle_state = <"Initial">
+	other_contributors = <>
+
+definition
+	CLUSTER[at0000.1] matches {	-- Examination of the fetus
+		items cardinality matches {0..*; unordered} matches {
+			CLUSTER[at0004] occurrences matches {0..1} matches {	-- Normal statements
+				items cardinality matches {0..*; unordered} matches {
+					ELEMENT[at0005] occurrences matches {0..*} matches {	-- Normal statement
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+				}
+			}
+			ELEMENT[at0002] occurrences matches {0..1} matches {	-- Clinical description
+				value matches {
+					DV_TEXT matches {*}
+				}
+			}
+			CLUSTER[at0008] occurrences matches {0..1} matches {	-- Findings
+				items cardinality matches {0..*; unordered} matches {
+					ELEMENT[at0.4] occurrences matches {0..1} matches {	-- Lie of the fetus
+						value matches {
+							DV_CODED_TEXT matches {
+								defining_code matches {
+									[local::
+									at0.5, 	-- Longitudinal
+									at0.6, 	-- Transverse
+									at0.7]	-- Oblique
+								}
+							}
+						}
+					}
+					ELEMENT[at0.8] occurrences matches {0..1} matches {	-- Presentation
+						value matches {
+							DV_CODED_TEXT matches {
+								defining_code matches {
+									[local::
+									at0.9, 	-- Cephalic
+									at0.10, 	-- Breech
+									at0.11, 	-- Full breech
+									at0.12, 	-- Extended breech
+									at0.13, 	-- Shoulder
+									at0.69, 	-- Footling breech
+									at0.70, 	-- Face
+									at0.71, 	-- Cord
+									at0.72]	-- Compound
+								}
+							}
+						}
+					}
+					ELEMENT[at0.42] occurrences matches {0..1} matches {	-- Position
+						value matches {
+							DV_CODED_TEXT matches {
+								defining_code matches {
+									[local::
+									at0.43, 	-- Right Occipito-transverse
+									at0.44, 	-- Right Occipito-anterior
+									at0.45, 	-- Right Occipito-posterior
+									at0.46, 	-- Occipito-anterior
+									at0.47, 	-- Occipito-posterior
+									at0.48, 	-- Left Occipito-transverse
+									at0.49, 	-- Left Occipito-anterior
+									at0.50, 	-- Left Occipito-posterior
+									at0.51, 	-- Right Sacro-transverse
+									at0.52, 	-- Right Sacro-anterior
+									at0.53, 	-- Right Sacro-posterior
+									at0.54, 	-- Sacro-Anterior
+									at0.55, 	-- Sacro-Posterior
+									at0.56, 	-- Left Sacro-transverse
+									at0.57, 	-- Left Sacro-anterior
+									at0.58, 	-- Left Sacro-posterior
+									at0.59, 	-- Right Mento-transverse
+									at0.60, 	-- Right Mento-anterior
+									at0.61, 	-- Right Mento-posterior
+									at0.62, 	-- Mento-Anterior
+									at0.63, 	-- Mento-Posterior
+									at0.64, 	-- Left Mento-transverse
+									at0.65, 	-- Left Mento-anterior
+									at0.61]	-- Right Mento-posterior
+								}
+							}
+						}
+					}
+					ELEMENT[at0.32] occurrences matches {0..1} matches {	-- Attitude
+						value matches {
+							DV_CODED_TEXT matches {
+								defining_code matches {
+									[local::
+									at0.33, 	-- Flexed
+									at0.34, 	-- Deflexed
+									at0.35]	-- Extended
+								}
+							}
+						}
+					}
+					CLUSTER[at0.74] occurrences matches {0..1} matches {	-- Engagement
+						items cardinality matches {0..*; unordered} matches {
+							ELEMENT[at0.22] occurrences matches {0..1} matches {	-- Fifths
+								value matches {
+									DV_CODED_TEXT matches {
+										defining_code matches {
+											[local::
+											at0.23, 	-- Not engaged (0/5)
+											at0.24, 	-- 1/5
+											at0.25, 	-- 2/5
+											at0.26, 	-- 3/5
+											at0.27, 	-- 4/5
+											at0.28]	-- Fully engaged (5/5)
+										}
+									}
+								}
+							}
+							ELEMENT[at0.75] occurrences matches {0..1} matches {	-- Qualitative
+								value matches {
+									DV_CODED_TEXT matches {
+										defining_code matches {
+											[local::
+											at0.76, 	-- High and mobile
+											at0.77, 	-- At pelvic brim
+											at0.78]	-- Engaged
+										}
+									}
+								}
+							}
+						}
+					}
+					ELEMENT[at0.14] occurrences matches {0..1} matches {	-- Size relative to gestation
+						value matches {
+							DV_CODED_TEXT matches {
+								defining_code matches {
+									[local::
+									at0.15, 	-- Small for dates
+									at0.67, 	-- ? small for dates
+									at0.16, 	-- Normal
+									at0.68, 	-- ? large for dates
+									at0.17]	-- Large for dates
+								}
+							}
+						}
+					}
+					ELEMENT[at0.29] occurrences matches {0..1} matches {	-- Station
+						value matches {
+							C_DV_QUANTITY <
+								property = <[openehr::122]>
+								list = <
+									["1"] = <
+										units = <"cm">
+										magnitude = <|-5.0..5.0|>
+										precision = <|0|>
+									>
+								>
+							>
+						}
+					}
+					ELEMENT[at0.18] occurrences matches {0..1} matches {	-- Estimated fetal weight
+						value matches {
+							C_DV_QUANTITY <
+								property = <[openehr::124]>
+								list = <
+									["1"] = <
+										units = <"kg">
+										magnitude = <|0.0..20.0|>
+									>
+									["2"] = <
+										units = <"gm">
+										magnitude = <|0.0..20000.0|>
+										precision = <|0|>
+									>
+								>
+							>
+						}
+					}
+					CLUSTER[at0007] occurrences matches {0..1} matches {	-- Size
+						items cardinality matches {0..*; unordered} matches {
+							allow_archetype CLUSTER occurrences matches {0..1} matches {
+								include
+									archetype_id/value matches {/dimensions\.v1/}
+									archetype_id/value matches {/size\.v1draft/}
+							}
+						}
+					}
+					CLUSTER[at0003] occurrences matches {0..1} matches {	-- Detail
+						items cardinality matches {0..*; unordered} matches {
+							allow_archetype CLUSTER occurrences matches {0..1} matches {
+								include
+									archetype_id/value matches {/exam\.v1/}
+							}
+						}
+					}
+				}
+			}
+			ELEMENT[at0006] occurrences matches {0..*} matches {	-- Image
+				value matches {
+					DV_MULTIMEDIA matches {
+						media_type matches {
+							[openEHR::
+							426, 
+							427, 
+							429]
+						}
+					}
+				}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["en"] = <
+			items = <
+				["at0.10"] = <
+					description = <"The breech is the presenting part">
+					text = <"Breech">
+				>
+				["at0.11"] = <
+					description = <"The breech is presenting with the legs flexed">
+					text = <"Full breech">
+				>
+				["at0.12"] = <
+					description = <"The breech is the presenting part with the leg(s) extended">
+					text = <"Extended breech">
+				>
+				["at0.13"] = <
+					description = <"The shoulder is the presenting part">
+					text = <"Shoulder">
+				>
+				["at0.14"] = <
+					description = <"The apparent size of the baby relative to normal for gestation">
+					text = <"Size relative to gestation">
+				>
+				["at0.15"] = <
+					description = <"The size of the baby is smaller than expected for gestation">
+					text = <"Small for dates">
+				>
+				["at0.16"] = <
+					description = <"The size of the baby is normal for gestation">
+					text = <"Normal">
+				>
+				["at0.17"] = <
+					description = <"The size of the baby is larger than expected for gestation">
+					text = <"Large for dates">
+				>
+				["at0.18"] = <
+					description = <"The estimated weight of the baby on examination">
+					text = <"Estimated fetal weight">
+				>
+				["at0.19"] = <
+					description = <"The position of the head in relation to the pelvis">
+					text = <"Denominator">
+				>
+				["at0.20"] = <
+					description = <"The occiput is anterior rotated to the anterior">
+					text = <"Left occipito-anterior">
+				>
+				["at0.21"] = <
+					description = <"The occiput is at the back">
+					text = <"Occipito-posterior">
+				>
+				["at0.22"] = <
+					description = <"The proportion of the presenting part which is felt above the pelvis">
+					text = <"Fifths">
+				>
+				["at0.23"] = <
+					description = <"The head is not engaged in the pelvis">
+					text = <"Not engaged (0/5)">
+				>
+				["at0.24"] = <
+					description = <"About 20% of the head is inside the pelvis">
+					text = <"1/5">
+				>
+				["at0.25"] = <
+					description = <"About 40% of the head is inside the pelvis">
+					text = <"2/5">
+				>
+				["at0.26"] = <
+					description = <"About 60% of the head is inside the pelvis">
+					text = <"3/5">
+				>
+				["at0.27"] = <
+					description = <"About 80% of the head is inside the pelvis">
+					text = <"4/5">
+				>
+				["at0.28"] = <
+					description = <"The head is inside the pelvis">
+					text = <"Fully engaged (5/5)">
+				>
+				["at0.29"] = <
+					description = <"Posiiton relative to the ischial spines (minus is above, 0 is at the spines and plus is below)">
+					text = <"Station">
+				>
+				["at0.30"] = <
+					description = <"The occiput is adjacent to the symphasis pubis">
+					text = <"Occipito-anterior">
+				>
+				["at0.31"] = <
+					description = <"The occiput is anterior rotated to the right">
+					text = <"Right occipito-anterior">
+				>
+				["at0.32"] = <
+					description = <"The degree of flexion of the body">
+					text = <"Attitude">
+				>
+				["at0.33"] = <
+					description = <"The fetus is fully flexed">
+					text = <"Flexed">
+				>
+				["at0.34"] = <
+					description = <"The fetus is not flexed">
+					text = <"Deflexed">
+				>
+				["at0.35"] = <
+					description = <"The fetus is extended">
+					text = <"Extended">
+				>
+				["at0.36"] = <
+					description = <"The occiput is on the left">
+					text = <"Left occipito-transverse">
+				>
+				["at0.37"] = <
+					description = <"The occiput is on the right">
+					text = <"Right occipito-transverse">
+				>
+				["at0.38"] = <
+					description = <"*">
+					text = <"Position">
+				>
+				["at0.39"] = <
+					description = <"The occipital bone">
+					text = <"Occipito">
+				>
+				["at0.4"] = <
+					description = <"The position of the fetus">
+					text = <"Lie of the fetus">
+				>
+				["at0.40"] = <
+					description = <"The chin">
+					text = <"Mento">
+				>
+				["at0.41"] = <
+					description = <"The sacral bone">
+					text = <"Sacro">
+				>
+				["at0.42"] = <
+					description = <"The orientation of the denominator">
+					text = <"Position">
+				>
+				["at0.43"] = <
+					description = <"The occiput is towards the right">
+					text = <"Right Occipito-transverse">
+				>
+				["at0.44"] = <
+					description = <"The occiput is towards the right and anterior">
+					text = <"Right Occipito-anterior">
+				>
+				["at0.45"] = <
+					description = <"The occiput is to the right and posterior">
+					text = <"Right Occipito-posterior">
+				>
+				["at0.46"] = <
+					description = <"The occiput is towards the symphasis">
+					text = <"Occipito-anterior">
+				>
+				["at0.47"] = <
+					description = <"The occiput is towards the sacrum">
+					text = <"Occipito-posterior">
+				>
+				["at0.48"] = <
+					description = <"The occiput is towards the left">
+					text = <"Left Occipito-transverse">
+				>
+				["at0.49"] = <
+					description = <"The occiput is to the left and symphasis">
+					text = <"Left Occipito-anterior">
+				>
+				["at0.5"] = <
+					description = <"The lie is along the line of the mother's spine">
+					text = <"Longitudinal">
+				>
+				["at0.50"] = <
+					description = <"The occiput is to the left and posterior">
+					text = <"Left Occipito-posterior">
+				>
+				["at0.51"] = <
+					description = <"The fetal sacrum is towards the right">
+					text = <"Right Sacro-transverse">
+				>
+				["at0.52"] = <
+					description = <"The fetal sacrum is towards the right and anterior">
+					text = <"Right Sacro-anterior">
+				>
+				["at0.53"] = <
+					description = <"The fetal sacrum is to the right and posterior">
+					text = <"Right Sacro-posterior">
+				>
+				["at0.54"] = <
+					description = <"The fetal sacrum is towards the symphasis">
+					text = <"Sacro-Anterior">
+				>
+				["at0.55"] = <
+					description = <"The fetal sacrum is towards the sacrum">
+					text = <"Sacro-Posterior">
+				>
+				["at0.56"] = <
+					description = <"The fetal sacrum is towards the left">
+					text = <"Left Sacro-transverse">
+				>
+				["at0.57"] = <
+					description = <"The fetal sacrum is to the left and symphasis">
+					text = <"Left Sacro-anterior">
+				>
+				["at0.58"] = <
+					description = <"The fetal sacrum is to the left and posterior">
+					text = <"Left Sacro-posterior">
+				>
+				["at0.59"] = <
+					description = <"The fetal chin is towards the right">
+					text = <"Right Mento-transverse">
+				>
+				["at0.6"] = <
+					description = <"The lie is perpendicular to the mother's spine">
+					text = <"Transverse">
+				>
+				["at0.60"] = <
+					description = <"The fetal chin is towards the right and anterior">
+					text = <"Right Mento-anterior">
+				>
+				["at0.61"] = <
+					description = <"The fetal chin is to the right and posterior">
+					text = <"Right Mento-posterior">
+				>
+				["at0.62"] = <
+					description = <"The fetal chin is towards the symphasis">
+					text = <"Mento-Anterior">
+				>
+				["at0.63"] = <
+					description = <"The fetal chin is towards the sacrum">
+					text = <"Mento-Posterior">
+				>
+				["at0.64"] = <
+					description = <"The fetal chin is towards the left">
+					text = <"Left Mento-transverse">
+				>
+				["at0.65"] = <
+					description = <"The fetal chin is to the left and symphasis">
+					text = <"Left Mento-anterior">
+				>
+				["at0.66"] = <
+					description = <"The fetal chin is to the left and posterior">
+					text = <"Left Mento-posterior">
+				>
+				["at0.67"] = <
+					description = <"Possibly small for this gestation">
+					text = <"? small for dates">
+				>
+				["at0.68"] = <
+					description = <"Possibly larger than expected for this gestation">
+					text = <"? large for dates">
+				>
+				["at0.69"] = <
+					description = <"A fetal foot is extended and presenting">
+					text = <"Footling breech">
+				>
+				["at0.7"] = <
+					description = <"The lie is oblique to the mother's spine">
+					text = <"Oblique">
+				>
+				["at0.70"] = <
+					description = <"The head is extended and the face is presenting">
+					text = <"Face">
+				>
+				["at0.71"] = <
+					description = <"The umbilical cord is presenting">
+					text = <"Cord">
+				>
+				["at0.72"] = <
+					description = <"There is a compound presentation">
+					text = <"Compound">
+				>
+				["at0.73"] = <
+					description = <"*">
+					text = <"Station">
+				>
+				["at0.74"] = <
+					description = <"Estimation of presenting part in relation to pelvic brim">
+					text = <"Engagement">
+				>
+				["at0.75"] = <
+					description = <"Description of engagement of fetal head">
+					text = <"Qualitative">
+				>
+				["at0.76"] = <
+					description = <"*">
+					text = <"High and mobile">
+				>
+				["at0.77"] = <
+					description = <"*">
+					text = <"At pelvic brim">
+				>
+				["at0.78"] = <
+					description = <"*">
+					text = <"Engaged">
+				>
+				["at0.79"] = <
+					description = <"*">
+					text = <"Estimation">
+				>
+				["at0.8"] = <
+					description = <"The presenting part of the fetus">
+					text = <"Presentation">
+				>
+				["at0.9"] = <
+					description = <"The head is the presenting part">
+					text = <"Cephalic">
+				>
+				["at0000"] = <
+					description = <"Generic examination cluster for describing a finding on physical examination">
+					text = <"Examination">
+				>
+				["at0000.1"] = <
+					description = <"Examination cluster for describing a finding on physical examination of a fetus">
+					text = <"Examination of the fetus">
+				>
+				["at0002"] = <
+					description = <"Textural description of the part examined">
+					text = <"Clinical description">
+				>
+				["at0003"] = <
+					description = <"More focused examination findings">
+					text = <"Detail">
+				>
+				["at0004"] = <
+					description = <"A group of statements about the normality of the examination">
+					text = <"Normal statements">
+				>
+				["at0005"] = <
+					description = <"A specific statement of normality">
+					text = <"Normal statement">
+				>
+				["at0006"] = <
+					description = <"Drawing or image of the area examined">
+					text = <"Image">
+				>
+				["at0007"] = <
+					description = <"Information about the size of the object for examination">
+					text = <"Size">
+				>
+				["at0008"] = <
+					description = <"Clinical findings">
+					text = <"Findings">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-generic-joint.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-generic-joint.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-generic-joint.v1.adl	(revision 367)
@@ -0,0 +1,146 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-CLUSTER.exam-generic-joint.v1
+specialize
+	openEHR-EHR-CLUSTER.exam-generic.v1
+
+concept
+	[at0000.1.1]	-- Examination of a named joint
+language
+	original_language = <[ISO_639-1::en]>
+description
+	original_author = <
+		["name"] = <"unknown">
+	>
+	details = <
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"A generic cluster for recording findings on physical examination.">
+			use = <"">
+			keywords = <"examination", "physical">
+			misuse = <"">
+		>
+	>
+	lifecycle_state = <"Initial">
+	other_contributors = <>
+
+definition
+	CLUSTER[at0000.1.1] matches {	-- Examination of a named joint
+		items cardinality matches {0..*; unordered} matches {
+			ELEMENT[at0.9.1] matches {	-- Joint
+				value matches {
+					DV_TEXT matches {*}
+				}
+			}
+			CLUSTER[at0004] occurrences matches {0..1} matches {	-- Normal statements
+				items cardinality matches {0..*; unordered} matches {
+					ELEMENT[at0005] occurrences matches {0..*} matches {	-- Normal statement
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+				}
+			}
+			ELEMENT[at0002] occurrences matches {0..1} matches {	-- Clinical description
+				value matches {
+					DV_TEXT matches {*}
+				}
+			}
+			CLUSTER[at0008] occurrences matches {0..1} matches {	-- Findings
+				items cardinality matches {0..*; unordered} matches {
+					allow_archetype CLUSTER occurrences matches {0..*} matches {
+						include
+							archetype_id/value matches {/palpation\.v1draft/}
+							archetype_id/value matches {/inspection\.v1draft/}
+							archetype_id/value matches {/move-joint\.v1draft/}
+						exclude
+							archetype_id/value matches {/.*/}
+					}
+					CLUSTER[at0.1] occurrences matches {0..1} matches {	-- Size
+						items cardinality matches {0..*; unordered} matches {
+							allow_archetype CLUSTER occurrences matches {0..1} matches {
+								include
+									archetype_id/value matches {/dimensions\.v1/}
+									archetype_id/value matches {/size\.v1draft/}
+							}
+						}
+					}
+					CLUSTER[at0003] occurrences matches {0..1} matches {	-- Detail
+						items cardinality matches {0..*; unordered} matches {
+							allow_archetype CLUSTER occurrences matches {0..1} matches {
+								include
+									archetype_id/value matches {/exam\.v1/}
+							}
+						}
+					}
+				}
+			}
+			ELEMENT[at0006] occurrences matches {0..*} matches {	-- Image
+				value matches {
+					DV_MULTIMEDIA matches {
+						media_type matches {
+							[openEHR::
+							426, 
+							427, 
+							429]
+						}
+					}
+				}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["en"] = <
+			items = <
+				["at0.1"] = <
+					description = <"Information about the size of the object for examination">
+					text = <"Size">
+				>
+				["at0.9"] = <
+					description = <"The object of examination">
+					text = <"Object">
+				>
+				["at0.9.1"] = <
+					description = <"The joint examined">
+					text = <"Joint">
+				>
+				["at0000"] = <
+					description = <"Generic examination cluster for describing a finding on physical examination">
+					text = <"Examination">
+				>
+				["at0000.1"] = <
+					description = <"Generic examination cluster for describing a finding on physical examination">
+					text = <"Examination of a named body part">
+				>
+				["at0000.1.1"] = <
+					description = <"Generic examination cluster for describing findings relating to a joint on physical examination">
+					text = <"Examination of a named joint">
+				>
+				["at0002"] = <
+					description = <"Textural description of the part examined">
+					text = <"Clinical description">
+				>
+				["at0003"] = <
+					description = <"More focused examination findings">
+					text = <"Detail">
+				>
+				["at0004"] = <
+					description = <"A group of statements about the normality of the examination">
+					text = <"Normal statements">
+				>
+				["at0005"] = <
+					description = <"A specific statement of normality">
+					text = <"Normal statement">
+				>
+				["at0006"] = <
+					description = <"Drawing or image of the area examined">
+					text = <"Image">
+				>
+				["at0008"] = <
+					description = <"Clinical findings">
+					text = <"Findings">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-generic-lymphnode.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-generic-lymphnode.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-generic-lymphnode.v1.adl	(revision 367)
@@ -0,0 +1,176 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-CLUSTER.exam-generic-lymphnode.v1
+specialize
+	openEHR-EHR-CLUSTER.exam-generic.v1
+
+concept
+	[at0000.1.1]	-- Examination of lymph nodes
+language
+	original_language = <[ISO_639-1::en]>
+description
+	original_author = <
+		["name"] = <"unknown">
+	>
+	details = <
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"For recording findings on physical examination of lymph nodes">
+			use = <"">
+			keywords = <"examination", "physical", "lymph", "nodes">
+			misuse = <"">
+		>
+	>
+	lifecycle_state = <"OrganisationDraft">
+	other_contributors = <>
+
+definition
+	CLUSTER[at0000.1.1] matches {	-- Examination of lymph nodes
+		items cardinality matches {0..*; unordered} matches {
+			ELEMENT[at0.9.1] matches {	-- Lymph node group
+				value matches {
+					DV_TEXT matches {*}
+				}
+			}
+			CLUSTER[at0004] occurrences matches {0..1} matches {	-- Normal statements
+				items cardinality matches {0..*; unordered} matches {
+					ELEMENT[at0005] occurrences matches {0..*} matches {	-- Normal statement
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+				}
+			}
+			ELEMENT[at0002] occurrences matches {0..1} matches {	-- Clinical description
+				value matches {
+					DV_TEXT matches {*}
+				}
+			}
+			CLUSTER[at0008] occurrences matches {0..1} matches {	-- Findings
+				items cardinality matches {0..*; unordered} matches {
+					allow_archetype CLUSTER occurrences matches {0..*} matches {
+						include
+							archetype_id/value matches {/palpation\.v1draft/}
+							archetype_id/value matches {/inspection\.v1draft/}
+						exclude
+							archetype_id/value matches {/.*/}
+					}
+					CLUSTER[at0.1] occurrences matches {0..1} matches {	-- Size
+						items cardinality matches {0..*; unordered} matches {
+							allow_archetype CLUSTER occurrences matches {0..1} matches {
+								include
+									archetype_id/value matches {/size\.v1draft/}
+							}
+						}
+					}
+					CLUSTER[at0003.0.1] occurrences matches {0..1} matches {	-- Individual nodes
+						items cardinality matches {0..*; unordered} matches {
+							CLUSTER[at0.0.12] occurrences matches {0..1} matches {	-- Node
+								items cardinality matches {1..*; unordered} matches {
+									ELEMENT[at0.0.11] occurrences matches {0..1} matches {	-- Node name
+										value matches {
+											DV_TEXT matches {*}
+										}
+									}
+									ELEMENT[at0.0.13] occurrences matches {0..1} matches {	-- Description
+										value matches {
+											DV_TEXT matches {*}
+										}
+									}
+								}
+							}
+						}
+					}
+				}
+			}
+			ELEMENT[at0006] occurrences matches {0..*} matches {	-- Image
+				value matches {
+					DV_MULTIMEDIA matches {
+						media_type matches {
+							[openEHR::
+							426, 
+							427, 
+							429]
+						}
+					}
+				}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["en"] = <
+			items = <
+				["at0.0.10"] = <
+					description = <"All major lymph nodes">
+					text = <"Lymph nodes">
+				>
+				["at0.0.11"] = <
+					description = <"The name of the node">
+					text = <"Node name">
+					comment = <"SNOMED Lymphnode">
+				>
+				["at0.0.12"] = <
+					description = <"Group of findings relating to an individual node">
+					text = <"Node">
+				>
+				["at0.0.13"] = <
+					description = <"Description of individual node">
+					text = <"Description">
+				>
+				["at0.1"] = <
+					description = <"Information about the size of the object for examination">
+					text = <"Size">
+				>
+				["at0.9"] = <
+					description = <"The object of examination">
+					text = <"Object">
+				>
+				["at0.9.1"] = <
+					description = <"The group of nodes examined">
+					text = <"Lymph node group">
+					comment = <"SNOMED query LymphnodeGroup">
+				>
+				["at0000"] = <
+					description = <"Generic examination cluster for describing a finding on physical examination">
+					text = <"Examination">
+				>
+				["at0000.1"] = <
+					description = <"Generic examination cluster for describing a finding on physical examination">
+					text = <"Examination of a named body part">
+				>
+				["at0000.1.1"] = <
+					description = <"For recording the findings on physical examination of lymph nodes">
+					text = <"Examination of lymph nodes">
+				>
+				["at0002"] = <
+					description = <"Textural description of the part examined">
+					text = <"Clinical description">
+				>
+				["at0003"] = <
+					description = <"More focused examination findings">
+					text = <"Detail">
+				>
+				["at0003.0.1"] = <
+					description = <"More focused examination findings on each node">
+					text = <"Individual nodes">
+				>
+				["at0004"] = <
+					description = <"A group of statements about the normality of the examination">
+					text = <"Normal statements">
+				>
+				["at0005"] = <
+					description = <"A specific statement of normality">
+					text = <"Normal statement">
+				>
+				["at0006"] = <
+					description = <"Drawing or image of the area examined">
+					text = <"Image">
+				>
+				["at0008"] = <
+					description = <"Clinical findings">
+					text = <"Findings">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-generic-mass.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-generic-mass.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-generic-mass.v1.adl	(revision 367)
@@ -0,0 +1,221 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-CLUSTER.exam-generic-mass.v1
+specialize
+	openEHR-EHR-CLUSTER.exam-generic.v1
+
+concept
+	[at0000.1]	-- Examination of a named mass
+language
+	original_language = <[ISO_639-1::en]>
+description
+	original_author = <
+		["name"] = <"unknown">
+	>
+	details = <
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"A generic cluster for recording findings on physical examination of the findings when examining a pathological mass occupying lesion which might be a swelling, lump or mass.">
+			use = <"">
+			keywords = <"examination", "physical">
+			misuse = <"">
+		>
+	>
+	lifecycle_state = <"Initial">
+	other_contributors = <>
+
+definition
+	CLUSTER[at0000.1.1] matches {	-- Examination of a mass lesion
+		items cardinality matches {0..*; unordered} matches {
+			ELEMENT[at0.9] matches {	-- Object
+				value matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {
+							[local::
+							at0.0.1, 	-- Mass
+							at0.0.2, 	-- Lump
+							at0.0.3]	-- Swelling
+						}
+					}
+				}
+			}
+			CLUSTER[at0004] occurrences matches {0..1} matches {	-- Normal statements
+				items cardinality matches {0..*; unordered} matches {
+					ELEMENT[at0005] occurrences matches {0..*} matches {	-- Normal statement
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+				}
+			}
+			ELEMENT[at0002] occurrences matches {0..1} matches {	-- Clinical description
+				value matches {
+					DV_TEXT matches {*}
+				}
+			}
+			CLUSTER[at0008] occurrences matches {0..1} matches {	-- Findings
+				items cardinality matches {0..*; unordered} matches {
+					allow_archetype CLUSTER occurrences matches {0..*} matches {
+						include
+							archetype_id/value matches {/palpation\.v1draft/}
+							archetype_id/value matches {/inspection\.v1draft/}
+					}
+					CLUSTER[at0.1] occurrences matches {0..1} matches {	-- Size
+						items cardinality matches {0..*; unordered} matches {
+							allow_archetype CLUSTER occurrences matches {0..1} matches {
+								include
+									archetype_id/value matches {/dimensions\.v1/}
+									archetype_id/value matches {/size\.v1draft/}
+							}
+						}
+					}
+					ELEMENT[at0.0.4] occurrences matches {0..1} matches {	-- Location
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+					ELEMENT[at0.0.5] occurrences matches {0..1} matches {	-- Arising from
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+					ELEMENT[at0.0.6] occurrences matches {0..1} matches {	-- Mobility
+						value matches {
+							DV_CODED_TEXT matches {
+								defining_code matches {
+									[local::
+									at0.0.7, 	-- Highly mobile
+									at0.0.8, 	-- Mobile
+									at0.0.9, 	-- Fixed
+									at0.0.10]	-- Adherent
+								}
+							}
+						}
+					}
+					allow_archetype CLUSTER occurrences matches {0..*} matches {
+						include
+							archetype_id/value matches {/palpation\.v1draft/}
+							archetype_id/value matches {/auscultation\.v1draft/}
+							archetype_id/value matches {/inspection\.v1draft/}
+						exclude
+							archetype_id/value matches {/.*/}
+					}
+					CLUSTER[at0003] occurrences matches {0..1} matches {	-- Detail
+						items cardinality matches {0..*; unordered} matches {
+							allow_archetype CLUSTER occurrences matches {0..1} matches {
+								include
+									archetype_id/value matches {/exam\.v1/}
+							}
+						}
+					}
+				}
+			}
+			ELEMENT[at0006] occurrences matches {0..*} matches {	-- Image
+				value matches {
+					DV_MULTIMEDIA matches {
+						media_type matches {
+							[openEHR::
+							426, 
+							427, 
+							429]
+						}
+					}
+				}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["en"] = <
+			items = <
+				["at0.0.1"] = <
+					description = <"The object is a mass lesion">
+					text = <"Mass">
+				>
+				["at0.0.10"] = <
+					description = <"The mass merges with surrounding structures">
+					text = <"Adherent">
+				>
+				["at0.0.2"] = <
+					description = <"The object is a lump">
+					text = <"Lump">
+				>
+				["at0.0.3"] = <
+					description = <"The object of examination is a swelling">
+					text = <"Swelling">
+				>
+				["at0.0.4"] = <
+					description = <"The location of the mass">
+					text = <"Location">
+				>
+				["at0.0.5"] = <
+					description = <"The organ or body structure from which the lesion is arising">
+					text = <"Arising from">
+				>
+				["at0.0.6"] = <
+					description = <"The mobility of the mass lesion">
+					text = <"Mobility">
+				>
+				["at0.0.7"] = <
+					description = <"The mass lesion is apparently untethered to surrounding structures">
+					text = <"Highly mobile">
+				>
+				["at0.0.8"] = <
+					description = <"The mass is tethered but moves freely">
+					text = <"Mobile">
+				>
+				["at0.0.9"] = <
+					description = <"The mass is fixed to surrounding structures">
+					text = <"Fixed">
+				>
+				["at0.1"] = <
+					description = <"Information about the size of the object for examination">
+					text = <"Size">
+				>
+				["at0.9"] = <
+					description = <"The object of examination">
+					text = <"Object">
+				>
+				["at0000"] = <
+					description = <"Generic examination cluster for describing a finding on physical examination">
+					text = <"Examination">
+				>
+				["at0000.1"] = <
+					description = <"For describing findings on physical examination relating to a mass">
+					text = <"Examination of a named mass">
+				>
+				["at0000.1.1"] = <
+					description = <"Generic examination cluster for describing the findings on physical examination of a mass, lump or swelling">
+					text = <"Examination of a mass lesion">
+				>
+				["at0001"] = <
+					description = <"The object of the examination">
+					text = <"Object">
+				>
+				["at0002"] = <
+					description = <"Textural description of the part examined">
+					text = <"Clinical description">
+				>
+				["at0003"] = <
+					description = <"More focused examination findings">
+					text = <"Detail">
+				>
+				["at0004"] = <
+					description = <"A group of statements about the normality of the examination">
+					text = <"Normal statements">
+				>
+				["at0005"] = <
+					description = <"A specific statement of normality">
+					text = <"Normal statement">
+				>
+				["at0006"] = <
+					description = <"Drawing or image of the area examined">
+					text = <"Image">
+				>
+				["at0008"] = <
+					description = <"Clinical findings">
+					text = <"Findings">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-generic.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-generic.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-generic.v1.adl	(revision 367)
@@ -0,0 +1,139 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-CLUSTER.exam-generic.v1
+specialize
+	openEHR-EHR-CLUSTER.exam.v1
+
+concept
+	[at0000.1]	-- Examination of a named body part
+language
+	original_language = <[ISO_639-1::en]>
+description
+	original_author = <
+		["name"] = <"unknown">
+	>
+	details = <
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"A generic cluster for recording findings on physical examination.">
+			use = <"">
+			keywords = <"examination", "physical">
+			misuse = <"">
+		>
+	>
+	lifecycle_state = <"Initial">
+	other_contributors = <>
+
+definition
+	CLUSTER[at0000.1] matches {	-- Examination of a named body part
+		items cardinality matches {0..*; unordered} matches {
+			ELEMENT[at0.9] matches {	-- Object
+				value matches {
+					DV_TEXT matches {*}
+				}
+			}
+			CLUSTER[at0004] occurrences matches {0..1} matches {	-- Normal statements
+				items cardinality matches {0..*; unordered} matches {
+					ELEMENT[at0005] occurrences matches {0..*} matches {	-- Normal statement
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+				}
+			}
+			ELEMENT[at0002] occurrences matches {0..1} matches {	-- Clinical description
+				value matches {
+					DV_TEXT matches {*}
+				}
+			}
+			CLUSTER[at0008] occurrences matches {0..1} matches {	-- Findings
+				items cardinality matches {0..*; unordered} matches {
+					allow_archetype CLUSTER occurrences matches {0..*} matches {
+						include
+							archetype_id/value matches {/palpation\.v1draft/}
+							archetype_id/value matches {/auscultation\.v1draft/}
+							archetype_id/value matches {/inspection\.v1draft/}
+							archetype_id/value matches {/percussion\.v1draft/}
+						exclude
+							archetype_id/value matches {/.*/}
+					}
+					CLUSTER[at0.1] occurrences matches {0..1} matches {	-- Size
+						items cardinality matches {0..*; unordered} matches {
+							allow_archetype CLUSTER occurrences matches {0..1} matches {
+								include
+									archetype_id/value matches {/dimensions\.v1/}
+									archetype_id/value matches {/size\.v1draft/}
+							}
+						}
+					}
+					CLUSTER[at0003] occurrences matches {0..1} matches {	-- Detail
+						items cardinality matches {0..*; unordered} matches {
+							allow_archetype CLUSTER occurrences matches {0..1} matches {
+								include
+									archetype_id/value matches {/exam-generic\.v1/}
+							}
+						}
+					}
+				}
+			}
+			ELEMENT[at0006] occurrences matches {0..*} matches {	-- Image
+				value matches {
+					DV_MULTIMEDIA matches {
+						media_type matches {
+							[openEHR::
+							426, 
+							427, 
+							429]
+						}
+					}
+				}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["en"] = <
+			items = <
+				["at0.1"] = <
+					description = <"Information about the size of the object for examination">
+					text = <"Size">
+				>
+				["at0.9"] = <
+					description = <"The object of examination">
+					text = <"Object">
+				>
+				["at0000"] = <
+					description = <"Generic examination cluster for describing a finding on physical examination">
+					text = <"Examination">
+				>
+				["at0000.1"] = <
+					description = <"Generic examination cluster for describing a finding on physical examination">
+					text = <"Examination of a named body part">
+				>
+				["at0002"] = <
+					description = <"Textural description of the part examined">
+					text = <"Clinical description">
+				>
+				["at0003"] = <
+					description = <"More focused examination findings">
+					text = <"Detail">
+				>
+				["at0004"] = <
+					description = <"A group of statements about the normality of the examination">
+					text = <"Normal statements">
+				>
+				["at0005"] = <
+					description = <"A specific statement of normality">
+					text = <"Normal statement">
+				>
+				["at0006"] = <
+					description = <"Drawing or image of the area examined">
+					text = <"Image">
+				>
+				["at0008"] = <
+					description = <"Clinical findings">
+					text = <"Findings">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-nervous_system.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-nervous_system.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-nervous_system.v1.adl	(revision 367)
@@ -0,0 +1,116 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-CLUSTER.exam-nervous_system.v1
+specialize
+	openEHR-EHR-CLUSTER.exam.v1
+
+concept
+	[at0000.1]	-- Examination of nervous system
+language
+	original_language = <[ISO_639-1::en]>
+description
+	original_author = <
+		["name"] = <"unknown">
+	>
+	details = <
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"A generic cluster for recording findings on physical examination of the nervous system.">
+			use = <"">
+			keywords = <"examination", "physical">
+			misuse = <"">
+		>
+	>
+	lifecycle_state = <"Initial">
+	other_contributors = <>
+
+definition
+	CLUSTER[at0000.1] matches {	-- Examination of nervous system
+		items cardinality matches {0..*; unordered} matches {
+			CLUSTER[at0004] occurrences matches {0..1} matches {	-- Normal statements
+				items cardinality matches {0..*; unordered} matches {
+					ELEMENT[at0005] occurrences matches {0..*} matches {	-- Normal statement
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+				}
+			}
+			ELEMENT[at0002] occurrences matches {0..1} matches {	-- Clinical description
+				value matches {
+					DV_TEXT matches {*}
+				}
+			}
+			CLUSTER[at0008] occurrences matches {0..1} matches {	-- Findings
+				items cardinality matches {0..*; unordered} matches {
+					allow_archetype CLUSTER occurrences matches {0..1} matches {
+						include
+							archetype_id/value matches {/cranial_nerves\.v1draft/}
+							archetype_id/value matches {/coordination\.v1draft/}
+							archetype_id/value matches {/balance\.v1draft/}
+							archetype_id/value matches {/gait\.v1draft/}
+							archetype_id/value matches {/move\.v1/}
+					}
+					CLUSTER[at0003] occurrences matches {0..1} matches {	-- Detail
+						items cardinality matches {0..*; unordered} matches {
+							allow_archetype CLUSTER occurrences matches {0..1} matches {
+								include
+									archetype_id/value matches {/exam-generic\.v1/}
+							}
+						}
+					}
+				}
+			}
+			ELEMENT[at0006] occurrences matches {0..*} matches {	-- Image
+				value matches {
+					DV_MULTIMEDIA matches {
+						media_type matches {
+							[openEHR::
+							426, 
+							427, 
+							429]
+						}
+					}
+				}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["en"] = <
+			items = <
+				["at0000"] = <
+					description = <"Basic examination cluster for describing findings on physical examination when there is no named focus of examination">
+					text = <"Examination">
+				>
+				["at0000.1"] = <
+					description = <"Basic examination cluster for describing findings on physical examination of the nervous system">
+					text = <"Examination of nervous system">
+				>
+				["at0002"] = <
+					description = <"Textural description of the part examined">
+					text = <"Clinical description">
+				>
+				["at0003"] = <
+					description = <"More focused examination findings">
+					text = <"Detail">
+				>
+				["at0004"] = <
+					description = <"A group of statements about the normality of the examination">
+					text = <"Normal statements">
+				>
+				["at0005"] = <
+					description = <"A specific statement of normality">
+					text = <"Normal statement">
+				>
+				["at0006"] = <
+					description = <"Drawing or image of the area examined">
+					text = <"Image">
+				>
+				["at0008"] = <
+					description = <"Clinical findings">
+					text = <"Findings">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-uterine_cervix.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-uterine_cervix.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-CLUSTER.exam-uterine_cervix.v1.adl	(revision 367)
@@ -0,0 +1,420 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-CLUSTER.exam-uterine_cervix.v1
+specialize
+	openEHR-EHR-CLUSTER.exam.v1
+
+concept
+	[at0000.1]	-- Examination of the cervix
+language
+	original_language = <[ISO_639-1::en]>
+description
+	original_author = <
+		["name"] = <"unknown">
+	>
+	details = <
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"A cluster for recording findings regarding the uterine cervix on physical examination.">
+			use = <"">
+			keywords = <"examination", "physical", "cervix", "uterine">
+			misuse = <"">
+		>
+	>
+	lifecycle_state = <"Initial">
+	other_contributors = <>
+
+definition
+	CLUSTER[at0000.1] matches {	-- Examination of the cervix
+		items cardinality matches {0..*; unordered} matches {
+			CLUSTER[at0004] occurrences matches {0..1} matches {	-- Normal statements
+				items cardinality matches {0..*; unordered} matches {
+					ELEMENT[at0005] occurrences matches {0..*} matches {	-- Normal statement
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+				}
+			}
+			ELEMENT[at0002] occurrences matches {0..1} matches {	-- Clinical description
+				value matches {
+					DV_TEXT matches {*}
+				}
+			}
+			CLUSTER[at0008] occurrences matches {0..1} matches {	-- Findings
+				items cardinality matches {0..*; unordered} matches {
+					ELEMENT[at0.8] occurrences matches {0..1} matches {	-- Position
+						value matches {
+							DV_CODED_TEXT matches {
+								defining_code matches {
+									[local::
+									at0.9, 	-- Central
+									at0.10, 	-- To the right
+									at0.11, 	-- To the left
+									at0.12, 	-- Anterior
+									at0.13]	-- Posterior
+								}
+							}
+						}
+					}
+					ELEMENT[at0.36] occurrences matches {0..1} matches {	-- Consistency
+						value matches {
+							DV_CODED_TEXT matches {
+								defining_code matches {
+									[local::
+									at0.37, 	-- Soft
+									at0.38]	-- Firm
+								}
+							}
+						}
+					}
+					CLUSTER[at0007] occurrences matches {0..1} matches {	-- Size
+						items cardinality matches {0..*; unordered} matches {
+							allow_archetype CLUSTER occurrences matches {0..1} matches {
+								include
+									archetype_id/value matches {/dimensions\.v1/}
+							}
+						}
+					}
+					CLUSTER[at0.48] occurrences matches {0..1} matches {	-- Labour-specific findings
+						items cardinality matches {0..*; unordered} matches {
+							ELEMENT[at0.14] occurrences matches {0..1} matches {	-- Effacement
+								value matches {
+									0|[local::at0.15], 	-- Uneffaced
+									5|[local::at0.26], 	-- Ripe
+									10|[local::at0.16], 	-- 10% effaced
+									20|[local::at0.17], 	-- 20% effaced
+									30|[local::at0.18], 	-- 30% effaced
+									40|[local::at0.19], 	-- 40% effaced
+									50|[local::at0.20], 	-- Partially (50%) effaced
+									60|[local::at0.21], 	-- 60% effaced
+									70|[local::at0.22], 	-- 70% effaced
+									80|[local::at0.23], 	-- 80% effaced
+									90|[local::at0.24], 	-- 90% effaced
+									100|[local::at0.25]  	-- Fully effaced
+								}
+							}
+							ELEMENT[at0.40] occurrences matches {0..1} matches {	-- Thickness
+								value matches {
+									DV_CODED_TEXT matches {
+										defining_code matches {
+											[local::
+											at0.41, 	-- Thick
+											at0.42, 	-- Thin
+											at0.43, 	-- Paper-thin
+											at0.44]	-- Oedematous
+										}
+									}
+								}
+							}
+							ELEMENT[at0.45] occurrences matches {0..1} matches {	-- Application to presenting part
+								value matches {
+									DV_CODED_TEXT matches {
+										defining_code matches {
+											[local::
+											at0.46, 	-- Loosely applied
+											at0.47]	-- Tightly applied
+										}
+									}
+								}
+							}
+							CLUSTER[at0.27] occurrences matches {0..2} matches {	-- Cervical os
+								items cardinality matches {0..*; unordered} matches {
+									ELEMENT[at0.32] occurrences matches {0..1} matches {	-- Site
+										value matches {
+											DV_CODED_TEXT matches {
+												defining_code matches {
+													[local::
+													at0.33, 	-- External os
+													at0.34]	-- Internal os
+												}
+											}
+										}
+									}
+									CLUSTER[at0.31] occurrences matches {0..1} matches {	-- Dilation
+										items cardinality matches {0..*; unordered} matches {
+											ELEMENT[at0.28] occurrences matches {0..1} matches {	-- Estimate
+												value matches {
+													C_DV_QUANTITY <
+														property = <[openehr::122]>
+														list = <
+															["1"] = <
+																units = <"cm">
+																magnitude = <|0.0..10.0|>
+																precision = <|1|>
+															>
+														>
+													>
+												}
+											}
+											ELEMENT[at0.35] occurrences matches {0..1} matches {	-- Number of finger tips admitted
+												value matches {
+													DV_COUNT matches {*}
+												}
+											}
+										}
+									}
+									ELEMENT[at0.29] occurrences matches {0..1} matches {	-- Findings
+										value matches {
+											DV_TEXT matches {*}
+										}
+									}
+								}
+							}
+						}
+					}
+					allow_archetype CLUSTER occurrences matches {0..*} matches {
+						include
+							archetype_id/value matches {/palpation\.v1draft/}
+							archetype_id/value matches {/inspection\.v1draft/}
+						exclude
+							archetype_id/value matches {/.*/}
+					}
+					CLUSTER[at0.30] occurrences matches {0..1} matches {	-- Vaginal fluid
+						items cardinality matches {0..*; unordered} matches {
+							allow_archetype CLUSTER occurrences matches {0..1} matches {
+								include
+									archetype_id/value matches {/fluid\.v1/}
+							}
+						}
+					}
+					CLUSTER[at0003] occurrences matches {0..1} matches {	-- Detail
+						items cardinality matches {0..*; unordered} matches {
+							allow_archetype CLUSTER occurrences matches {0..1} matches {
+								include
+									archetype_id/value matches {/exam\.v1/}
+									archetype_id/value matches {/exam-fetus\.v1/}
+							}
+						}
+					}
+				}
+			}
+			ELEMENT[at0006] occurrences matches {0..*} matches {	-- Image
+				value matches {
+					DV_MULTIMEDIA matches {
+						media_type matches {
+							[openEHR::
+							426, 
+							427, 
+							429]
+						}
+					}
+				}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["en"] = <
+			items = <
+				["at0.1"] = <
+					description = <"Information about the size of the object for examination">
+					text = <"Size">
+				>
+				["at0.10"] = <
+					description = <"The cervix is deviated to the right">
+					text = <"To the right">
+				>
+				["at0.11"] = <
+					description = <"The cervix is deviated to the left">
+					text = <"To the left">
+				>
+				["at0.12"] = <
+					description = <"The cervix is anterior near the pubis">
+					text = <"Anterior">
+				>
+				["at0.13"] = <
+					description = <"The cervix is at the back near the sacrum">
+					text = <"Posterior">
+				>
+				["at0.14"] = <
+					description = <"The effacement of the uterine cervix in late pregnancy or labour.">
+					text = <"Effacement">
+				>
+				["at0.15"] = <
+					description = <"The cervix has not changed its form">
+					text = <"Uneffaced">
+				>
+				["at0.16"] = <
+					description = <"The cervix is effaced to about 10%">
+					text = <"10% effaced">
+				>
+				["at0.17"] = <
+					description = <"The cervix is effaced to about 20%">
+					text = <"20% effaced">
+				>
+				["at0.18"] = <
+					description = <"The cervix is effaced to about 30%">
+					text = <"30% effaced">
+				>
+				["at0.19"] = <
+					description = <"The cervix is effaced to about 40%">
+					text = <"40% effaced">
+				>
+				["at0.20"] = <
+					description = <"The cervix is partially effaced to about 50%">
+					text = <"Partially (50%) effaced">
+				>
+				["at0.21"] = <
+					description = <"The cervix is effaced to about 60%">
+					text = <"60% effaced">
+				>
+				["at0.22"] = <
+					description = <"The cervix is effaced to about 70%">
+					text = <"70% effaced">
+				>
+				["at0.23"] = <
+					description = <"The cervix is effaced to about 80%">
+					text = <"80% effaced">
+				>
+				["at0.24"] = <
+					description = <"The cervix is effaced to about 90%">
+					text = <"90% effaced">
+				>
+				["at0.25"] = <
+					description = <"The cervix is fully effaced to 100%">
+					text = <"Fully effaced">
+				>
+				["at0.26"] = <
+					description = <"The cervix is ripe and beginning to efface">
+					text = <"Ripe">
+				>
+				["at0.27"] = <
+					description = <"The outlet of the uterus">
+					text = <"Cervical os">
+				>
+				["at0.28"] = <
+					description = <"The dilation of the os">
+					text = <"Estimate">
+				>
+				["at0.29"] = <
+					description = <"Findings about the cervical os">
+					text = <"Findings">
+				>
+				["at0.30"] = <
+					description = <"Vaginal loss or discharge">
+					text = <"Vaginal fluid">
+				>
+				["at0.31"] = <
+					description = <"Dilation of cervix">
+					text = <"Dilation">
+				>
+				["at0.32"] = <
+					description = <"Identify part of cervix which is being examined">
+					text = <"Site">
+				>
+				["at0.33"] = <
+					description = <"External opening of the cervix to the vagina">
+					text = <"External os">
+				>
+				["at0.34"] = <
+					description = <"Internal opening of the cervix to the uterus">
+					text = <"Internal os">
+				>
+				["at0.35"] = <
+					description = <"Number of finger tips that are able to be admitted into the internal or external os">
+					text = <"Number of finger tips admitted">
+				>
+				["at0.36"] = <
+					description = <"Consistency of cervix">
+					text = <"Consistency">
+				>
+				["at0.37"] = <
+					description = <"Soft">
+					text = <"Soft">
+				>
+				["at0.38"] = <
+					description = <"Firm">
+					text = <"Firm">
+				>
+				["at0.39"] = <
+					description = <"Length of cervix">
+					text = <"Length">
+				>
+				["at0.40"] = <
+					description = <"Cervical thickness">
+					text = <"Thickness">
+				>
+				["at0.41"] = <
+					description = <"Thick">
+					text = <"Thick">
+				>
+				["at0.42"] = <
+					description = <"Thin">
+					text = <"Thin">
+				>
+				["at0.43"] = <
+					description = <"Very thin">
+					text = <"Paper-thin">
+				>
+				["at0.44"] = <
+					description = <"Thickened and swollen">
+					text = <"Oedematous">
+				>
+				["at0.45"] = <
+					description = <"Application of cervix to fetal presenting part">
+					text = <"Application to presenting part">
+				>
+				["at0.46"] = <
+					description = <"Not moulded to presenting part">
+					text = <"Loosely applied">
+				>
+				["at0.47"] = <
+					description = <"Moulded to presenting part">
+					text = <"Tightly applied">
+				>
+				["at0.48"] = <
+					description = <"*">
+					text = <"Labour-specific findings">
+				>
+				["at0.8"] = <
+					description = <"The position in relation to the normal anatomical position">
+					text = <"Position">
+				>
+				["at0.9"] = <
+					description = <"The cervix is central and in the normal position">
+					text = <"Central">
+				>
+				["at0000"] = <
+					description = <"Generic examination cluster for describing a finding on physical examination">
+					text = <"Examination">
+				>
+				["at0000.1"] = <
+					description = <"Examination findings on physical examination of the uterine cervix">
+					text = <"Examination of the cervix">
+				>
+				["at0001"] = <
+					description = <"The object of the examination">
+					text = <"Object">
+				>
+				["at0002"] = <
+					description = <"Textural description of the part examined">
+					text = <"Clinical description">
+				>
+				["at0003"] = <
+					description = <"More focused examination findings">
+					text = <"Detail">
+				>
+				["at0004"] = <
+					description = <"A group of statements about the normality of the examination">
+					text = <"Normal statements">
+				>
+				["at0005"] = <
+					description = <"A specific statement of normality">
+					text = <"Normal statement">
+				>
+				["at0006"] = <
+					description = <"Drawing or image of the area examined">
+					text = <"Image">
+				>
+				["at0007"] = <
+					description = <"Information about the size of the object for examination">
+					text = <"Size">
+				>
+				["at0008"] = <
+					description = <"Clinical findings">
+					text = <"Findings">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-COMPOSITION.discharge.v1draft.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-COMPOSITION.discharge.v1draft.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-COMPOSITION.discharge.v1draft.adl	(revision 367)
@@ -0,0 +1,53 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-COMPOSITION.discharge.v1draft
+
+concept
+	[at0000]	-- Discharge
+language
+	original_language = <[ISO_639-1::en]>
+description
+	original_author = <
+		["name"] = <"unknown">
+	>
+	details = <
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"For communication at the time of discharge from an episode of care or an institution.">
+			use = <"">
+			misuse = <"">
+		>
+	>
+	lifecycle_state = <"Initial">
+	other_contributors = <>
+
+definition
+	COMPOSITION[at0000] matches {	-- Discharge
+		category matches {
+			DV_CODED_TEXT matches {
+				defining_code matches {[openehr::433]}
+			}
+		}
+		context matches {
+			EVENT_CONTEXT matches {
+				other_context matches {
+					ITEM_TREE[at0001] matches {*}
+				}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["en"] = <
+			items = <
+				["at0000"] = <
+					description = <"A summarising communication about at the time of discharge from an institution or an episode of care">
+					text = <"Discharge">
+				>
+				["at0001"] = <
+					description = <"@ internal @">
+					text = <"Tree">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-COMPOSITION.encounter.v1draft.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-COMPOSITION.encounter.v1draft.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-COMPOSITION.encounter.v1draft.adl	(revision 367)
@@ -0,0 +1,45 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-COMPOSITION.encounter.v1draft
+
+concept
+	[at0000]	-- Encounter
+language
+	original_language = <[ISO_639-1::en]>
+description
+	original_author = <
+		["name"] = <"Thomas Beale">
+		["organisation"] = <"Ocean Informatics">
+		["date"] = <"10/10/2005">
+	>
+	details = <
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"Record of encounter as a progress note.">
+			use = <"">
+			keywords = <"progress", "note", "encounter">
+			misuse = <"">
+		>
+	>
+	lifecycle_state = <"AuthorDraft">
+	other_contributors = <>
+
+definition
+	COMPOSITION[at0000] matches {	-- Encounter
+		category matches {
+			DV_CODED_TEXT matches {
+				defining_code matches {[openehr::433]}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["en"] = <
+			items = <
+				["at0000"] = <
+					description = <"Generic encounter or progress note composition">
+					text = <"Encounter">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-EVALUATION.adverse.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-EVALUATION.adverse.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-EVALUATION.adverse.v1.adl	(revision 367)
@@ -0,0 +1,411 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-EVALUATION.adverse.v1
+
+concept
+	[at0000]	-- Adverse reaction
+language
+	original_language = <[ISO_639-1::en]>
+	translations = <
+		["de"] = <
+			language = <[ISO_639-1::de]>
+			author = <
+				["name"] = <"Jasmin Buck, Sebastian Garde">
+				["organisation"] = <"University of Heidelberg, Central Queensland University">
+			>
+		>
+	>
+description
+	original_author = <
+		["name"] = <"Sam Heard">
+		["organisation"] = <"Ocean Informatics">
+		["date"] = <"23/04/2006">
+		["email"] = <"sam.heard@oceaninformatics.biz">
+	>
+	details = <
+		["de"] = <
+			language = <[ISO_639-1::de]>
+			purpose = <"Zur Dokumentation von Nebenwirkungen auf einen bestimmten Wirkstoff. Die Art dieses Stoffes kann ebenfalls Dokumentiert werden. Früherer Aufzeichnungen können hinzugefügt werden und auch die Art der Reaktion beim jeweiligen Ereignis.">
+			use = <"">
+			keywords = <"Reaktion", "allergisch", "Allergie", "Intoleranz">
+			misuse = <"Nicht zur Dokumentation keines Verlaufs einer Reaktion auf eine Substanz. Für diesen Zweck openEHR-EVALUATION.excluded-adverse  benutzen. Für unbekannte Reaktionen auf beliebige Wirkstoffe openEHR-EVALUATION.excluded benutzen.">
+		>
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"For recording adverse reaction(s) to a particular 'Agent' the type of which may be recorded also. Historical recordings may be added and the type of reaction on each occasion.">
+			use = <"">
+			keywords = <"reaction", "allergic", "allergy", "intolerance">
+			misuse = <"Do not use for recording no history of a reaction to a substance. Use openEHR-EVALUATION.excluded-adverse for this purpose. No known reactions to any agents, use openEHR-EVALUATION.excluded.">
+		>
+	>
+	lifecycle_state = <"AuthorDraft">
+	other_contributors = <"NEHTA data groups (Australia)", "General Practice Computing Group (Australia)">
+
+definition
+	EVALUATION[at0000] matches {	-- Adverse reaction
+		data matches {
+			ITEM_TREE[at0002] matches {	-- structure
+				items cardinality matches {0..*; unordered} matches {
+					ELEMENT[at0003] matches {	-- Agent
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+					ELEMENT[at0010] occurrences matches {0..1} matches {	-- Agent category
+						value matches {
+							DV_CODED_TEXT matches {
+								defining_code matches {
+									[local::
+									at0011, 	-- Food
+									at0012, 	-- Animal
+									at0013, 	-- Medication
+									at0014, 	-- Other chemical or substance
+									at0031, 	-- Non-active ingredient of medication
+									at0033, 	-- Imaging dye or media
+									at0034]	-- Environmental
+								}
+							}
+						}
+					}
+					CLUSTER[at0019] occurrences matches {0..*} matches {	-- Exposure and reaction detail
+						items cardinality matches {1..*; unordered} matches {
+							ELEMENT[at0032] occurrences matches {0..1} matches {	-- Specific substance
+								value matches {
+									DV_TEXT matches {*}
+								}
+							}
+							ELEMENT[at0015] occurrences matches {0..1} matches {	-- Reaction category
+								value matches {
+									DV_CODED_TEXT matches {
+										defining_code matches {
+											[local::
+											at0016, 	-- Intolerance
+											at0017, 	-- Sensitivity
+											at0018, 	-- Allergy
+											at0030]	-- No reaction
+										}
+									}
+								}
+							}
+							ELEMENT[at0004] occurrences matches {0..1} matches {	-- Probability of causation
+								value matches {
+									DV_CODED_TEXT matches {
+										defining_code matches {
+											[local::
+											at0005, 	-- Certain/Highly likely
+											at0006, 	-- Probable
+											at0007]	-- Possible
+										}
+									}
+								}
+							}
+							ELEMENT[at0020] occurrences matches {0..1} matches {	-- Date of exposure
+								value matches {
+									DV_DATE_TIME matches {
+										value matches {yyyy-??-??T??:??:??}
+									}
+								}
+							}
+							ELEMENT[at0021] occurrences matches {0..1} matches {	-- Duration of the exposure
+								value matches {
+									DV_DURATION matches {
+										value matches {PYMWDTHMS}
+									}
+								}
+							}
+							ELEMENT[at0023] occurrences matches {0..1} matches {	-- Reaction severity
+								value matches {
+									DV_CODED_TEXT matches {
+										defining_code matches {
+											[local::
+											at0024, 	-- Mild
+											at0025, 	-- Disabling
+											at0026]	-- Life threatening
+										}
+									}
+								}
+							}
+							ELEMENT[at0022] matches {	-- Reaction description
+								value matches {
+									DV_TEXT matches {*}
+								}
+							}
+							ELEMENT[at0027] occurrences matches {0..1} matches {	-- Date of onset of reaction
+								value matches {
+									DV_DATE_TIME matches {
+										value matches {yyyy-??-??T??:??:??}
+									}
+								}
+							}
+							ELEMENT[at0028] occurrences matches {0..1} matches {	-- Duration of the reaction
+								value matches {
+									C_DV_QUANTITY <
+										property = <[openehr::128]>
+									>
+								}
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["de"] = <
+			items = <
+				["at0000"] = <
+					description = <"Zur Dokumentation des Vorhandenseins von schädlichen oder unerwünschten Reaktionen auf einen Wirkstoff oder eine Substanz, einschließlich Nahrung, festgestellt von einem Klinikarzt - Vergiftungen und unsachgemäßer Gebrauch ausgeschlossen">
+					text = <"Nebenwirkung">
+				>
+				["at0002"] = <
+					description = <"@ internal @">
+					text = <"Structure">
+				>
+				["at0003"] = <
+					description = <"Der Wirkstoff, die Substanz oder die Klasse, welche die Nebenwirkung ausgelöst hat">
+					text = <"Wirkstoff">
+				>
+				["at0004"] = <
+					description = <"Grad an Sicherheit, dass der Wirkstoff der Auslöser der Reaktion war">
+					text = <"Wahrscheinlichkeit für kausalen Zusammenhang">
+				>
+				["at0005"] = <
+					description = <"Die Reaktion ist laut einem Klinikarzt auf den Wirkstoff zurückzuführen">
+					text = <"Sicher/ sehr wahrscheinlich">
+				>
+				["at0006"] = <
+					description = <"Die Reaktion ist wahrscheinlich auf den Wirkstoff zurückzuführen">
+					text = <"Wahrscheinlich">
+				>
+				["at0007"] = <
+					description = <"Die Reaktion ist möglicherweise auf den Wirkstoff zurückzuführen">
+					text = <"Möglicherweise">
+				>
+				["at0010"] = <
+					description = <"Die Gruppe des Wirkstoffs">
+					text = <"Wirkstoffgruppe">
+				>
+				["at0011"] = <
+					description = <"Eine Substanz, die als Teil der Ernährung zugeführt wurde ">
+					text = <"Nahrungsmittel">
+				>
+				["at0012"] = <
+					description = <"Ein lebender Organismus und dessen Gift oder produzierter Stoff">
+					text = <"Tier">
+				>
+				["at0013"] = <
+					description = <"Eine Substanz, die aus medizinischen Gründen eingenommen oder verabreicht wurde">
+					text = <"Medikament">
+				>
+				["at0014"] = <
+					description = <"Nicht-medizinische Chemikalie oder Substanz">
+					text = <"Andere Chemikalie oder Substanz">
+				>
+				["at0015"] = <
+					description = <"Die Art der von der Person erfahrenen Reaktion, von einem Klinikarzt ermittelt">
+					text = <"Reaktionsart">
+				>
+				["at0016"] = <
+					description = <"Führt zu unerfreulichen Symptomen, die ausreichen um einen Gebrauch in der Zukunft zu vermeiden">
+					text = <"Intoleranz">
+				>
+				["at0017"] = <
+					description = <"Führt zu Krankhaftigkeit die eventuell zum Wohle des Patienten behandelt werden muss">
+					text = <"Empfindlichkeit">
+				>
+				["at0018"] = <
+					description = <"Führt zu einer IgE Reaktion">
+					text = <"Allergie">
+				>
+				["at0019"] = <
+					description = <"Einzelheiten der von der Person erfahrenen Reaktion">
+					text = <"Exposition und Einzelheiten der Reaktion">
+				>
+				["at0020"] = <
+					description = <"Das Datum (+/- Zeit) wann die Person gegenüber dem Wirkstoff exponiert wurde">
+					text = <"Datum der Exposition">
+				>
+				["at0021"] = <
+					description = <"Die Dauer der Exposition gegenüber dem Wirkstoff">
+					text = <"Dauer der Exposition">
+				>
+				["at0022"] = <
+					description = <"Eine Beschreibung der von einer Person erfahrenen Reaktion auf einen Wirkstoff">
+					text = <"Beschreibung der Reaktion">
+				>
+				["at0023"] = <
+					description = <"Die Klasse der Reaktion für zukünftige Empfehlungen">
+					text = <"Schweregrad der Reaktion">
+				>
+				["at0024"] = <
+					description = <"Eine Reaktion, die wenig Leiden und keinen Verlust der Arbeitsfähigkeit/ Schulfähigkeit verursacht">
+					text = <"Gelinde">
+				>
+				["at0025"] = <
+					description = <"Eine Reaktion, die Krankheit und/oder den Verlust Funktionen verursacht">
+					text = <"Unfähig machend">
+				>
+				["at0026"] = <
+					description = <"Eine Reaktion die lebensbedrohlich wahr oder sein kann">
+					text = <"Lebensbedrohlich">
+				>
+				["at0027"] = <
+					description = <"Das Datum, an dem die Reaktion eintrat">
+					text = <"Datum des Beginns der Reaktion">
+				>
+				["at0028"] = <
+					description = <"Die Dauer der Reaktion">
+					text = <"Dauer der Reaktion">
+				>
+				["at0030"] = <
+					description = <"Die Person war ohne Reaktion exponiert">
+					text = <"Keine Reaktion">
+				>
+				["at0031"] = <
+					description = <"Ein nicht-medizinischer Bestandteil des Medikaments, wie Farbstoff, Konservierungsstoff, usw. (Untertyp von andere Chemikalien)">
+					text = <"Inaktiver Bestandteil des Medikaments">
+				>
+				["at0032"] = <
+					description = <"Die charakteristische Substanz, die die Reaktion verursacht, falls verschieden vom Wirkstoff (z.B. Marken oder Teile einer Klasse)">
+					text = <"Charakteristische Substanz">
+				>
+				["at0033"] = <
+					description = <"Zur diagnostischen Bildgebung benutzter Farbstoff oder Medium (Untertyp von anderen Chemikalien)">
+					text = <"Abbildender Farbstoff oder Medium">
+				>
+				["at0034"] = <
+					description = <"Ein in der Umwelt vorhandener Wirkstoff">
+					text = <"Umgebend">
+				>
+			>
+		>
+		["en"] = <
+			items = <
+				["at0000"] = <
+					description = <"Recording the presence of a harmful or undesirable response to an agent or substance including food, as determined by the clinician - excluding poisoning and abnormal use">
+					text = <"Adverse reaction">
+				>
+				["at0002"] = <
+					description = <"@ internal @">
+					text = <"structure">
+				>
+				["at0003"] = <
+					description = <"The agent or substance or class that caused the adverse reaction">
+					text = <"Agent">
+				>
+				["at0004"] = <
+					description = <"Degree of certainty that the agent was the cause of the reaction">
+					text = <"Probability of causation">
+				>
+				["at0005"] = <
+					description = <"A reaction to the agent is deemed to be or have been present by the clinician">
+					text = <"Certain/Highly likely">
+				>
+				["at0006"] = <
+					description = <"The reaction is deemed to be the probable cause of the reaction">
+					text = <"Probable">
+				>
+				["at0007"] = <
+					description = <"The agent is deemed to be a possible cause of the reaction">
+					text = <"Possible">
+				>
+				["at0010"] = <
+					description = <"The category of the agent">
+					text = <"Agent category">
+				>
+				["at0011"] = <
+					description = <"A substance taken as part of the diet">
+					text = <"Food">
+				>
+				["at0012"] = <
+					description = <"A living organism or its venom or produce">
+					text = <"Animal">
+				>
+				["at0013"] = <
+					description = <"A substance taken or applied  for medicinal purposes">
+					text = <"Medication">
+				>
+				["at0014"] = <
+					description = <"Non-medicinal chemicals or substances">
+					text = <"Other chemical or substance">
+				>
+				["at0015"] = <
+					description = <"The type of reaction experience by the person as determined by the clinician">
+					text = <"Reaction category">
+				>
+				["at0016"] = <
+					description = <"Leads to unpleasant symptoms which are sufficient to avoid use in the future">
+					text = <"Intolerance">
+				>
+				["at0017"] = <
+					description = <"Leads to morbidity which is potentially threatening to the wellbeing of the person">
+					text = <"Sensitivity">
+				>
+				["at0018"] = <
+					description = <"Leads to an IgE mediated reaction">
+					text = <"Allergy">
+				>
+				["at0019"] = <
+					description = <"Details of the reaction experienced by the person">
+					text = <"Exposure and reaction detail">
+				>
+				["at0020"] = <
+					description = <"The date (+/- time) when the person became exposed to the agent">
+					text = <"Date of exposure">
+				>
+				["at0021"] = <
+					description = <"The duration of the exposure to the agent">
+					text = <"Duration of the exposure">
+				>
+				["at0022"] = <
+					description = <"A description of the reaction to this agent as experienced by the person">
+					text = <"Reaction description">
+				>
+				["at0023"] = <
+					description = <"The category of the reaction for future reference">
+					text = <"Reaction severity">
+				>
+				["at0024"] = <
+					description = <"A reaction which causes little distress and no loss of work/school">
+					text = <"Mild">
+				>
+				["at0025"] = <
+					description = <"A reaction which causes morbidity and/or loss of function">
+					text = <"Disabling">
+				>
+				["at0026"] = <
+					description = <"A reaction which was or could be lifethreatening">
+					text = <"Life threatening">
+				>
+				["at0027"] = <
+					description = <"The date the reaction began">
+					text = <"Date of onset of reaction">
+				>
+				["at0028"] = <
+					description = <"The duration of the reaction">
+					text = <"Duration of the reaction">
+				>
+				["at0030"] = <
+					description = <"Person has been exposed with no reaction">
+					text = <"No reaction">
+				>
+				["at0031"] = <
+					description = <"A non-medicinal ingredient of medication such as colouring, preservative, etc (subtype of other chemical)">
+					text = <"Non-active ingredient of medication">
+				>
+				["at0032"] = <
+					description = <"The specific substance that caused the reaction if different from the agent (e.g. brands or members of a class)">
+					text = <"Specific substance">
+				>
+				["at0033"] = <
+					description = <"A dye or media used in diagnostic imaging (subtype of other chemical)">
+					text = <"Imaging dye or media">
+				>
+				["at0034"] = <
+					description = <"An agent present in the environment">
+					text = <"Environmental">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-INSTRUCTION.medication.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-INSTRUCTION.medication.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-INSTRUCTION.medication.v1.adl	(revision 367)
@@ -0,0 +1,88 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-INSTRUCTION.medication.v1
+
+concept
+	[at0000]	-- Medication order
+language
+	original_language = <[ISO_639-1::en]>
+	translations = <
+		["de"] = <
+			language = <[ISO_639-1::de]>
+			author = <
+				["name"] = <"Jasmin Buck, Sebastian Garde">
+				["organisation"] = <"University of Heidelberg, Central Queensland University">
+			>
+		>
+	>
+description
+	original_author = <
+		["name"] = <"Sam Heard">
+		["organisation"] = <"Ocean Informatics">
+		["date"] = <"21/04/2006">
+		["email"] = <"sam.heard@oceaninformatics.biz">
+	>
+	details = <
+		["de"] = <
+			language = <[ISO_639-1::de]>
+			purpose = <"Zur Dokumentation einer Medikationsverordnung, kann mehr als eine Aktivität enthalten, aber immer mit der selben Struktur">
+			use = <"Zur Dokumentation von Anweisungen bezüglich eines Medikaments">
+			keywords = <"Verschreibung", "Medikationsverordnung", "Verordnung">
+			misuse = <"Nicht zur Dokumentation der Verabreichung, der Gabe usw. benutzen. Für diese Dokumentation openEHR-EHR-ACTION.medication benutzen.">
+		>
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"For recording a medication order, which may involve more than one activity, but all have the same structure.">
+			use = <"For recording an instruction about medication.">
+			keywords = <"prescribe", "medication order", "order">
+			misuse = <"Do not use for recording administration, dispensing etc. Use openEHR-EHR-ACTION.medication for these recordings.">
+		>
+	>
+	lifecycle_state = <"AuthorDraft">
+	other_contributors = <"NEHTA (Australia) data groups", ...>
+
+definition
+	INSTRUCTION[at0000] matches {	-- Medication order
+		activities cardinality matches {0..*; unordered} matches {
+			ACTIVITY[at0001] occurrences matches {0..*} matches {	-- Medication activity
+				action_archetype_id matches {/medication\.v1/}
+				description matches {
+					allow_archetype ITEM_TREE occurrences matches {0..1} matches {
+						include
+							archetype_id/value matches {/medication\.v1/}
+							archetype_id/value matches {/medication-formulation\.v1/}
+							archetype_id/value matches {/medication-vaccine\.v1/}
+						exclude
+							archetype_id/value matches {/.*/}
+					}
+				}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["de"] = <
+			items = <
+				["at0000"] = <
+					description = <"Eine von einem Klinikarzt verfasste Verordnung oder Anweisung, die beschreibt welches Medikament wann, für wie lange usw. eingenommen werden soll">
+					text = <"Medikationsverordnung">
+				>
+				["at0001"] = <
+					description = <"Informationen über die auszuführende Medikationshandlung">
+					text = <"Medikationshandlung">
+				>
+			>
+		>
+		["en"] = <
+			items = <
+				["at0000"] = <
+					description = <"An order or instruction created by a clinician which specifies which medication to take, when, for how long etc.">
+					text = <"Medication order">
+				>
+				["at0001"] = <
+					description = <"Information about the medication action(s) to be carried out">
+					text = <"Medication activity">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-INSTRUCTION.referral.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-INSTRUCTION.referral.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-INSTRUCTION.referral.v1.adl	(revision 367)
@@ -0,0 +1,84 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-INSTRUCTION.referral.v1
+
+concept
+	[at0000]	-- Referral to second provider
+language
+	original_language = <[ISO_639-1::en]>
+	translations = <
+		["de"] = <
+			language = <[ISO_639-1::de]>
+			author = <
+				["name"] = <"Jasmin Buck, Sebastian Garde">
+				["organisation"] = <"University of Heidelberg, Central Queensland University">
+			>
+		>
+	>
+description
+	original_author = <
+		["name"] = <"Sam Heard">
+		["email"] = <"sam.heard@oceaninformatics.biz">
+	>
+	details = <
+		["de"] = <
+			language = <[ISO_639-1::de]>
+			purpose = <"Zur Dokumentation einer Bitte nach Behandlung (Überweisung) durch einen zweiten Gesundheitsdienstleister.">
+			use = <"">
+			keywords = <"Überweisung", "Anfrage", "Anordnung">
+			misuse = <"">
+		>
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"For recording a request for care (referral to) a second health provider">
+			use = <"">
+			keywords = <"refer", "request", "order">
+			misuse = <"">
+		>
+	>
+	lifecycle_state = <"AuthorDraft">
+	other_contributors = <>
+
+definition
+	INSTRUCTION[at0000] matches {	-- Referral to second provider
+		activities cardinality matches {0..*; unordered} matches {
+			ACTIVITY[at0001] occurrences matches {0..1} matches {	-- Refer
+				action_archetype_id matches {/referral\.v1/}
+				description matches {
+					allow_archetype ITEM_TREE occurrences matches {0..1} matches {
+						include
+							archetype_id/value matches {/referral\.v1/}
+						exclude
+							archetype_id/value matches {/.*/}
+					}
+				}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["de"] = <
+			items = <
+				["at0000"] = <
+					description = <"Eine Bitte nach Gesundheitsdienstleistung von einem Anbieter zu einem zweiten.">
+					text = <"Überweisung zu einem zweiten Gesundheitsdienstleister">
+				>
+				["at0001"] = <
+					description = <"Die Handlung der Überweisung zu einem zweiten Gesundheitsdienstleister">
+					text = <"Überweisung">
+				>
+			>
+		>
+		["en"] = <
+			items = <
+				["at0000"] = <
+					description = <"A request for health care from one provider to a second provider">
+					text = <"Referral to second provider">
+				>
+				["at0001"] = <
+					description = <"The activity of referring to a second health provider">
+					text = <"Refer">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-ITEM_TREE.Laboratory_request.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-ITEM_TREE.Laboratory_request.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-ITEM_TREE.Laboratory_request.v1.adl	(revision 367)
@@ -0,0 +1,492 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-ITEM_TREE.laboratory_request.v1
+
+concept
+	[at0000]	-- Laboratory test request
+language
+	original_language = <[ISO_639-1::en]>
+	translations = <
+		["de"] = <
+			language = <[ISO_639-1::de]>
+			author = <
+				["name"] = <"Jasmin Buck, Sebastian Garde">
+				["organisation"] = <"University of Heidelberg, Central Queensland University">
+			>
+		>
+	>
+description
+	original_author = <
+		["name"] = <"unknown">
+	>
+	details = <
+		["de"] = <
+			language = <[ISO_639-1::de]>
+			purpose = <"Laboranforderung">
+			use = <"*">
+			misuse = <"*">
+		>
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"Laboratory request">
+			use = <"">
+			misuse = <"">
+		>
+	>
+	lifecycle_state = <"Initial">
+	other_contributors = <>
+
+definition
+	ITEM_TREE[at0000] occurrences matches {0..*} matches {	-- Laboratory test request
+		items cardinality matches {0..*; unordered} matches {
+			CLUSTER[at0002] occurrences matches {0..1} matches {	-- Clinical information
+				items cardinality matches {0..*; unordered} matches {
+					ELEMENT[at0003] occurrences matches {0..1} matches {	-- Findings
+						value matches {
+							DV_CODED_TEXT matches {
+								defining_code matches {[local::]}
+							}
+						}
+					}
+				}
+			}
+			CLUSTER[at0004] occurrences matches {0..1} matches {	-- Tests required
+				items cardinality matches {0..*; unordered} matches {
+					ELEMENT[at0005] occurrences matches {0..*} matches {	-- Test name
+						value matches {
+							DV_CODED_TEXT matches {
+								defining_code matches {[local::]}
+							}
+						}
+					}
+				}
+			}
+			ELEMENT[at0006] occurrences matches {0..1} matches {	-- DateTime requested
+				value matches {
+					DV_DATE_TIME matches {
+						value matches {yyyy-??-??T??:??:??}
+					}
+				}
+			}
+			ELEMENT[at0007] occurrences matches {0..1} matches {	-- Special instructions
+				value matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[local::]}
+					}
+				}
+			}
+			CLUSTER[at0008] occurrences matches {0..1} matches {	-- Requesting provider details
+				items cardinality matches {0..*; unordered} matches {
+					ELEMENT[at0009] occurrences matches {0..1} matches {	-- Name
+						value matches {
+							DV_CODED_TEXT matches {
+								defining_code matches {[local::]}
+							}
+						}
+					}
+					CLUSTER[at0010] occurrences matches {0..1} matches {	-- Contact details
+						items cardinality matches {0..*; unordered} matches {
+							ELEMENT[at0011] occurrences matches {0..1} matches {	-- Telephone
+								value matches {
+									DV_CODED_TEXT matches {
+										defining_code matches {[local::]}
+									}
+								}
+							}
+							ELEMENT[at0012] occurrences matches {0..1} matches {	-- Email
+								value matches {
+									DV_CODED_TEXT matches {
+										defining_code matches {[local::]}
+									}
+								}
+							}
+							ELEMENT[at0013] occurrences matches {0..1} matches {	-- Facsimile
+								value matches {
+									DV_CODED_TEXT matches {
+										defining_code matches {[local::]}
+									}
+								}
+							}
+							ELEMENT[at0014] occurrences matches {0..1} matches {	-- Address
+								value matches {
+									DV_CODED_TEXT matches {
+										defining_code matches {[local::]}
+									}
+								}
+							}
+						}
+					}
+				}
+			}
+			CLUSTER[at0015] occurrences matches {0..1} matches {	-- Laboratory details
+				items cardinality matches {0..*; unordered} matches {
+					ELEMENT[at0016] occurrences matches {0..1} matches {	-- Name
+						value matches {
+							DV_CODED_TEXT matches {
+								defining_code matches {[local::]}
+							}
+						}
+					}
+					CLUSTER[at0017] occurrences matches {0..1} matches {	-- Contact details
+						items cardinality matches {0..*; unordered} matches {
+							ELEMENT[at0018] occurrences matches {0..1} matches {	-- Telephone
+								value matches {
+									DV_CODED_TEXT matches {
+										defining_code matches {[local::]}
+									}
+								}
+							}
+							ELEMENT[at0019] occurrences matches {0..1} matches {	-- Email
+								value matches {
+									DV_CODED_TEXT matches {
+										defining_code matches {[local::]}
+									}
+								}
+							}
+							ELEMENT[at0020] occurrences matches {0..1} matches {	-- Facsimile
+								value matches {
+									DV_CODED_TEXT matches {
+										defining_code matches {[local::]}
+									}
+								}
+							}
+							ELEMENT[at0021] occurrences matches {0..1} matches {	-- Address
+								value matches {
+									DV_CODED_TEXT matches {
+										defining_code matches {[local::]}
+									}
+								}
+							}
+						}
+					}
+				}
+			}
+			CLUSTER[at0022] occurrences matches {0..1} matches {	-- Process
+				items cardinality matches {0..*; unordered} matches {
+					CLUSTER[at0024] occurrences matches {0..1} matches {	-- Urgency
+						items cardinality matches {0..*; unordered} matches {
+							ELEMENT[at0025] occurrences matches {0..1} matches {	-- Timing
+								value matches {
+									0|[local::at0026], 	-- Emergency
+									1|[local::at0027], 	-- Urgent
+									2|[local::at0028]  	-- Non-urgent
+								}
+							}
+						}
+					}
+					CLUSTER[at0029] occurrences matches {0..1} matches {	-- Specimen details
+						items cardinality matches {0..*; unordered} matches {
+							ELEMENT[at0030] occurrences matches {0..1} matches {	-- Descriptions
+								value matches {
+									DV_CODED_TEXT matches {
+										defining_code matches {[local::]}
+									}
+								}
+							}
+							ELEMENT[at0031] occurrences matches {0..1} matches {	-- Body site
+								value matches {
+									DV_CODED_TEXT matches {
+										defining_code matches {[local::]}
+									}
+								}
+							}
+							ELEMENT[at0032] occurrences matches {0..1} matches {	-- Collection DateTime
+								value matches {
+									DV_DATE_TIME matches {
+										value matches {yyyy-??-??T??:??:??}
+									}
+								}
+							}
+							ELEMENT[at0033] occurrences matches {0..1} matches {	-- Collector name
+								value matches {
+									DV_CODED_TEXT matches {
+										defining_code matches {[local::]}
+									}
+								}
+							}
+							ELEMENT[at0034] occurrences matches {0..1} matches {	-- Tubes collected
+								value matches {
+									DV_COUNT matches {*}
+								}
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["de"] = <
+			items = <
+				["at0000"] = <
+					description = <"Angeforderte Daten eines Labortests als Teil einer Anweisung">
+					text = <"Labortest Anforderung">
+				>
+				["at0002"] = <
+					description = <"Für die Laboranfrage relevante klinische Informationen">
+					text = <"Klinische Informationen">
+				>
+				["at0003"] = <
+					description = <"Für die Laboranfrage relevante klinische Befunde">
+					text = <"Befunde">
+				>
+				["at0004"] = <
+					description = <"Die angeforderten Test bei dieser Laboranfrage">
+					text = <"Angeforderte Tests">
+				>
+				["at0005"] = <
+					description = <"Testname">
+					text = <"Testname">
+				>
+				["at0006"] = <
+					description = <"Datum und Zeitpunkt, wann der Labortest in Auftrag gegeben wurde">
+					text = <"Zeitpunkt des Auftrags">
+				>
+				["at0007"] = <
+					description = <"Besondere Anweisungen dieser Labortestanforderung">
+					text = <"Besondere Anweisungen">
+				>
+				["at0008"] = <
+					description = <"Einzelheiten des Anfordernden">
+					text = <"Einzelheiten des Anfordernden">
+				>
+				["at0009"] = <
+					description = <"Name des Anfordernden">
+					text = <"Name">
+				>
+				["at0010"] = <
+					description = <"Kontakteinzelheiten des Dienstleisters, die den Labortest angefordert hat">
+					text = <"Kantakteinzelheiten">
+				>
+				["at0011"] = <
+					description = <"*">
+					text = <"Telefonnummer">
+				>
+				["at0012"] = <
+					description = <"*">
+					text = <"E-Mail">
+				>
+				["at0013"] = <
+					description = <"*">
+					text = <"Faxnummer">
+				>
+				["at0014"] = <
+					description = <"*">
+					text = <"Adress">
+				>
+				["at0015"] = <
+					description = <"Einzelheiten des Labors zu dem die Anforderung übermittelt wurde">
+					text = <"Einzelheiten des Labors">
+				>
+				["at0016"] = <
+					description = <"*">
+					text = <"Name">
+				>
+				["at0017"] = <
+					description = <"*">
+					text = <"Kontakteinzelheiten">
+				>
+				["at0018"] = <
+					description = <"*">
+					text = <"Telefonnummer">
+				>
+				["at0019"] = <
+					description = <"*">
+					text = <"E-Mail">
+				>
+				["at0020"] = <
+					description = <"*">
+					text = <"Faxnummer">
+				>
+				["at0021"] = <
+					description = <"*">
+					text = <"Adresse">
+				>
+				["at0022"] = <
+					description = <"Informationen zum Ablauf der Laboranforderung">
+					text = <"Ablauf">
+				>
+				["at0024"] = <
+					description = <"*">
+					text = <"Dringlichkeit">
+				>
+				["at0025"] = <
+					description = <"*">
+					text = <"Zeitvorgabe">
+				>
+				["at0026"] = <
+					description = <"Angeforderter Labortest muss sofort ausgeführt werden">
+					text = <"Notfall">
+				>
+				["at0027"] = <
+					description = <"Der angeforderte Labortest muss so bald wie möglich ausgeführt werden">
+					text = <"Dringend">
+				>
+				["at0028"] = <
+					description = <"Ausführung des angeforderter Labortest wenn es dem Labor möglich ist">
+					text = <"Nicht dringend">
+				>
+				["at0029"] = <
+					description = <"Einzelheiten der Probe">
+					text = <"Einzelheiten der Probe">
+				>
+				["at0030"] = <
+					description = <"Beschreibung der Probe">
+					text = <"Beschreibung">
+				>
+				["at0031"] = <
+					description = <"Die Körperstelle, an der die Probe genommen wurde">
+					text = <"Körperstelle">
+				>
+				["at0032"] = <
+					description = <"Das Datum und der Zeitpunkt, wann die Probe gewonnen wurde">
+					text = <"Zeitpunkt der Gewinnung">
+				>
+				["at0033"] = <
+					description = <"Der Name des Abnehmers der Probe">
+					text = <"Name des Abnehmers">
+				>
+				["at0034"] = <
+					description = <"Anzahl der Sammelröhrchen">
+					text = <"Sammelröhrchen">
+				>
+			>
+		>
+		["en"] = <
+			items = <
+				["at0000"] = <
+					description = <"Data about a laboratory test request as part of an instruction">
+					text = <"Laboratory test request">
+				>
+				["at0002"] = <
+					description = <"Clinical information relevant to the laboratory request">
+					text = <"Clinical information">
+				>
+				["at0003"] = <
+					description = <"Clinical findings relevant to the laboratory request.">
+					text = <"Findings">
+				>
+				["at0004"] = <
+					description = <"The required tests by this laboratory request">
+					text = <"Tests required">
+				>
+				["at0005"] = <
+					description = <"Test name">
+					text = <"Test name">
+				>
+				["at0006"] = <
+					description = <"The date and time when the laboratory tests were requested">
+					text = <"DateTime requested">
+				>
+				["at0007"] = <
+					description = <"The special instructions of this laboratory request">
+					text = <"Special instructions">
+				>
+				["at0008"] = <
+					description = <"The laboratory request provider details">
+					text = <"Requesting provider details">
+				>
+				["at0009"] = <
+					description = <"Name of the requesting provider">
+					text = <"Name">
+				>
+				["at0010"] = <
+					description = <"Contact details of the provider who made the laboratory request">
+					text = <"Contact details">
+				>
+				["at0011"] = <
+					description = <"*">
+					text = <"Telephone">
+				>
+				["at0012"] = <
+					description = <"*">
+					text = <"Email">
+				>
+				["at0013"] = <
+					description = <"*">
+					text = <"Facsimile">
+				>
+				["at0014"] = <
+					description = <"*">
+					text = <"Address">
+				>
+				["at0015"] = <
+					description = <"The details of the laboratory to which the laboratory request was referred.">
+					text = <"Laboratory details">
+				>
+				["at0016"] = <
+					description = <"Name of the laboratory">
+					text = <"Name">
+				>
+				["at0017"] = <
+					description = <"*">
+					text = <"Contact details">
+				>
+				["at0018"] = <
+					description = <"*">
+					text = <"Telephone">
+				>
+				["at0019"] = <
+					description = <"*">
+					text = <"Email">
+				>
+				["at0020"] = <
+					description = <"*">
+					text = <"Facsimile">
+				>
+				["at0021"] = <
+					description = <"*">
+					text = <"Address">
+				>
+				["at0022"] = <
+					description = <"Information about the process of the laboratory request">
+					text = <"Process">
+				>
+				["at0024"] = <
+					description = <"*">
+					text = <"Urgency">
+				>
+				["at0025"] = <
+					description = <"*">
+					text = <"Timing">
+				>
+				["at0026"] = <
+					description = <"Require the laboratory test done immediately">
+					text = <"Emergency">
+				>
+				["at0027"] = <
+					description = <"Require the laboratory test done as soon as possible">
+					text = <"Urgent">
+				>
+				["at0028"] = <
+					description = <"Require the laboratory test at laboratories convenience">
+					text = <"Non-urgent">
+				>
+				["at0029"] = <
+					description = <"Specimen details">
+					text = <"Specimen details">
+				>
+				["at0030"] = <
+					description = <"Descriptions of the specimen">
+					text = <"Descriptions">
+				>
+				["at0031"] = <
+					description = <"The site of the body where the specimen was collected">
+					text = <"Body site">
+				>
+				["at0032"] = <
+					description = <"The date and time when the specimen was collected.">
+					text = <"Collection DateTime">
+				>
+				["at0033"] = <
+					description = <"The specimen collector name">
+					text = <"Collector name">
+				>
+				["at0034"] = <
+					description = <"Indicate number of tubes">
+					text = <"Tubes collected">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-ITEM_TREE.imaging.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-ITEM_TREE.imaging.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-ITEM_TREE.imaging.v1.adl	(revision 367)
@@ -0,0 +1,127 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-ITEM_TREE.imaging.v1
+
+concept
+	[at0000]	-- Imaging data
+language
+	original_language = <[ISO_639-1::en]>
+description
+	original_author = <
+		["name"] = <"Sam Heard">
+		["organisation"] = <"Ocean Informatics">
+		["date"] = <"9/01/2007">
+		["email"] = <"sam.heard@oceaninformatics.biz">
+	>
+	details = <
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"Data for the description of the action or instruction related to imaging">
+			use = <"">
+			keywords = <"Xray", "scan", "MRI", "CT", "nuclear", "ultrasound">
+			misuse = <"">
+		>
+	>
+	lifecycle_state = <"AuthorDraft">
+	other_contributors = <>
+
+definition
+	ITEM_TREE[at0001] occurrences matches {0..*} matches {	-- Tree
+		items cardinality matches {0..*; ordered} matches {
+			CLUSTER[at0002] occurrences matches {0..1} matches {	-- Clinical information
+				items cardinality matches {1; unordered} matches {
+					ELEMENT[at0003] matches {	-- Findings
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+				}
+			}
+			CLUSTER[at0004] occurrences matches {1..*} matches {	-- Imaging
+				items cardinality matches {1..*; unordered} matches {
+					ELEMENT[at0005] matches {	-- Imaging procedure
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+					ELEMENT[at0007] occurrences matches {0..1} matches {	-- Anatomical site
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+					ELEMENT[at0006] occurrences matches {0..*} matches {	-- Views
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+				}
+			}
+			CLUSTER[at0008] occurrences matches {0..1} matches {	-- Process
+				items cardinality matches {0..*; unordered} matches {
+					ELEMENT[at0009] occurrences matches {0..1} matches {	-- Date of imaging
+						value matches {
+							DV_DATE_TIME matches {
+								value matches {yyyy-??-??T??:??:??}
+							}
+						}
+					}
+					ELEMENT[at0010] occurrences matches {0..1} matches {	-- Location
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+				}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["en"] = <
+			items = <
+				["at0000"] = <
+					description = <"Data recorded about an imaging action or instruction">
+					text = <"Imaging data">
+				>
+				["at0001"] = <
+					description = <"@ internal @">
+					text = <"Tree">
+				>
+				["at0002"] = <
+					description = <"Clinical information relevant to the imaging investigation">
+					text = <"Clinical information">
+				>
+				["at0003"] = <
+					description = <"Clinical findings relevant to the imaging investigation">
+					text = <"Findings">
+				>
+				["at0004"] = <
+					description = <"Information about the imaging">
+					text = <"Imaging">
+				>
+				["at0005"] = <
+					description = <"The type of imaging">
+					text = <"Imaging procedure">
+				>
+				["at0006"] = <
+					description = <"The imaging views">
+					text = <"Views">
+				>
+				["at0007"] = <
+					description = <"The anatomical site (or object) for imaging">
+					text = <"Anatomical site">
+				>
+				["at0008"] = <
+					description = <"The process of the imaging investigation">
+					text = <"Process">
+				>
+				["at0009"] = <
+					description = <"The date the imaging is to be or was carried out.">
+					text = <"Date of imaging">
+				>
+				["at0010"] = <
+					description = <"The location where the imaging is to be or was carried out">
+					text = <"Location">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-ITEM_TREE.medication.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-ITEM_TREE.medication.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-ITEM_TREE.medication.v1.adl	(revision 367)
@@ -0,0 +1,869 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-ITEM_TREE.medication.v1
+
+concept
+	[at0000]	-- Medication description
+language
+	original_language = <[ISO_639-1::en]>
+	translations = <
+		["de"] = <
+			language = <[ISO_639-1::de]>
+			author = <
+				["name"] = <"Jasmin Buck, Sebastian Garde">
+				["organisation"] = <"University of Heidelberg, Central Queensland University">
+			>
+		>
+	>
+description
+	original_author = <
+		["name"] = <"Sam Heard">
+		["organisation"] = <"Ocean Informatics">
+		["date"] = <"12/03/2006">
+		["email"] = <"sam.heard@oceaninformatics.biz">
+	>
+	details = <
+		["de"] = <
+			language = <[ISO_639-1::de]>
+			purpose = <"Zur Dokumentation der präzisierten Beschreibung der Medikation als Teil einer INSTRUCTION oder ACTION hinsichtlich der Medikation. Dies wird üblicherweise als Erwiderung auf eine Medikationsverordnung oder Verschreibung erfolgen. Kann selbst verabreicht oder durch einen Pharmazeuten bereitgestellt werden.">
+			use = <"Zum Gebrauch mit INSTRUCTION.medication und ACTION.medication zur Beschreibung der Medikation">
+			keywords = <"Medikation", "Beschreibung">
+			misuse = <"*">
+		>
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"Specifies the description of the medication as part of an INSTRUCTION or ACTION recording taken with regard to medication. This will usually be in response to a medication order or prescription, but may be self administered or supplied by a pharmacy.">
+			use = <"For use with INSTRUCTION.medication and ACTION.medication to describe the medication">
+			keywords = <"medication", "description">
+			misuse = <"">
+		>
+	>
+	lifecycle_state = <"AuthorDraft">
+	other_contributors = <>
+
+definition
+	ITEM_TREE[at0000] occurrences matches {0..*} matches {	-- Medication description
+		items cardinality matches {0..*; ordered} matches {
+			ELEMENT[at0001] matches {	-- Name of medication
+				value matches {
+					DV_TEXT matches {*}
+				}
+			}
+			ELEMENT[at0002] occurrences matches {0..1} matches {	-- Administration instructions
+				value matches {
+					DV_TEXT matches {*}
+				}
+			}
+			ELEMENT[at0003] occurrences matches {0..1} matches {	-- Strength per dose unit
+				value matches {
+					C_DV_QUANTITY <
+						property = <[openehr::124]>
+						list = <
+							["1"] = <
+								units = <"pg">
+								magnitude = <|>=0.0|>
+							>
+							["2"] = <
+								units = <"µg">
+								magnitude = <|>=0.0|>
+							>
+							["3"] = <
+								units = <"mg">
+								magnitude = <|>=0.0|>
+							>
+							["4"] = <
+								units = <"gm">
+								magnitude = <|>=0.0|>
+							>
+						>
+					>
+					C_DV_QUANTITY <
+						property = <[openehr::385]>
+						list = <
+							["1"] = <
+								units = <"IU">
+								magnitude = <|>=0.0|>
+							>
+							["2"] = <
+								units = <"mIU">
+								magnitude = <|>=0.0|>
+							>
+						>
+					>
+					C_DV_QUANTITY <
+						property = <[openehr::445]>
+						list = <
+							["1"] = <
+								units = <"mU">
+								magnitude = <|>=0.0|>
+							>
+							["2"] = <
+								units = <"U">
+								magnitude = <|>=0.0|>
+							>
+						>
+					>
+				}
+			}
+			ELEMENT[at0006] matches {	-- Dose unit
+				value matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[ac0001]}		-- any term that 'is a' Dose unit for this form
+					}
+				}
+			}
+			ELEMENT[at0004] occurrences matches {0..1} matches {	-- Form
+				value matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[ac0000]}		-- Any term that 'is_a' form of medication
+					}
+				}
+			}
+			CLUSTER[at0033] occurrences matches {0..1} matches {	-- Dose
+				items cardinality matches {1; unordered} matches {
+					CLUSTER[at0035] occurrences matches {0..1} matches {	-- By absolute quantity
+						items cardinality matches {0..*; unordered} matches {
+							ELEMENT[at0036] occurrences matches {1..2} matches {	-- Quantity by volume
+								value matches {
+									C_DV_QUANTITY <
+										property = <[openehr::129]>
+										list = <
+											["1"] = <
+												units = <"ml">
+												magnitude = <|>=0.0|>
+											>
+											["2"] = <
+												units = <"l">
+												magnitude = <|>=0.0|>
+											>
+										>
+									>
+									DV_INTERVAL<DV_QUANTITY> matches {
+										upper matches {
+											C_DV_QUANTITY <
+												property = <[openehr::129]>
+												list = <
+													["1"] = <
+														units = <"ml">
+														magnitude = <|>=0.0|>
+													>
+													["2"] = <
+														units = <"l">
+														magnitude = <|>=0.0|>
+													>
+												>
+											>
+										}
+										lower matches {
+											C_DV_QUANTITY <
+												property = <[openehr::129]>
+												list = <
+													["1"] = <
+														units = <"ml">
+														magnitude = <|>=0.0|>
+													>
+													["2"] = <
+														units = <"l">
+														magnitude = <|>=0.0|>
+													>
+												>
+											>
+										}
+									}
+								}
+							}
+							ELEMENT[at0037] occurrences matches {0..1} matches {	-- Quantity by mass
+								value matches {
+									C_DV_QUANTITY <
+										property = <[openehr::124]>
+										list = <
+											["1"] = <
+												units = <"µg">
+												magnitude = <|>=0.0|>
+											>
+											["2"] = <
+												units = <"mg">
+											>
+											["3"] = <
+												units = <"gm">
+											>
+										>
+									>
+									DV_INTERVAL<DV_QUANTITY> matches {
+										upper matches {
+											C_DV_QUANTITY <
+												property = <[openehr::124]>
+												list = <
+													["1"] = <
+														units = <"µg">
+														magnitude = <|>=0.0|>
+													>
+													["2"] = <
+														units = <"mg">
+														magnitude = <|>=0.0|>
+													>
+													["3"] = <
+														units = <"gm">
+														magnitude = <|>=0.0|>
+													>
+												>
+											>
+										}
+										lower matches {
+											C_DV_QUANTITY <
+												property = <[openehr::124]>
+												list = <
+													["1"] = <
+														units = <"µg">
+														magnitude = <|>=0.0|>
+													>
+													["2"] = <
+														units = <"mg">
+														magnitude = <|>=0.0|>
+													>
+													["3"] = <
+														units = <"gm">
+														magnitude = <|>=0.0|>
+													>
+												>
+											>
+										}
+									}
+								}
+							}
+						}
+					}
+					CLUSTER[at0034] occurrences matches {0..1} matches {	-- By dose units
+						items cardinality matches {0..*; unordered} matches {
+							ELEMENT[at0005] matches {	-- Number or fraction
+								value matches {
+									DV_COUNT matches {
+										magnitude matches {|>=1|}
+									}
+									DV_INTERVAL<DV_COUNT> matches {
+										upper matches {
+											DV_COUNT matches {
+												magnitude matches {|>=1|}
+											}
+										}
+										lower matches {
+											DV_COUNT matches {
+												magnitude matches {|>=1|}
+											}
+										}
+									}
+									DV_PROPORTION matches {
+										numerator matches {|>=1.0|}
+										denominator matches {|1.0..4.0|}
+										type matches {1, 2, 4}
+									}
+								}
+							}
+						}
+					}
+				}
+			}
+			ELEMENT[at0007] occurrences matches {0..1} matches {	-- Dose duration
+				value matches {
+					C_DV_QUANTITY <
+						property = <[openehr::128]>
+						list = <
+							["1"] = <
+								units = <"d">
+							>
+							["2"] = <
+								units = <"h">
+							>
+							["3"] = <
+								units = <"min">
+							>
+							["4"] = <
+								units = <"s">
+								magnitude = <|>=0.0|>
+							>
+						>
+					>
+				}
+			}
+			ELEMENT[at0008] occurrences matches {0..1} matches {	-- Route
+				value matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[ac0002]}		-- Any term that 'is_a' route of administration
+					}
+				}
+			}
+			ELEMENT[at0009] occurrences matches {0..1} matches {	-- Is long term
+				value matches {
+					DV_BOOLEAN matches {
+						value matches {True, False}
+					}
+				}
+			}
+			CLUSTER[at0010] occurrences matches {0..1} matches {	-- Indications
+				items cardinality matches {0..*; unordered} matches {
+					ELEMENT[at0011] occurrences matches {0..*} matches {	-- Indication
+						value matches {
+							DV_TEXT matches {*}
+							DV_URI matches {*}
+						}
+					}
+				}
+			}
+			ELEMENT[at0012] occurrences matches {0..1} matches {	-- Generic name
+				name matches {
+					DV_CODED_TEXT matches {
+						defining_code matches {[ac0003]}		-- =Generic name OR Brand name
+					}
+				}
+				value matches {
+					DV_TEXT matches {*}
+				}
+			}
+			CLUSTER[at0013] occurrences matches {0..1} matches {	-- Safety limits
+				items cardinality matches {1..4; ordered} matches {
+					ELEMENT[at0014] occurrences matches {0..1} matches {	-- Maximum dose unit frequency
+						value matches {
+							C_DV_QUANTITY <
+								assumed_value = <
+									units = <"{QUALIFIED REAL/TIME}">
+									precision = <-1>
+									magnitude = <1.0>
+								>
+								property = <[openehr::382]>
+								list = <
+									["1"] = <
+										units = <"{QUALIFIED REAL/TIME}">
+										magnitude = <|>0.0|>
+									>
+								>
+							>
+						}
+					}
+					ELEMENT[at0015] occurrences matches {0..1} matches {	-- Dosage per kg body weight
+						value matches {
+							DV_INTERVAL<DV_QUANTITY> matches {
+								upper matches {
+									C_DV_QUANTITY <
+										property = <[openehr::0]>
+									>
+								}
+								lower matches {
+									C_DV_QUANTITY <
+										property = <[openehr::0]>
+									>
+								}
+							}
+						}
+					}
+					ELEMENT[at0016] occurrences matches {0..1} matches {	-- Minimum dose interval
+						value matches {
+							C_DV_QUANTITY <
+								property = <[openehr::128]>
+								list = <
+									["1"] = <
+										units = <"min">
+										magnitude = <|>=0.0|>
+									>
+									["2"] = <
+										units = <"h">
+										magnitude = <|>=0.0|>
+									>
+									["3"] = <
+										units = <"d">
+										magnitude = <|>=0.0|>
+									>
+									["4"] = <
+										units = <"wk">
+										magnitude = <|>=0.0|>
+									>
+									["5"] = <
+										units = <"mo">
+										magnitude = <|>=0.0|>
+									>
+								>
+							>
+						}
+					}
+					ELEMENT[at0017] occurrences matches {0..1} matches {	-- Maximum dose interval
+						value matches {
+							C_DV_QUANTITY <
+								property = <[openehr::128]>
+								list = <
+									["1"] = <
+										units = <"d">
+										magnitude = <|>=0.0|>
+									>
+									["2"] = <
+										units = <"h">
+										magnitude = <|>=0.0|>
+									>
+									["3"] = <
+										units = <"min">
+										magnitude = <|>=0.0|>
+									>
+									["4"] = <
+										units = <"wk">
+										magnitude = <|>=0.0|>
+									>
+									["5"] = <
+										units = <"mo">
+										magnitude = <|>=0.0|>
+									>
+								>
+							>
+						}
+					}
+				}
+			}
+			CLUSTER[at0018] occurrences matches {0..1} matches {	-- Administration information
+				items cardinality matches {0..*; unordered} matches {
+					ELEMENT[at0019] occurrences matches {0..1} matches {	-- Date (time) of first administration
+						value matches {
+							DV_DATE_TIME matches {
+								value matches {yyyy-??-??T??:??:??}
+							}
+						}
+					}
+					ELEMENT[at0020] occurrences matches {0..1} matches {	-- Batch number
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+					ELEMENT[at0021] occurrences matches {0..1} matches {	-- Site of administration
+						value matches {
+							DV_CODED_TEXT matches {
+								defining_code matches {[local::]}
+							}
+						}
+					}
+					ELEMENT[at0022] occurrences matches {0..1} matches {	-- Sequence number
+						value matches {
+							DV_COUNT matches {*}
+						}
+					}
+					ELEMENT[at0032] occurrences matches {0..1} matches {	-- Date (time) of last administration
+						value matches {
+							DV_DATE_TIME matches {
+								value matches {yyyy-??-??T??:??:??}
+							}
+						}
+					}
+				}
+			}
+			CLUSTER[at0023] occurrences matches {0..1} matches {	-- Dispensing information
+				items cardinality matches {0..*; unordered} matches {
+					ELEMENT[at0024] occurrences matches {0..1} matches {	-- Quantity to be dispensed
+						value matches {
+							C_DV_QUANTITY <
+								property = <[openehr::445]>
+							>
+							DV_COUNT matches {
+								magnitude matches {|>0|; 1}
+							}
+							DV_TEXT matches {*}
+						}
+					}
+					ELEMENT[at0025] occurrences matches {0..1} matches {	-- Number of authorised repeat dispensing
+						value matches {
+							DV_COUNT matches {
+								magnitude matches {|>=0|}
+							}
+						}
+					}
+					ELEMENT[at0026] occurrences matches {0..1} matches {	-- Dispensed product
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+					ELEMENT[at0027] occurrences matches {0..1} matches {	-- Brand substitution allowed
+						value matches {
+							DV_BOOLEAN matches {
+								value matches {True, False}
+							}
+						}
+					}
+					ELEMENT[at0028] occurrences matches {0..1} matches {	-- Authority approval number
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+					ELEMENT[at0029] occurrences matches {0..1} matches {	-- Patient counselled on CMI
+						value matches {
+							DV_BOOLEAN matches {
+								value matches {True, False}
+							}
+						}
+					}
+					ELEMENT[at0030] occurrences matches {0..1} matches {	-- Deferred supply
+						value matches {
+							DV_BOOLEAN matches {
+								value matches {True, False}
+							}
+						}
+					}
+					ELEMENT[at0031] occurrences matches {0..1} matches {	-- Reason for deferred supply
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+				}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["de"] = <
+			items = <
+				["at0000"] = <
+					description = <"Die Angabe einer Medikation zur Dokumentation als Teil einer ACTION oder INSTRUCTION">
+					text = <"Medikationsangabe">
+				>
+				["at0001"] = <
+					description = <"Der Name des Medikaments - kann kodiert sein">
+					text = <"Name des Medikaments">
+				>
+				["at0002"] = <
+					description = <"Detaillierte Anweisungen, wie dieses Medikament verabreicht wird">
+					text = <"Verabreichungsanweisungen">
+				>
+				["at0003"] = <
+					description = <"Die Stärke des Medikaments">
+					text = <"Stärke pro Dosiseinheit">
+				>
+				["at0004"] = <
+					description = <"Die Form des Medikaments">
+					text = <"Form">
+				>
+				["at0005"] = <
+					description = <"Die Anzahl (oder Teil) an Dosiseinheiten, die zu einem bestimmten Zeitpunkt eingenommen wird">
+					text = <"Anzahl oder Teil">
+				>
+				["at0006"] = <
+					description = <"Die Dosiseinheit in der dieses Medikament verabreicht wird">
+					text = <"Dosiseinheit">
+				>
+				["at0007"] = <
+					description = <"Die Zeit über die eine einzelne Dosis verabreicht wird">
+					text = <"Dosisdauer">
+				>
+				["at0008"] = <
+					description = <"Die Art der Verabreichung">
+					text = <"Art">
+				>
+				["at0009"] = <
+					description = <"Eingefügt und auf True gesetzt, wenn dieses Medikament fortlaufend oder immer wieder über einen signifikanten Zeitraum eingenommen wird ">
+					text = <"Ist Langzeit">
+				>
+				["at0010"] = <
+					description = <"Hinweise zu verwandten Problemen und Diagnosen, unnormale Testergebnisse usw.">
+					text = <"Hinweise">
+				>
+				["at0011"] = <
+					description = <"Die Bezeichnung der Verabreichung">
+					text = <"Bezeichnung">
+				>
+				["at0012"] = <
+					description = <"Der allgemeine Name des Wirkstoffes als alternativer Name zum Medikamentenname">
+					text = <"Allgemeiner Name">
+				>
+				["at0013"] = <
+					description = <"*">
+					text = <"Sicherheitsgrenze">
+				>
+				["at0014"] = <
+					description = <"Die maximale Anzahl an Dosiseinheiten die in einem bestimmten Zeitintervall eingenommen werden darf">
+					text = <"Maximale Dosiseinheit Frequenz">
+				>
+				["at0015"] = <
+					description = <"Die Dosis pro kg Körpergewicht">
+					text = <"Dosis pro kg Körpergewicht">
+				>
+				["at0016"] = <
+					description = <"Das minimale sichere Intervall zwischen zwei Dosen">
+					text = <"Minimales Dosisintervall">
+				>
+				["at0017"] = <
+					description = <"Das maximale sichere Intervall zwischen zwei Dosen">
+					text = <"Maximales Dosisintervall">
+				>
+				["at0018"] = <
+					description = <"Informationen bezüglich der Verabreichung der verordneten Medikation">
+					text = <"Verabreichungsinformationen">
+				>
+				["at0019"] = <
+					description = <"Das Datum und der Zeitpunkt (wenn erforderlich) wann das Medikament zum ersten Mal verabreicht wird/ wurde">
+					text = <"Zeitpunkt der ersten Verabreichung">
+				>
+				["at0020"] = <
+					description = <"Nummer zur Identifikation der Erzeugung">
+					text = <"Chargennummer">
+				>
+				["at0021"] = <
+					description = <"Die Lokalisation der Verabreichung, z.B. äußerer Oberschenkel wenn intramuskulär, per PEG bei Patienten mit Schluckstörung">
+					text = <"Lokalisation der Verabreichung">
+				>
+				["at0022"] = <
+					description = <"Die Dosisnummer oder Abfolge">
+					text = <"Laufnummer">
+				>
+				["at0023"] = <
+					description = <"Daten, die die Rezeptur betreffen">
+					text = <"Informationen zur Rezeptur">
+				>
+				["at0024"] = <
+					description = <"Die gesamte, zu verabreichende Menge">
+					text = <"Zu verabreichende Menge">
+				>
+				["at0025"] = <
+					description = <"Die Anzahl, wie oft diese Menge des Medikaments verabreicht werden darf, bevor eine erneute Verschreibung notwendig ist">
+					text = <"Anzahl an berechtigten Verabreichungswiederholungen">
+				>
+				["at0026"] = <
+					description = <"Der Name des verabreichten Produkts">
+					text = <"Verabreichtes Produkt">
+				>
+				["at0027"] = <
+					description = <"True, wenn das Fabrikat bei der Verabreichung ausgetauscht werden darf">
+					text = <"Ersetzen des Fabrikats erlaub">
+				>
+				["at0028"] = <
+					description = <"*">
+					text = <"Zulassungsnummer">
+				>
+				["at0029"] = <
+					description = <"Arzneibesteller berät den Patient">
+					text = <"Patient wird beraten">
+				>
+				["at0030"] = <
+					description = <"True, wenn sich die Bereitstellung des Medikaments verzögert">
+					text = <"Verzögerte Bereitstellung">
+				>
+				["at0031"] = <
+					description = <"Informationen bezüglich der Verzögerung der Bereitstellung">
+					text = <"Gründe für die Verzögerung der Bereitstellung">
+				>
+				["at0032"] = <
+					description = <"Das Datum und der Zeitpunkt (wenn erforderlich) an dem das Medikament zum letzten Mal verabreicht wurde">
+					text = <"Zeitpunkt der letzten Verabreichung">
+				>
+				["at0033"] = <
+					description = <"Die Einzeldosis">
+					text = <"Dosis">
+				>
+				["at0034"] = <
+					description = <"Dosis als Anzahl (oder Teil) von Dosiseinheiten">
+					text = <"Spezifiziert durch Dosiseinheit">
+				>
+				["at0035"] = <
+					description = <"Absolute Dosierung">
+					text = <"Spezifiert durch absolute Menge">
+				>
+				["at0036"] = <
+					description = <"Volumenbasierte Menge oder Mengenintervall der Einzeldosis">
+					text = <"Volumen">
+				>
+				["at0037"] = <
+					description = <"Massenbasierte Menge oder Mengenintervall der Einzeldosis">
+					text = <"Masse">
+				>
+			>
+		>
+		["en"] = <
+			items = <
+				["at0000"] = <
+					description = <"The description of a medication for recording as part of an ACTION or INSTRUCTION">
+					text = <"Medication description">
+				>
+				["at0001"] = <
+					description = <"The name of the intervention - which may be coded">
+					text = <"Name of medication">
+				>
+				["at0002"] = <
+					description = <"Detailed instructions about how to administer this medication">
+					text = <"Administration instructions">
+				>
+				["at0003"] = <
+					description = <"The strength of the medication">
+					text = <"Strength per dose unit">
+				>
+				["at0004"] = <
+					description = <"The form of the medication">
+					text = <"Form">
+				>
+				["at0005"] = <
+					description = <"The number of dose units to be taken at any time">
+					text = <"Number or fraction">
+				>
+				["at0006"] = <
+					description = <"The dose unit that is given for this type of medication">
+					text = <"Dose unit">
+				>
+				["at0007"] = <
+					description = <"The time over which an individual dose is to be administered">
+					text = <"Dose duration">
+				>
+				["at0008"] = <
+					description = <"The route of administration">
+					text = <"Route">
+				>
+				["at0009"] = <
+					description = <"Included and set to true if this medication is to be used continuously or repeatedly over a significant period of time.">
+					text = <"Is long term">
+				>
+				["at0010"] = <
+					description = <"Indications including related problems and diagnoses, abnormal test results etc">
+					text = <"Indications">
+				>
+				["at0011"] = <
+					description = <"The indication for the intervention">
+					text = <"Indication">
+				>
+				["at0012"] = <
+					description = <"The generic name of the drug which is an alternative name to the name of medication">
+					text = <"Generic name">
+				>
+				["at0013"] = <
+					description = <"*">
+					text = <"Safety limits">
+				>
+				["at0014"] = <
+					description = <"The maximum number of dose units to be taken in a particular time">
+					text = <"Maximum dose unit frequency">
+				>
+				["at0015"] = <
+					description = <"The dose per kg of body weight">
+					text = <"Dosage per kg body weight">
+				>
+				["at0016"] = <
+					description = <"The minimum safe interval between doses">
+					text = <"Minimum dose interval">
+				>
+				["at0017"] = <
+					description = <"The maximum safe interval between doses">
+					text = <"Maximum dose interval">
+				>
+				["at0018"] = <
+					description = <"Information relating to the administration of the medication order">
+					text = <"Administration information">
+				>
+				["at0019"] = <
+					description = <"The date and time (if required) the medication is/was first administered">
+					text = <"Date (time) of first administration">
+				>
+				["at0020"] = <
+					description = <"Manufacturer's identification number">
+					text = <"Batch number">
+				>
+				["at0021"] = <
+					description = <"The site of administration e.g. outer thigh if intramuscular, via PEG if patient is nil orally">
+					text = <"Site of administration">
+				>
+				["at0022"] = <
+					description = <"The dose number or sequence">
+					text = <"Sequence number">
+				>
+				["at0023"] = <
+					description = <"Data relating to dispensing">
+					text = <"Dispensing information">
+				>
+				["at0024"] = <
+					description = <"The total quantity to be dispensed">
+					text = <"Quantity to be dispensed">
+				>
+				["at0025"] = <
+					description = <"The number of times this quantity of medication may be dispensed before a further prescription is required">
+					text = <"Number of authorised repeat dispensing">
+				>
+				["at0026"] = <
+					description = <"The name of the product dispensed">
+					text = <"Dispensed product">
+				>
+				["at0027"] = <
+					description = <"True if an alternative brand may be substituted when dispensing">
+					text = <"Brand substitution allowed">
+				>
+				["at0028"] = <
+					description = <"*">
+					text = <"Authority approval number">
+				>
+				["at0029"] = <
+					description = <"Dispenser counselled the patient with regard to the Consumer Medicines Information">
+					text = <"Patient counselled on CMI">
+				>
+				["at0030"] = <
+					description = <"True if the supply of the medication has been deferred">
+					text = <"Deferred supply">
+				>
+				["at0031"] = <
+					description = <"Information relating to the reason for deferred supply">
+					text = <"Reason for deferred supply">
+				>
+				["at0032"] = <
+					description = <"The date and time (if required) the medication is  to be administered for the last time">
+					text = <"Date (time) of last administration">
+				>
+				["at0033"] = <
+					description = <"The dose to be administered at one time">
+					text = <"Dose">
+				>
+				["at0034"] = <
+					description = <"Dose as number (or fraction) of the dose units">
+					text = <"By dose units">
+				>
+				["at0035"] = <
+					description = <"Dosage by absolute quantity">
+					text = <"By absolute quantity">
+				>
+				["at0036"] = <
+					description = <"The quantity (or range) to be administered as a single dose">
+					text = <"Quantity by volume">
+				>
+				["at0037"] = <
+					description = <"*">
+					text = <"Quantity by mass">
+				>
+			>
+		>
+	>
+	constraint_definitions = <
+		["de"] = <
+			items = <
+				["ac0000"] = <
+					description = <"Begriffe wie Tablette, Inhalator, Flüssigkeit...">
+					text = <"Beliebiger Begriff, der eine Form eines Medikaments ist">
+				>
+				["ac0001"] = <
+					description = <"Eine Menge an Begriffen, die die Dosiseinheiten für eine Medikation beschreiben - z.B. Tablette, Stoß, Ampulle usw. - erlaubt es, die Dosis als Zahl auszudrücken">
+					text = <"Beliebiger Ausdruck, der eine Dosiseinheit für diese Form ist">
+				>
+				["ac0002"] = <
+					description = <"Der Weg, auf welchem dieses Medikament verabreicht wird">
+					text = <"Beliebiger Ausdruck, der ein Weg der Verabreichung ist">
+				>
+				["ac0003"] = <
+					description = <"*">
+					text = <"=Name des Generikums oder Markenname">
+				>
+			>
+		>
+		["en"] = <
+			items = <
+				["ac0000"] = <
+					description = <"Terms such as tablet, inhaler, liquid....">
+					text = <"Any term that 'is_a' form of medication">
+				>
+				["ac0001"] = <
+					description = <"A set of terms that describes the dose units for medication - e.g. tablet, puff, ampule etc - which allow the dose to be expressed as a number.">
+					text = <"any term that 'is a' Dose unit for this form">
+				>
+				["ac0002"] = <
+					description = <"The route by which the medication is administered">
+					text = <"Any term that 'is_a' route of administration">
+				>
+				["ac0003"] = <
+					description = <"*">
+					text = <"=Generic name OR Brand name">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-ITEM_TREE.referral.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-ITEM_TREE.referral.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-ITEM_TREE.referral.v1.adl	(revision 367)
@@ -0,0 +1,494 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-ITEM_TREE.referral.v1
+
+concept
+	[at0000]	-- Referral data
+language
+	original_language = <[ISO_639-1::en]>
+	translations = <
+		["de"] = <
+			language = <[ISO_639-1::de]>
+			author = <
+				["name"] = <"Jasmin Buck, Sebastian Garde">
+				["organisation"] = <"University of Heidelberg, Central Queensland University">
+			>
+		>
+	>
+description
+	original_author = <
+		["name"] = <"Sam Heard">
+		["organisation"] = <"Ocean Informatics">
+		["date"] = <"22/04/2006">
+		["email"] = <"sam.heard@oceaninformatics.biz">
+	>
+	details = <
+		["de"] = <
+			language = <[ISO_639-1::de]>
+			purpose = <"Zur Dokumentation von Informationen einer Überweisung als Teil einer Anweisung (INSTRUCTION) oder Handlung (ACTION)">
+			use = <"*">
+			misuse = <"*">
+		>
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"For recording information about a referral as part of an instruction or action.">
+			use = <"">
+			misuse = <"">
+		>
+	>
+	lifecycle_state = <"Initial">
+	other_contributors = <>
+
+definition
+	ITEM_TREE[at0000] occurrences matches {0..*} matches {	-- Referral data
+		items cardinality matches {0..*; unordered} matches {
+			ELEMENT[at0002] matches {	-- Clinical issue
+				value matches {
+					DV_TEXT matches {*}
+				}
+			}
+			ELEMENT[at0035] occurrences matches {0..1} matches {	-- Other details
+				value matches {
+					DV_TEXT matches {*}
+				}
+			}
+			CLUSTER[at0014] occurrences matches {0..1} matches {	-- Referring provider details
+				items cardinality matches {1; unordered} matches {
+					ELEMENT[at0015] matches {	-- Name of referring provider
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+					ELEMENT[at0017] occurrences matches {0..1} matches {	-- Role of referring provider
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+					ELEMENT[at0016] occurrences matches {0..1} matches {	-- Address of referring provider
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+					CLUSTER[at0026] occurrences matches {0..1} matches {	-- Contact details of the referring provider
+						items cardinality matches {0..*; unordered} matches {
+							ELEMENT[at0025] occurrences matches {0..*} matches {	-- Telephone
+								name matches {
+									DV_CODED_TEXT matches {
+										defining_code matches {
+											[local::
+											at0029, 	-- Mobile
+											at0030, 	-- Work
+											at0031, 	-- Alternative work
+											at0032, 	-- Direct work line
+											at0033]	-- Pager
+										}
+									}
+								}
+								value matches {
+									DV_TEXT matches {*}
+								}
+							}
+							ELEMENT[at0028] occurrences matches {0..1} matches {	-- Email
+								value matches {
+									DV_TEXT matches {*}
+								}
+							}
+							ELEMENT[at0027] occurrences matches {0..1} matches {	-- Faxsimile
+								value matches {
+									DV_TEXT matches {*}
+								}
+							}
+						}
+					}
+				}
+			}
+			CLUSTER[at0021] matches {	-- Secondary provider details
+				items cardinality matches {1..*; unordered} matches {
+					ELEMENT[at0022] occurrences matches {0..1} matches {	-- Name of secondary provider
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+					ELEMENT[at0024] occurrences matches {0..1} matches {	-- Role of secondary provider
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+					ELEMENT[at0023] occurrences matches {0..1} matches {	-- Address of secondary provider
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+					CLUSTER[at0034] occurrences matches {0..1} matches {	-- Contact details of the secondary provider
+						items cardinality matches {0..*; unordered} matches {
+							use_node ELEMENT /items[at0014]/items[at0026]/items[at0025]
+							use_node ELEMENT /items[at0014]/items[at0026]/items[at0028]
+							use_node ELEMENT /items[at0014]/items[at0026]/items[at0027]
+						}
+					}
+				}
+			}
+			CLUSTER[at0003] occurrences matches {0..1} matches {	-- Process
+				items cardinality matches {0..*; unordered} matches {
+					CLUSTER[at0004] occurrences matches {0..1} matches {	-- Urgency
+						items cardinality matches {0..*; unordered} matches {
+							ELEMENT[at0005] occurrences matches {0..1} matches {	-- Timing
+								value matches {
+									0|[local::at0006], 	-- Emergency
+									1|[local::at0007], 	-- Urgent
+									2|[local::at0008]  	-- Non-urgent
+								}
+							}
+							ELEMENT[at0009] occurrences matches {0..1} matches {	-- Impact
+								value matches {
+									0|[local::at0010], 	-- High
+									1|[local::at0011], 	-- Moderate
+									2|[local::at0012]  	-- Low
+								}
+							}
+							ELEMENT[at0013] occurrences matches {0..1} matches {	-- Maximal delay
+								value matches {
+									C_DV_QUANTITY <
+										property = <[openehr::128]>
+										list = <
+											["1"] = <
+												units = <"h">
+												magnitude = <|>0.0|>
+											>
+											["2"] = <
+												units = <"d">
+												magnitude = <|>0.0|>
+											>
+											["3"] = <
+												units = <"wk">
+												magnitude = <|>0.0|>
+											>
+											["4"] = <
+												units = <"mo">
+												magnitude = <|>0.0|>
+											>
+											["5"] = <
+												units = <"min">
+											>
+										>
+									>
+								}
+							}
+						}
+					}
+					ELEMENT[at0018] occurrences matches {0..1} matches {	-- Date referred
+						value matches {
+							DV_DATE_TIME matches {
+								value matches {yyyy-??-??T??:??:??}
+							}
+						}
+					}
+					ELEMENT[at0019] occurrences matches {0..1} matches {	-- Date first attended
+						value matches {
+							DV_DATE_TIME matches {
+								value matches {yyyy-??-??T??:??:??}
+							}
+						}
+					}
+					ELEMENT[at0020] occurrences matches {0..1} matches {	-- Date last attended
+						value matches {
+							DV_DATE_TIME matches {
+								value matches {yyyy-??-??T??:??:??}
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["de"] = <
+			items = <
+				["at0000"] = <
+					description = <"Daten einer Überweisung, dokumentiert als Teil einer INSTRUCTION oder ACTION">
+					text = <"Überweisungsdaten">
+				>
+				["at0002"] = <
+					description = <"die klinische Fragestellung, die eine Behandlung eines zweiten Gesundheitdienstleisters erfordert">
+					text = <"Klinische Fragestellung">
+				>
+				["at0003"] = <
+					description = <"Informationen zum Ablauf der Überweisung">
+					text = <"Ablauf">
+				>
+				["at0004"] = <
+					description = <"Informationen zur Dringlichkeit der Überweisung">
+					text = <"Dringlichkeit">
+				>
+				["at0005"] = <
+					description = <"eine angemessene Zeitberechung des Auftrages">
+					text = <"Zeitliche Dringlichkeit ">
+				>
+				["at0006"] = <
+					description = <"die Person benötigt sofortige Behandlung">
+					text = <"Notfall">
+				>
+				["at0007"] = <
+					description = <"die Person benötigt so bald wie möglich eine Behandlung">
+					text = <"Eilig">
+				>
+				["at0008"] = <
+					description = <"die Person benötigt zum nächstmöglichen Termin eine Behandlung">
+					text = <"nicht eilig">
+				>
+				["at0009"] = <
+					description = <"der Einfluss des Zustandes auf das Leben der Person">
+					text = <"Einfluss">
+				>
+				["at0010"] = <
+					description = <"der Zustand hat einen bedeutenden Einfluss auf die Körperfunktionen der Person">
+					text = <"hoch">
+				>
+				["at0011"] = <
+					description = <"der Zustand hat einen Einfluss, aber die Person hat die meisten Körperfunktionen">
+					text = <"moderat">
+				>
+				["at0012"] = <
+					description = <"der Zustand hat geringen oder keinen Einfluss auf die Körperfunktionen der Person">
+					text = <"gering">
+				>
+				["at0013"] = <
+					description = <"Ein Angabe des maximalen Verzugs, der bis zur Behandlung der Person als vertretbar angesehen wird">
+					text = <"Maximaler Verzug">
+				>
+				["at0014"] = <
+					description = <"Informationen über überweisenden Dienstleister bzw. den ersten Dienstleister">
+					text = <"Einzelheiten des überweisenden Dienstleisters">
+				>
+				["at0015"] = <
+					description = <"Name des überweisenden Dienstleisters">
+					text = <"Name des überweisenden Dienstleisters">
+				>
+				["at0016"] = <
+					description = <"*">
+					text = <"Adresse des überweisenden Dienstleisters">
+				>
+				["at0017"] = <
+					description = <"*">
+					text = <"Aufgabe des überweisenden Dienstleisters">
+				>
+				["at0018"] = <
+					description = <"das Datum der ursprünglichen Überweisung">
+					text = <"Datum der Überweisung">
+				>
+				["at0019"] = <
+					description = <"das Datum, an dem die Person das erste Mal vom zweiten Gesundheitsdienstleister behandelt wurde">
+					text = <"Datum der ersten Behandlung">
+				>
+				["at0020"] = <
+					description = <"das Datum, an dem die Person das letzte Mal vom zweiten Gesundheitsdienstleister behandelt wurde">
+					text = <"Datum der letzten Behandlung">
+				>
+				["at0021"] = <
+					description = <"Einzelheiten des Gesundheitsdienstleisters, an den die Überweisung gerichtet ist">
+					text = <"Einzelheiten des zweiten Gesundheitsdienstleisters">
+				>
+				["at0022"] = <
+					description = <"der Name des Gesundheitsdienstleisters, an den die Überweisung gerichtet ist">
+					text = <"Name des zweiten Gesundheitsdienstleisters">
+				>
+				["at0023"] = <
+					description = <"die Adresse des Gesundheitsdienstleisters, an den die Überweisung gerichtet ist">
+					text = <"Adresse des zweiten Gesundheitsdienstleisters">
+				>
+				["at0024"] = <
+					description = <"die Aufgabe des Gesundheitsdienstleisters, an den die Überweisung gerichtet ist">
+					text = <"Aufgabe des zweiten Gesundheitsdienstleisters">
+				>
+				["at0025"] = <
+					description = <"Telefonnummern">
+					text = <"Telefon">
+				>
+				["at0026"] = <
+					description = <"die Kontakteinzelheiten des überweisenden Dienstleisters">
+					text = <"Kontakteinzelheiten des überweisenden Dienstleisters">
+				>
+				["at0027"] = <
+					description = <"die Faxnummer des Anbieters">
+					text = <"Fax">
+				>
+				["at0028"] = <
+					description = <"E-Mail Adresse des Anbieters">
+					text = <"E-Mail">
+				>
+				["at0029"] = <
+					description = <"die Nummer eines mobilen Telefons oder Handys">
+					text = <"Mobil">
+				>
+				["at0030"] = <
+					description = <"die Telefonnummer des Arbeitsplatzes">
+					text = <"Nummer">
+				>
+				["at0031"] = <
+					description = <"eine Alternative Telefonnummer">
+					text = <"alternative Nummer">
+				>
+				["at0032"] = <
+					description = <"eine Telefonnummer, die direkt zum Dienstleiter vermittlelt">
+					text = <"Durchwahl">
+				>
+				["at0033"] = <
+					description = <"eine Pagernummer zum Hinterlassen von Nachrichten">
+					text = <"Pager">
+				>
+				["at0034"] = <
+					description = <"*">
+					text = <"Kontaktdetails des zweiten Gesundheitsdienstleisters">
+				>
+				["at0035"] = <
+					description = <"andere für die Überweisung relevante Einzelheiten">
+					text = <"Andere Einzelheiten">
+				>
+			>
+		>
+		["en"] = <
+			items = <
+				["at0000"] = <
+					description = <"Data about a referral recorded as part of an instruction or action">
+					text = <"Referral data">
+				>
+				["at0002"] = <
+					description = <"The clinical issue that requires care from the second provider">
+					text = <"Clinical issue">
+				>
+				["at0003"] = <
+					description = <"Information about the process of the referral">
+					text = <"Process">
+				>
+				["at0004"] = <
+					description = <"information about the urgency of the referral">
+					text = <"Urgency">
+				>
+				["at0005"] = <
+					description = <"The appropriate timing of the appointment">
+					text = <"Timing">
+				>
+				["at0006"] = <
+					description = <"Person requires care immediately">
+					text = <"Emergency">
+				>
+				["at0007"] = <
+					description = <"Person requires care as soon as possible">
+					text = <"Urgent">
+				>
+				["at0008"] = <
+					description = <"Person requires care at providers convenience">
+					text = <"Non-urgent">
+				>
+				["at0009"] = <
+					description = <"The impact of the condition on the person's life">
+					text = <"Impact">
+				>
+				["at0010"] = <
+					description = <"The condition is having major impact on the person's ability to function">
+					text = <"High">
+				>
+				["at0011"] = <
+					description = <"The condition is having an impact but the person is able to function to a large extent">
+					text = <"Moderate">
+				>
+				["at0012"] = <
+					description = <"The condition is having little or no impact on the person's ability to function">
+					text = <"Low">
+				>
+				["at0013"] = <
+					description = <"An indication of the maximum delay that would be reasonable before the person is seen">
+					text = <"Maximal delay">
+				>
+				["at0014"] = <
+					description = <"Information about the referrer or primary provider">
+					text = <"Referring provider details">
+				>
+				["at0015"] = <
+					description = <"The name of the referring provider">
+					text = <"Name of referring provider">
+				>
+				["at0016"] = <
+					description = <"*">
+					text = <"Address of referring provider">
+				>
+				["at0017"] = <
+					description = <"*">
+					text = <"Role of referring provider">
+				>
+				["at0018"] = <
+					description = <"The date of the original referral">
+					text = <"Date referred">
+				>
+				["at0019"] = <
+					description = <"The date the person first attended the secondary provider">
+					text = <"Date first attended">
+				>
+				["at0020"] = <
+					description = <"The date the person last attended the second provider">
+					text = <"Date last attended">
+				>
+				["at0021"] = <
+					description = <"Details about the provider to whom the referral is directed">
+					text = <"Secondary provider details">
+				>
+				["at0022"] = <
+					description = <"The name of the provider to which the referral is directed">
+					text = <"Name of secondary provider">
+				>
+				["at0023"] = <
+					description = <"The address of the provider to which the referral is directed">
+					text = <"Address of secondary provider">
+				>
+				["at0024"] = <
+					description = <"The role of the provider to which the referral is directed">
+					text = <"Role of secondary provider">
+				>
+				["at0025"] = <
+					description = <"Telephone contact information">
+					text = <"Telephone">
+				>
+				["at0026"] = <
+					description = <"Contact details of the referring provider">
+					text = <"Contact details of the referring provider">
+				>
+				["at0027"] = <
+					description = <"The faxsimile number of the provider">
+					text = <"Faxsimile">
+				>
+				["at0028"] = <
+					description = <"Email address of the provider">
+					text = <"Email">
+				>
+				["at0029"] = <
+					description = <"The mobile or cell phone number">
+					text = <"Mobile">
+				>
+				["at0030"] = <
+					description = <"The work telephone number">
+					text = <"Work">
+				>
+				["at0031"] = <
+					description = <"An alternative work telephone number">
+					text = <"Alternative work">
+				>
+				["at0032"] = <
+					description = <"A phone number that is direct to the provider">
+					text = <"Direct work line">
+				>
+				["at0033"] = <
+					description = <"A pager number to leave messages">
+					text = <"Pager">
+				>
+				["at0034"] = <
+					description = <"*">
+					text = <"Contact details of the secondary provider">
+				>
+				["at0035"] = <
+					description = <"Other details relevant to the referral">
+					text = <"Other details">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-OBSERVATION.apgar.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-OBSERVATION.apgar.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-OBSERVATION.apgar.v1.adl	(revision 367)
@@ -0,0 +1,545 @@
+archetype (adl_version=1.4)
+    openEHR-EHR-OBSERVATION.apgar.v1
+
+concept
+    [at0000]	-- Apgar score
+language
+    original_language = <[ISO_639-1::en]>
+    translations = <
+        ["de"] = <
+            language = <[ISO_639-1::de]>
+            author = <
+                ["name"] = <"Jasmin Buck, Sebastian Garde">
+                ["organisation"] = <"University of Heidelberg, Central Queensland University">
+            >
+        >
+        ["en-us"] = <
+            language = <[ISO_639-1::en-us]>
+            author = <
+                ["name"] = <"????">
+            >
+        >
+    >
+description
+    original_author = <
+        ["name"] = <"Sam Heard">
+        ["organisation"] = <"Ocean Informatics">
+        ["date"] = <"18/05/2004">
+        ["email"] = <"sam.heard@oceaninformatics.biz">
+    >
+    details = <
+        ["en-us"] = <
+            language = <[ISO_639-1::en-us]>
+            purpose = <"Record Apgar index or assessment for newborn. The root time of the event series is always birth.">
+            use = <"Allows recording of infant well-being at 1,2,5 and or 10 mintues after birth. The total may be recorded alone - if this is all that is available - but all five ordinal values should be completed in order that the total can be calculated. The total is the sum of the five ordinal values (min 0, max 10).">
+            keywords = <"apgar", "index", "score", "newborn">
+            misuse = <"Only partially completing the score and adding less than five values to give the total.">
+        >
+        ["en"] = <
+            language = <[ISO_639-1::en]>
+            purpose = <"Record Apgar index or assessment for newborn. The root time of the event series is always birth.">
+            use = <"Allows recording of infant well-being at 1,2,5 and or 10 mintues after birth. The total may be recorded alone - if this is all that is available - but all five ordinal values should be completed in order that the total can be calculated. The total is the sum of the five ordinal values (min 0, max 10).">
+            keywords = <"apgar", "newborn", "index", "score">
+            misuse = <"Only partially completing the score and adding less than five values to give the total.">
+        >
+        ["de"] = <
+            language = <[ISO_639-1::de]>
+            purpose = <"Zur Dokumentation des Apgar Wertes oder Beurteilung f%G�%@r Neugeborene. Der zu Grunde liegende Zeitpunkt der Ereignisreihe ist immer die Geburt.">
+            use = <"Erm%G�%@glicht die Dokumentation des Wohlergehens des S%G�%@uglings 1, 2, 5 und/ oder 10 Minuten nach der Geburt. Die Summe kann einzeln dokumentiert werden - falls nur diese verf%G�%@gbar ist - es sollten aber alle f%G�%@nf Zahlenwerte vervollst%G�%@ndigt werden, damit die Summe errechnet werden kann. Die Gesamtsumme ist die Summe der f%G�%@nf Zahlenwerte (minimal 0, maximal 10).">
+            keywords = <"Apgar", "Neugeborenes", "Index", "Wert">
+            misuse = <"Nur teilweise Vervollst%G�%@ndigung der Werte und Addieren von weniger als f%G�%@nf Werten zur Gesamtsumme.">
+        >
+    >
+    lifecycle_state = <"AuthorDraft">
+    other_contributors = <>
+
+definition
+    OBSERVATION[at0000] matches {	-- Apgar score
+        data matches {
+            HISTORY[at0002] matches {	-- history
+                events cardinality matches {1..*; unordered} matches {
+                    POINT_EVENT[at0003] occurrences matches {0..1} matches {	-- 1 minute
+                        offset matches {
+                            DV_DURATION matches {
+                                value matches {|PT1M|}
+                            }
+                        }
+                        data matches {
+                            ITEM_LIST[at0001] matches {	-- structure
+                                items cardinality matches {1..6; ordered} matches {
+                                    ELEMENT[at0005] occurrences matches {0..1} matches {	-- Heart rate
+                                        value matches {
+                                            0|[local::at0006], 	-- No heart beat
+                                            1|[local::at0007], 	-- Less than 100 beats per minute
+                                            2|[local::at0008]  	-- Greater than or equal to 100 beats per minute
+                                        }
+                                    }
+                                    ELEMENT[at0009] occurrences matches {0..1} matches {	-- Breathing
+                                        value matches {
+                                            0|[local::at0010], 	-- No effort
+                                            1|[local::at0011], 	-- Moderate effort
+                                            2|[local::at0012]  	-- Crying
+                                        }
+                                    }
+                                    ELEMENT[at0013] occurrences matches {0..1} matches {	-- Muscle tone
+                                        value matches {
+                                            0|[local::at0014], 	-- Limp
+                                            1|[local::at0015], 	-- Some flexing of arms and legs
+                                            2|[local::at0016]  	-- Active motion
+                                        }
+                                    }
+                                    ELEMENT[at0017] occurrences matches {0..1} matches {	-- Reflex response
+                                        value matches {
+                                            0|[local::at0018], 	-- No response to airways suction
+                                            1|[local::at0019], 	-- Grimace during airways suction
+                                            2|[local::at0020]  	-- Grimace and cough/sneeze during airways suction
+                                        }
+                                    }
+                                    ELEMENT[at0021] occurrences matches {0..1} matches {	-- Colour
+                                        value matches {
+                                            0|[local::at0022], 	-- Whole body is blue or pale
+                                            1|[local::at0023], 	-- Good colour in body, hands or feet blue 
+                                            2|[local::at0024]  	-- Completely pink or good colour
+                                        }
+                                    }
+                                    ELEMENT[at0025] matches {	-- Total
+                                        value matches {
+                                            DV_COUNT matches {
+                                                magnitude matches {|0..10|}
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    POINT_EVENT[at0026] occurrences matches {0..1} matches {	-- 2 minute
+                        offset matches {
+                            DV_DURATION matches {
+                                value matches {|PT2M|}
+                            }
+                        }
+                        data matches {
+                            use_node ITEM_LIST /data[at0002]/events[at0003]/data[at0001]
+                        }
+                    }
+                    POINT_EVENT[at0027] occurrences matches {0..1} matches {	-- 5 minute
+                        offset matches {
+                            DV_DURATION matches {
+                                value matches {|PT5M|}
+                            }
+                        }
+                        data matches {
+                            use_node ITEM_LIST /data[at0002]/events[at0003]/data[at0001]
+                        }
+                    }
+                    POINT_EVENT[at0028] occurrences matches {0..1} matches {	-- 10 minute
+                        offset matches {
+                            DV_DURATION matches {
+                                value matches {|PT10M|}
+                            }
+                        }
+                        data matches {
+                            use_node ITEM_LIST /data[at0002]/events[at0003]/data[at0001]
+                        }
+                    }
+                }
+            }
+        }
+        protocol matches {
+            ITEM_LIST[at0029] matches {	-- List
+                items cardinality matches {0..*; unordered} matches {
+                    ELEMENT[at0030] occurrences matches {0..1} matches {	-- Notes on measurement
+                        value matches {
+                            DV_TEXT matches {*}
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+ontology
+    terminologies_available = <"LNC205", ...>
+    term_definitions = <
+        ["en"] = <
+            items = <
+                ["at0000"] = <
+                    description = <"Clinical score derived from assessment of breathing, colour, muscle tone, heart rate and reflex response usually taken at 1, 5 and 10 minutes after birth">
+                    text = <"Apgar score">
+                >
+                ["at0001"] = <
+                    description = <"@ internal @">
+                    text = <"structure">
+                >
+                ["at0002"] = <
+                    description = <"@ internal @">
+                    text = <"history">
+                >
+                ["at0003"] = <
+                    description = <"Apgar score at one minute from birth">
+                    text = <"1 minute">
+                >
+                ["at0005"] = <
+                    description = <"Assessment of heart function in the new born">
+                    text = <"Heart rate">
+                >
+                ["at0006"] = <
+                    description = <"No heart beat is present (palpation at base of umbilical cord)">
+                    text = <"No heart beat">
+                >
+                ["at0007"] = <
+                    description = <"Heart rate of less than 100 beats per minute">
+                    text = <"Less than 100 beats per minute">
+                >
+                ["at0008"] = <
+                    description = <"Heart rate of greater than or equal to 100 beats per minute">
+                    text = <"Greater than or equal to 100 beats per minute">
+                >
+                ["at0009"] = <
+                    description = <"Assessment of the neonate's breathing effort">
+                    text = <"Breathing">
+                >
+                ["at0010"] = <
+                    description = <"No effort to breath">
+                    text = <"No effort">
+                >
+                ["at0011"] = <
+                    description = <"Some effort to breath, moving chest">
+                    text = <"Moderate effort">
+                >
+                ["at0012"] = <
+                    description = <"Crying or breathing normally">
+                    text = <"Crying">
+                >
+                ["at0013"] = <
+                    description = <"Assessment of the baby's muscle tone">
+                    text = <"Muscle tone">
+                >
+                ["at0014"] = <
+                    description = <"Limp or floppy and not moving spontaneously">
+                    text = <"Limp">
+                >
+                ["at0015"] = <
+                    description = <"Some movement and flexion of the arms or legs">
+                    text = <"Some flexing of arms and legs">
+                >
+                ["at0016"] = <
+                    description = <"Active and mobile">
+                    text = <"Active motion">
+                >
+                ["at0017"] = <
+                    description = <"Assessment of the response of the baby to suction from a nostril">
+                    text = <"Reflex response">
+                >
+                ["at0018"] = <
+                    description = <"No gag or response to suction of the airway">
+                    text = <"No response to airways suction">
+                >
+                ["at0019"] = <
+                    description = <"Grimace only as reaction to airways suction">
+                    text = <"Grimace during airways suction">
+                >
+                ["at0020"] = <
+                    description = <"Grimace and cough, sneeze or gag as response to airway suction">
+                    text = <"Grimace and cough/sneeze during airways suction">
+                >
+                ["at0021"] = <
+                    description = <"The colour of the skin on the body and trunk and limbs">
+                    text = <"Colour">
+                >
+                ["at0022"] = <
+                    description = <"The body is pale or blue in color">
+                    text = <"Whole body is blue or pale">
+                >
+                ["at0023"] = <
+                    description = <"The body is pink, hands and feet pale or blue">
+                    text = <"Good colour in body, hands or feet blue ">
+                >
+                ["at0024"] = <
+                    description = <"Pink or good color to whole body">
+                    text = <"Completely pink or good colour">
+                >
+                ["at0025"] = <
+                    description = <"The total of the ordinal scores for each parameter">
+                    text = <"Total">
+                >
+                ["at0026"] = <
+                    description = <"Apgar score 2 minutes after birth">
+                    text = <"2 minute">
+                >
+                ["at0027"] = <
+                    description = <"Apgar score 5 minutes after birth">
+                    text = <"5 minute">
+                >
+                ["at0028"] = <
+                    description = <"Apgar score 10 minutes after birth">
+                    text = <"10 minute">
+                >
+                ["at0029"] = <
+                    description = <"@ internal @">
+                    text = <"List">
+                >
+                ["at0030"] = <
+                    description = <"Notes on measurement of the apgar">
+                    text = <"Notes on measurement">
+                >
+            >
+        >
+        ["en-us"] = <
+            items = <
+                ["at0000"] = <
+                    description = <"Clinical score derived from assessment of breathing, colour, muscle tone, heart rate and reflex response usually taken at 1, 5 and 10 minutes after birth">
+                    text = <"Apgar score">
+                >
+                ["at0001"] = <
+                    description = <"@ internal @">
+                    text = <"structure">
+                >
+                ["at0002"] = <
+                    description = <"@ internal @">
+                    text = <"history">
+                >
+                ["at0003"] = <
+                    description = <"Apgar score at one minute from birth">
+                    text = <"1 minute">
+                >
+                ["at0005"] = <
+                    description = <"Assessment of heart function in the new born">
+                    text = <"Heart rate">
+                >
+                ["at0006"] = <
+                    description = <"No heart beat is present - palpation of the base of umbilical cord">
+                    text = <"No heart beat">
+                >
+                ["at0007"] = <
+                    description = <"Less than 100 beats per minute">
+                    text = <"Less than 100 beats per minute">
+                >
+                ["at0008"] = <
+                    description = <"Heart rate of greater than or equal to 100 beats per minute">
+                    text = <"Greater than or equal to 100 beats per minute">
+                >
+                ["at0009"] = <
+                    description = <"Assessment of the neonate's breathing effort">
+                    text = <"Breathing">
+                >
+                ["at0010"] = <
+                    description = <"No effort to breath">
+                    text = <"No effort">
+                >
+                ["at0011"] = <
+                    description = <"Some effort to breath">
+                    text = <"Moderate effort">
+                >
+                ["at0012"] = <
+                    description = <"Crying or breathing normally">
+                    text = <"Crying">
+                >
+                ["at0013"] = <
+                    description = <"Assessment of the baby's muscle tone">
+                    text = <"Muscle tone">
+                >
+                ["at0014"] = <
+                    description = <"Limp or floppy and not moving spontaneously">
+                    text = <"Limp">
+                >
+                ["at0015"] = <
+                    description = <"Some movement and flexion of the arms or legs">
+                    text = <"Some flexing of arms and legs">
+                >
+                ["at0016"] = <
+                    description = <"Active and mobile">
+                    text = <"Active motion">
+                >
+                ["at0017"] = <
+                    description = <"Assessment of the response of the baby to suction from a nostril">
+                    text = <"Reflex response">
+                >
+                ["at0018"] = <
+                    description = <"No gag or response to suction of the airway">
+                    text = <"No response to airways suction">
+                >
+                ["at0019"] = <
+                    description = <"Grimace only as reaction to airways suction">
+                    text = <"Grimace during airways suction">
+                >
+                ["at0020"] = <
+                    description = <"Grimace and cough, sneeze or gag as response to airway suction">
+                    text = <"Grimace and cough/sneeze during airways suction">
+                >
+                ["at0021"] = <
+                    description = <"The color of the skin on the body, trunk and limbs">
+                    text = <"Color">
+                >
+                ["at0022"] = <
+                    description = <"The body is gray or blue in color">
+                    text = <"Whole body is gray">
+                >
+                ["at0023"] = <
+                    description = <"The body is pink, hands and feet gray or blue">
+                    text = <"Good color in body, hands or feet blue">
+                >
+                ["at0024"] = <
+                    description = <"Pink or good color to whole body">
+                    text = <"Completely pink or good color">
+                >
+                ["at0025"] = <
+                    description = <"The total of the ordinal scores for each parameter">
+                    text = <"Score">
+                >
+                ["at0026"] = <
+                    description = <"Apgar score 2 minutes after birth">
+                    text = <"2 minute">
+                >
+                ["at0027"] = <
+                    description = <"Apgar score 5 minutes after birth">
+                    text = <"5 minute">
+                >
+                ["at0028"] = <
+                    description = <"Apgar score 10 minutes after birth">
+                    text = <"10 minute">
+                >
+                ["at0029"] = <
+                    description = <"@ internal @">
+                    text = <"List">
+                >
+                ["at0030"] = <
+                    description = <"Any notes on the measurement of the apgar">
+                    text = <"Notes on measurement">
+                >
+            >
+        >
+        ["de"] = <
+            items = <
+                ["at0000"] = <
+                    description = <"Klinischer Wert, abgeleitet von der Beurteilung der Atmung, der Hautfarbe, dem Muskeltonus, der Herzfrequenz und der Reaktion von Reflexen, %G�%@blicherweise 1, 5 und 10 Minuten nach der Geburt erhoben">
+                    text = <"Apgar Wert">
+                >
+                ["at0001"] = <
+                    description = <"@ internal @">
+                    text = <"Structure">
+                >
+                ["at0002"] = <
+                    description = <"@ internal @">
+                    text = <"History">
+                >
+                ["at0003"] = <
+                    description = <"Apgar Wert 1 Minute nach der Geburt">
+                    text = <"1 Minute">
+                >
+                ["at0005"] = <
+                    description = <"Beurteilung der Herzfunktion des Neubegorenen">
+                    text = <"Herzfrequenz">
+                >
+                ["at0006"] = <
+                    description = <"Kein Herzschlag vorhanden (Palpation am Ende der Nabelschnur)">
+                    text = <"Kein Herzschlag">
+                >
+                ["at0007"] = <
+                    description = <"Herzfrequenz von weniger als 100 Schl%G�%@gen pro Minute">
+                    text = <"Weniger als 100 Schl%G�%@ge pro Minute">
+                >
+                ["at0008"] = <
+                    description = <"Herzfrequenz von mehr als oder genau 100 Schl%G�%@gen pro Minute">
+                    text = <"Mehr als oder genau 100 Schl%G�%@ge pro Minute">
+                >
+                ["at0009"] = <
+                    description = <"Beurteilung des Atmungsbestreben des Neugeborenen">
+                    text = <"Atmung">
+                >
+                ["at0010"] = <
+                    description = <"Kein Bestreben zu atmen">
+                    text = <"Kein Bestreben">
+                >
+                ["at0011"] = <
+                    description = <"Etwas bestrebt zu atmen, bewegter Brustkorb">
+                    text = <"Geringes Bestreben">
+                >
+                ["at0012"] = <
+                    description = <"Normales Schreien oder normale Atmung">
+                    text = <"Schreien">
+                >
+                ["at0013"] = <
+                    description = <"Beurteilung des Muskeltonus des Neugeborenen">
+                    text = <"Muskeltonus">
+                >
+                ["at0014"] = <
+                    description = <"Schlaff oder schlapp und keine spontane Bewegung">
+                    text = <"Schlaff">
+                >
+                ["at0015"] = <
+                    description = <"Etwas Bewegung und Beugen der Arme oder der Beine">
+                    text = <"Beugen der Arme und Beine">
+                >
+                ["at0016"] = <
+                    description = <"Lebhaft und beweglich">
+                    text = <"Lebhafte Bewegung">
+                >
+                ["at0017"] = <
+                    description = <"Beurteilung der Reaktion des Neugeborenen auf die Absaugung der Nasenl%G�%@cher">
+                    text = <"Reflexantwort">
+                >
+                ["at0018"] = <
+                    description = <"kein W%G�%@rgen oder keine Reaktion auf das Absaugen der Atemwege">
+                    text = <"Keine Reaktion auf die Absaugung der Atemwege">
+                >
+                ["at0019"] = <
+                    description = <"Grimasse als einzige Reaktion auf das Absaugen der Atemwege">
+                    text = <"Grimasse w%G�%@hrend der Absaugung der Atemwege">
+                >
+                ["at0020"] = <
+                    description = <"Grimasse und husten, niesen oder w%G�%@rgen als Reaktion auf die Absaugung der Atemwege">
+                    text = <"Grimasse und Husten/Niesen w%G�%@hrend der Absaugung der Atemwege ">
+                >
+                ["at0021"] = <
+                    description = <"Die Farbe der Haut am K%G�%@rper, am Rumpf und an den Gliedern">
+                    text = <"Hautfarbe">
+                >
+                ["at0022"] = <
+                    description = <"Der K%G�%@rper ist blass oder blau gef%G�%@rbt">
+                    text = <"Gesamter K%G�%@rper ist blau oder blass">
+                >
+                ["at0023"] = <
+                    description = <"Der K%G�%@rper ist rosig, H%G�%@nde und F%G��%@e sind blass oder blau">
+                    text = <"Gesunde K%G�%@rperfarbe, blaue H%G�%@nde oder F%G��%@e">
+                >
+                ["at0024"] = <
+                    description = <"Rosige oder gesunde F%G�%@rbung des gesamten K%G�%@rpers">
+                    text = <"Vollst%G�%@ndig gesunde oder rosige Farbe">
+                >
+                ["at0025"] = <
+                    description = <"Die Summe der Zahlenwerte aller Parameter">
+                    text = <"Summe">
+                >
+                ["at0026"] = <
+                    description = <"Apgar Wert 2 Minuten nach der Geburt">
+                    text = <"2 Minuten">
+                >
+                ["at0027"] = <
+                    description = <"Apgar Wert 5 Minuten nach der Geburt">
+                    text = <"5 Minuten">
+                >
+                ["at0028"] = <
+                    description = <"Apgar Wert 10 Minuten nach der Geburt">
+                    text = <"10 Minuten">
+                >
+                ["at0029"] = <
+                    description = <"@ internal @">
+                    text = <"List">
+                >
+                ["at0030"] = <
+                    description = <"Anmerkungen zur Messung des Apgar Wertes">
+                    text = <"Anmerkungen zur Messung">
+                >
+            >
+        >
+    >
+    term_binding = <
+        ["LNC205"] = <
+            items = <
+                ["/data[at0002]/events[at0003]/data[at0001]/items[at0025]"] = <[LNC205::9272-6]>
+                ["/data[at0002]/events[at0028]/data/items[at0025]"] = <[LNC205::9271-8]>
+            >
+        >
+    >
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-OBSERVATION.body_mass_index.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-OBSERVATION.body_mass_index.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-OBSERVATION.body_mass_index.v1.adl	(revision 367)
@@ -0,0 +1,162 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-OBSERVATION.body_mass_index.v1
+
+concept
+	[at0000]	-- Body mass index
+language
+	original_language = <[ISO_639-1::en]>
+description
+	original_author = <
+		["name"] = <"Sam Heard">
+		["organisation"] = <"Ocean Informatics">
+		["email"] = <"sam.heard@oceaninformatics.com">
+		["date"] = <"22/03/2006">
+	>
+	details = <
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"To record the Body Mass Index (BMI) of a person.
+Body Mass Index is a calculated ratio describing how an individual's body weight relates to the weight that is regarded as normal, or desirable, for the individual's height. ">
+			use = <"Use to record the Body Mass Index of both adults and children.  
+Use to enter the Body Mass Index either manually (ie calculated and directly entered by the clinician), or automatically (ie calculation and entry is done automatically by a software application, based on separate height and weight measurements).
+Formulas: Body Mass Index is commonly calculated as weight (kg) / [height (m) squared]. This is the assumed formula unless otherwise specified in the Formula element within Protocol. Alternatively estimate Body Mass Index using pounds and inches: weight (lb) / [height (in) squared] x 703 (with ounces (oz) and fractions changed to decimal values).
+In some situations the Body Mass Index formula is corrected eg for use in amputees - this specific formula can be recorded as part of the protocol.  Alternatively the common Body Mass Index calculation can be used with amputees and similar injuries or disabilities if using adjusted height and/or adjusted weight, as appropriate, rather than actual height and weight.   See openEHR-EHR-OBSERVATION.height-adjusted and openEHR-EHR-OBSERVATION.body_weight-adjusted.
+See WHO reference re adjusting height/length for Body Mass Index in paediatrics. 
+In children and teens, BMI needs to be assessed using age-related reference charts. 
+">
+			keywords = <"obesity", "index", "body mass", "BMI", "anorexia", "Quetelet", "malnutrition", "failure to thrive", "bulimia">
+			misuse = <"Not intended to record information regarding Body Mass Index percentiles - these will be recorded in separate archetypes.">
+			copyright = <"copyright (c) 2009 openEHR Foundation">
+		>
+	>
+	lifecycle_state = <"Initial">
+	other_contributors = <"Marja Buur, Medisch Centrum Alkmaar, Netherlands", "Rong Chen, Cambio Healthcare Systems, Sweden", "Angela de Zwart, Orion Health, New Zealand", "Paul Donaldson, Nursing Informatics Australia, Australia", "Sebastian Garde, Ocean Informatics, Germany", "Heather Grain, Llewelyn Grain Informatics, Australia", "Anne Harbison, CPCER, Australia", "Sam Heard, Ocean Informatics, Australia", "Andrew James, University of Toronto, Canada", "Shinji Kobayashi, Ehime University, Japan", "Heather Leslie, Ocean Informatics, Australia (Editor)", "Rikard Lovstrom, Swedish Medical Association, Sweden", "Ian McNicoll, Ocean Informatics, United Kingdom", "Jeroen Meintjens, Medisch Centrum Alkmaar, Netherlands", "Arturo Romero, SESCAM, Spain", "Soon Ghee Yap, Singapore Health Services Pte Ltd, Singapore">
+	other_details = <
+		["MD5-CAM-1.0.1"] = <"1605E211E9BFB4093A72CCE7A9792FF9">
+		["references"] = <"Clinical Guidelines on the Identification, Evaluation, and Treatment of Overweight and Obesity in Adults: The Evidence Report [Internet]. Bethesda (MD): National Heart, Lung, and Blood Institute; NIH Publication No. 98-4083, Sep 1998, [cited 2009 July 02]. Available from: http://www.nhlbi.nih.gov/guidelines/obesity/
+
+About BMI for Children and Teens [Internet]. Atlanta (GA): Division of Nutrition, Physical Activity and Obesity, Centers for Disease Control and Prevention; 2009 Jan 27 [cited 2009 Jul 28 ]. Available from: http://www.cdc.gov/healthyweight/assessing/bmi/childrens_BMI/about_childrens_BMI.html
+
+WHO Child Growth Standards: Length/height-for-age, weight-for-age, weight-for-length, weight-for-height and body mass index-for-age: Methods and development. [Internet] Geneva, Switzerland: WHO Multicentre Growth Reference Study Group, World Health Organization; 2006 [cited 2009 July 02].  Chapter 6, BMI-for-age standards. Available from: http://www.who.int/childgrowth/standards/Chap_6.pdf.
+
+Obesity: Preventing and Managing the Global Epidemic: Report of a WHO Consultation [Internet]. Geneva, Switzerland: World Health Organisation; 2000 [cited 2009 Jul 28]. Available from: http://www.who.int/nutrition/publications/obesity/WHO_TRS_894/en/index.html
+
+Tzamaloukas AH, Patron A, Malhotra D. Body Mass Index in Amputees. Journal of Parenteral and Enteral Nutrition [Internet]. 1994 [cited 2009 Jul 28]; 18 (4): 355. Available from: http://pen.sagepub.com/cgi/content/abstract/18/4/355">
+       >
+
+definition
+	OBSERVATION[at0000] matches {	-- Body mass index
+		data matches {
+			HISTORY[at0001] matches {	-- history
+				events cardinality matches {1..*; unordered} matches {
+					EVENT[at0002] occurrences matches {1..*} matches {	-- Any event
+						data matches {
+							ITEM_TREE[at0003] matches {	-- Single
+								items cardinality matches {1..*; unordered} matches {
+									ELEMENT[at0004] matches {	-- Body Mass Index
+										value matches {
+											C_DV_QUANTITY <
+												property = <[openehr::349]>
+												list = <
+													["1"] = <
+														units = <"kg/m2">
+														magnitude = <|0.0..<1000.0|>
+														precision = <|1|>
+													>
+													["2"] = <
+														units = <"lb/in2">
+														magnitude = <|0.0..<1000.0|>
+														precision = <|1|>
+													>
+												>
+											>
+										}
+									}
+								}
+							}
+						}
+					}
+				}
+			}
+		}
+		protocol matches {
+			ITEM_LIST[at0005] matches {	-- List
+				items cardinality matches {0..*; ordered} matches {
+					ELEMENT[at0006] occurrences matches {0..1} matches {	-- Method
+						value matches {
+							DV_CODED_TEXT matches {
+								defining_code matches {
+									[local::
+									at0007, 	-- Automatic entry
+									at0008]	-- Direct entry
+								}
+							}
+						}
+					}
+					ELEMENT[at0010] occurrences matches {0..1} matches {	-- Formula
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+					ELEMENT[at0011] occurrences matches {0..1} matches {	-- Comment
+						value matches {
+							DV_TEXT matches {*}
+						}
+					}
+				}
+			}
+		}
+	}
+
+
+ontology
+	term_definitions = <
+		["en"] = <
+			items = <
+				["at0000"] = <
+					text = <"Body mass index">
+					description = <"Calculated measurement which compares a person's weight and height.">
+				>
+				["at0001"] = <
+					text = <"history">
+					description = <"@ internal @">
+				>
+				["at0002"] = <
+					text = <"Any event">
+					description = <"Any timed recording of Body Mass Index.">
+				>
+				["at0003"] = <
+					text = <"Single">
+					description = <"@ internal @">
+				>
+				["at0004"] = <
+					text = <"Body Mass Index">
+					description = <"Index describing ratio of weight to height.">
+				>
+				["at0005"] = <
+					text = <"List">
+					description = <"@ internal @">
+				>
+				["at0006"] = <
+					text = <"Method">
+					description = <"The method of entering the Body Mass Index.">
+				>
+				["at0007"] = <
+					text = <"Automatic entry">
+					description = <"Body Mass Index calculated and entered automatically without user intervention.">
+				>
+				["at0008"] = <
+					text = <"Direct entry">
+					description = <"Body Mass Index calculated and entered directly by user.">
+				>
+				["at0010"] = <
+					text = <"Formula">
+					description = <"Formula used to derive the Body Mass Index.">
+				>
+				["at0011"] = <
+					text = <"Comment">
+					description = <"Comment about the Body Mass Index measurement eg noting that the measurements used were adjusted weight/height.">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-SECTION.findings.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-SECTION.findings.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-SECTION.findings.v1.adl	(revision 367)
@@ -0,0 +1,47 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-SECTION.findings.v1
+
+concept
+	[at0000]	-- Clinical findings
+language
+	original_language = <[ISO_639-1::en]>
+description
+	original_author = <
+		["name"] = <"Sam Heard">
+		["organisation"] = <"Ocean Informatics">
+		["date"] = <"9/01/2007">
+		["email"] = <"sam.heard@oceaninformatics.biz">
+	>
+	details = <
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"A heading to contain clinical findings">
+			use = <"A section which only contains observations">
+			keywords = <"findings", ...>
+			misuse = <"">
+		>
+	>
+	lifecycle_state = <"Initial">
+	other_contributors = <>
+
+definition
+	SECTION[at0000] matches {	-- Clinical findings
+		items cardinality matches {0..*; unordered} matches {
+			allow_archetype OBSERVATION occurrences matches {0..1} matches {
+				include
+					archetype_id/value matches {/.*/}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["en"] = <
+			items = <
+				["at0000"] = <
+					description = <"The findings at this contact">
+					text = <"Clinical findings">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-SECTION.reason_for_encounter.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-SECTION.reason_for_encounter.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-SECTION.reason_for_encounter.v1.adl	(revision 367)
@@ -0,0 +1,51 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-SECTION.reason_for_encounter.v1
+
+concept
+	[at0000]	-- Reason for encounter
+language
+	original_language = <[ISO_639-1::en]>
+description
+	original_author = <
+		["name"] = <"Sam Heard">
+		["organisation"] = <"Ocean Informatics">
+		["date"] = <"9/01/2007">
+		["email"] = <"sam.heard@oceaninformatics.biz">
+	>
+	details = <
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"A heading to display the reason for encounter">
+			use = <"To record a symptom, problem or other reason for encounter">
+			keywords = <"rfe", "reason">
+			misuse = <"">
+		>
+	>
+	lifecycle_state = <"Initial">
+	other_contributors = <>
+
+definition
+	SECTION[at0000] matches {	-- Reason for encounter
+		items cardinality matches {0..*; unordered} matches {
+			allow_archetype OBSERVATION occurrences matches {1..*} matches {
+				include
+					archetype_id/value matches {/.*/}
+			}
+			allow_archetype EVALUATION occurrences matches {0..1} matches {
+				include
+					archetype_id/value matches {/.*/}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["en"] = <
+			items = <
+				["at0000"] = <
+					description = <"The reason(s) for this particular encounter">
+					text = <"Reason for encounter">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-SECTION.summary.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-SECTION.summary.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-SECTION.summary.v1.adl	(revision 367)
@@ -0,0 +1,52 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-SECTION.summary.v1
+
+concept
+	[at0000]	-- Summary
+language
+	original_language = <[ISO_639-1::en]>
+description
+	original_author = <
+		["name"] = <"Sam Heard">
+		["organisation"] = <"Ocean Informatics">
+		["date"] = <"9/01/2007">
+		["email"] = <"sam.heard@oceaninformatics.biz">
+	>
+	details = <
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"A heading containing summary information based on particular evaluation entries">
+			use = <"A heading for organising clinical data under a heading of summary">
+			keywords = <"review", "conclusions", "risk">
+			misuse = <"">
+		>
+	>
+	lifecycle_state = <"Initial">
+	other_contributors = <>
+
+definition
+	SECTION[at0000] matches {	-- Summary
+		items cardinality matches {0..*; unordered} matches {
+			allow_archetype EVALUATION occurrences matches {0..1} matches {
+				include
+					archetype_id/value matches {/clinical_synopsis\.v1/}
+					archetype_id/value matches {/problem\.v1/}
+					archetype_id/value matches {/problem-diagnosis\.v1/}
+					archetype_id/value matches {/problem-diagnosis-histological\.v1/}
+					archetype_id/value matches {/problem-genetic\.v1/}
+					archetype_id/value matches {/risk\.v1/}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["en"] = <
+			items = <
+				["at0000"] = <
+					description = <"A heading for conclusions and other evaluations">
+					text = <"Summary">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-SECTION.vital_signs.v1.adl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-SECTION.vital_signs.v1.adl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/adl/openEHR-EHR-SECTION.vital_signs.v1.adl	(revision 367)
@@ -0,0 +1,54 @@
+archetype (adl_version=1.4)
+	openEHR-EHR-SECTION.vital_signs.v1
+
+concept
+	[at0000]	-- Vital signs
+language
+	original_language = <[ISO_639-1::en]>
+description
+	original_author = <
+		["name"] = <"Sam Heard">
+		["organisation"] = <"Ocean Informatics">
+		["date"] = <"14/03/2006">
+		["email"] = <"sam.heard@oceaninformatics.biz">
+	>
+	details = <
+		["en"] = <
+			language = <[ISO_639-1::en]>
+			purpose = <"A heading or section which can only contain observations considered to be vital signs. This group of observations is a common set in medicine, and while these often occur separately in health records, when they are measured together this is a significant assessment of wellbeing.">
+			use = <"An organisational heading for vital signs">
+			keywords = <"blood pressure", "temperature", "pulse", "oxygen saturation", "respirations", "observations", "vital", "signs">
+			misuse = <"Does not need to be used to record these entries separately">
+		>
+	>
+	lifecycle_state = <"AuthorDraft">
+	other_contributors = <>
+
+definition
+	SECTION[at0000] matches {	-- Vital signs
+		items cardinality matches {0..*; unordered} matches {
+			allow_archetype OBSERVATION occurrences matches {1..5} matches {
+				include
+					archetype_id/value matches {/blood_pressure\.v1/}
+					archetype_id/value matches {/heart_rate-pulse\.v1/}
+					archetype_id/value matches {/respiration\.v1/}
+					archetype_id/value matches {/body_temperature\.v1/}
+					archetype_id/value matches {/oximetry\.v1/}
+					archetype_id/value matches {/heart_rate\.v1/}
+				exclude
+					archetype_id/value matches {/.*/}
+			}
+		}
+	}
+
+ontology
+	term_definitions = <
+		["en"] = <
+			items = <
+				["at0000"] = <
+					description = <"A group of observations that are recorded at the same time and record the blood pressure, pulse, temperature and other readings">
+					text = <"Vital signs">
+				>
+			>
+		>
+	>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/dadl_embedded_cadl.dadl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/dadl_embedded_cadl.dadl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/dadl_embedded_cadl.dadl	(revision 367)
@@ -0,0 +1,48 @@
+archetype_id = <"adl-test-OUTER.mixed_types.draft">
+concept = <"at0000">	--  empty definition test
+description = <
+	original_author = <
+		["name"] = <"Thomas Beale">
+		["organisation"] = <"OceanInformatics.biz">
+		["submission"] = <"01/05/2004">
+	>
+	lifecycle_state = <"draft">
+	details = <
+		["en"] = <
+			language = <"en">
+			purpose = <"Test archetype for mixed node types">
+			keywords = <"ADL", "test">
+			copyright = <"copyright (c) 2004 The openEHR Foundation">
+		>
+	>
+>
+definition = <{
+	OUTER[at0000] matches {
+		items cardinality matches {0..*; ordered} matches {
+			COMPLEX_OBJECT[at0001] matches {*}
+
+			use_node COMPLEX_OBJECT /items[at0001]
+
+			use_node COMPLEX_OBJECT /items[at0002]
+
+			COMPLEX_OBJECT[at0002] matches {*}
+
+			allow_archetype COMPLEX_OBJECT matches {
+				include
+					id matches {/.*/}
+			}
+
+			COMPLEX_OBJECT[at0003] matches {*}
+		}
+	}
+}>
+ontology = <
+	term_definitions = <
+		["en"] = <
+			["at0000"] = <text = <"outer object">; description = <"outer object">>
+			["at0001"] = <text = <"complex object 1">; description = <"complex object 1">>
+			["at0002"] = <text = <"complex object 2">; description = <"complex object 2">>
+			["at0003"] = <text = <"complex object 3">; description = <"complex object 3">>
+		>
+	>
+>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/dadl_line_break.dadl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/dadl_line_break.dadl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/dadl_line_break.dadl	(revision 367)
@@ -0,0 +1,23 @@
+archetype_id = <"adl-test-OUTER.mixed_types.draft">
+concept = <"at0000">	--  empty definition test
+description = <
+	original_author = <
+		["name"] = <"Thomas Beale">
+		["organisation"] = <"OceanInformatics.biz">
+		["submission"] = <"01/05/2004">
+	>
+	lifecycle_state = <"draft">
+	details = <
+		["en"] = <
+			language = <"en">
+			purpose = <"Test archetype for mixed node types. This is a really long
+				paragraph in which all kinds of annoying whitespace and linebreaks
+				appear.
+				
+				Even new paragraphs. But you have to admit it makes the text more 
+				readable.">
+			keywords = <"ADL", "test">
+			copyright = <"copyright (c) 2004 The openEHR Foundation">
+		>
+	>
+>
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/parser_test.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/parser_test.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/parser_test.rb	(revision 367)
@@ -0,0 +1,233 @@
+require File.dirname(__FILE__) + '/test_helper.rb'
+
+class ADLParserTest < Test::Unit::TestCase
+  def setup
+    @parser = ::OpenEHR::ADL::Parser.new
+  end
+
+  must "assert parser instance" do
+    assert_instance_of ::OpenEHR::ADL::Parser,@parser
+  end
+
+  must "test_archetype_id.adl be properly parsed" do
+    file =  File.read("#{TEST_ROOT_DIR}/adl/test_archetype_id.adl")
+    assert_nothing_raised do
+      ast = @parser.parse(file, 'openEHR-EHR-SECTION.summary.v1')
+      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+    end
+  end
+
+  must "openEHR-EHR-ACTION.imaging.v1.adl be properly parsed" do
+    file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-ACTION.imaging.v1.adl")
+    assert_nothing_raised do
+      ast = @parser.parse(file, 'openEHR-EHR-ACTION.imaging.v1')
+      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+    end
+  end
+
+  must "openEHR-EHR-ACTION.referral.v1.adl be properly parsed" do
+    file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-ACTION.referral.v1.adl")
+    assert_nothing_raised do
+      ast = @parser.parse(file, 'openEHR-EHR-ACTION.referral.v1')
+      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+    end
+  end
+
+  must "openEHR-EHR-CLUSTER.auscultation-chest.v1.adl be properly parsed" do
+    file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.auscultation-chest.v1.adl")
+    assert_nothing_raised do
+      ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.auscultation-chest.v1')
+      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+    end
+  end
+
+  must "openEHR-EHR-CLUSTER.auscultation.v1.adl be properly parsed" do
+    file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.auscultation.v1.adl")
+    assert_nothing_raised do
+      ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.auscultation.v1')
+      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+    end
+  end
+
+
+  must "openEHR-EHR-CLUSTER.exam-abdomen.v1.adl be properly parsed" do
+    file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-abdomen.v1.adl")
+    assert_nothing_raised do
+      ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-abdomen.v1')
+      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+    end
+  end
+
+  must "openEHR-EHR-CLUSTER.exam-chest.v1.adl be properly parsed" do
+    file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-chest.v1.adl")
+    assert_nothing_raised do
+      ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-chest.v1')
+      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+    end
+  end
+
+  must "openEHR-EHR-CLUSTER.exam-generic-joint.v1.adl be properly parsed" do
+    file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-generic-joint.v1.adl")
+    assert_nothing_raised do
+      ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-generic-joint.v1')
+      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+    end
+  end
+
+  must "openEHR-EHR-CLUSTER.exam-generic-lymphnode.v1.adl be properly parsed" do
+    file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-generic-lymphnode.v1.adl")
+    assert_nothing_raised do
+      ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-generic-lymphnode.v1')
+      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+    end
+  end
+
+  must "openEHR-EHR-CLUSTER.exam-generic-mass.v1.adl be properly parsed" do
+    file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-generic-mass.v1.adl")
+    assert_nothing_raised do
+      ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-generic-mass.v1')
+      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+    end
+  end
+
+  must "openEHR-EHR-CLUSTER.exam-generic.v1.adl be properly parsed" do
+    file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-generic.v1.adl")
+    assert_nothing_raised do
+      ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-generic.v1')
+      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+    end
+  end
+
+  must "openEHR-EHR-CLUSTER.exam-nervous_system.v1.adl be properly parsed" do
+    file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-nervous_system.v1.adl")
+    assert_nothing_raised do
+      ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-nervous_system.v1')
+      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+    end
+  end
+
+  must "openEHR-EHR-COMPOSITION.discharge.v1draft.adl be properly parsed" do
+    file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-COMPOSITION.discharge.v1draft.adl")
+    assert_nothing_raised do
+      ast = @parser.parse(file, 'openEHR-EHR-COMPOSITION.discharge.v1draft')
+      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+    end
+  end
+
+  must "openEHR-EHR-COMPOSITION.encounter.v1draft.adl be properly parsed" do
+    file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-COMPOSITION.encounter.v1draft.adl")
+    assert_nothing_raised do
+      ast = @parser.parse(file, 'openEHR-EHR-COMPOSITION.encounter.v1draft')
+      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+    end
+  end
+
+  must "openEHR-EHR-INSTRUCTION.medication.v1.adl be properly parsed" do
+    file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-INSTRUCTION.medication.v1.adl")
+    assert_nothing_raised do
+      ast = @parser.parse(file, 'openEHR-EHR-INSTRUCTION.medication.v1')
+      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+    end
+  end
+
+  must "openEHR-EHR-INSTRUCTION.referral.v1.adl be properly parsed" do
+    file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-INSTRUCTION.referral.v1.adl")
+    assert_nothing_raised do
+      ast = @parser.parse(file, 'openEHR-EHR-INSTRUCTION.referral.v1')
+      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+    end
+  end
+
+  must "openEHR-EHR-ITEM_TREE.Laboratory_request.v1.adl be properly parsed" do
+    file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-ITEM_TREE.Laboratory_request.v1.adl")
+    assert_nothing_raised do
+      ast = @parser.parse(file, 'openEHR-EHR-ITEM_TREE.Laboratory_request.v1')
+      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+    end
+  end
+
+
+  must "openEHR-EHR-OBSERVATION.apgar.v1.adl be properly parsed" do
+    file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-OBSERVATION.apgar.v1.adl")
+    assert_nothing_raised do
+      ast = @parser.parse(file, 'openEHR-EHR-OBSERVATION.apgar.v1')
+      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+    end
+  end
+
+  must "openEHR-EHR-SECTION.findings.v1.adl be properly parsed" do
+    file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-SECTION.findings.v1.adl")
+    assert_nothing_raised do
+      ast = @parser.parse(file, 'openEHR-EHR-SECTION.findings.v1')
+      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+    end
+  end
+
+  must "openEHR-EHR-SECTION.reason_for_encounter.v1.adl be properly parsed" do
+    file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-SECTION.reason_for_encounter.v1.adl")
+    assert_nothing_raised do
+      ast = @parser.parse(file, 'openEHR-EHR-SECTION.reason_for_encounter.v1')
+      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+    end
+  end
+
+
+  must "openEHR-EHR-SECTION.vital_signs.v1.adl be properly parsed" do
+    file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-SECTION.vital_signs.v1.adl")
+    assert_nothing_raised do
+      ast = @parser.parse(file, 'openEHR-EHR-SECTION.vital_signs.v1')
+      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+    end
+  end
+
+
+# C_DV_QUANTITY parse error
+#   must "openEHR-EHR-CLUSTER.dimensions-circumference.v1.adl be properly parsed" do
+#     file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.dimensions-circumference.v1.adl")
+#     assert_nothing_raised do
+#       ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.dimensions-circumference.v1')
+#       assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+#     end
+#   end
+
+#   must "openEHR-EHR-CLUSTER.dimensions.v1.adl be properly parsed" do
+#     file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.dimensions.v1.adl")
+#     assert_nothing_raised do
+#       ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.dimensions.v1')
+#       assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+#     end
+#   end
+
+#   must "openEHR-EHR-CLUSTER.exam-fetus.v1.adl be properly parsed" do
+#     file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-fetus.v1.adl")
+#     assert_nothing_raised do
+#       ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-fetus.v1')
+#       assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+#     end
+#   end
+
+#   must "openEHR-EHR-CLUSTER.exam-uterine_cervix.v1.adl be properly parsed" do
+#     file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-uterine_cervix.v1.adl")
+#     assert_nothing_raised do
+#       ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-uterine_cervix.v1')
+#       assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+#     end
+#   end
+
+#   must "openEHR-EHR-EVALUATION.adverse.v1.adl be properly parsed" do
+#     file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-EVALUATION.adverse.v1.adl")
+#     assert_nothing_raised do
+#       ast = @parser.parse(file, 'openEHR-EHR-EVALUATION.adverse.v1')
+#       assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+#     end
+#   end
+#   must "openEHR-EHR-OBSERVATION.body_mass_index.v1.adl be properly parsed" do
+#     file =  File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-OBSERVATION.body_mass_index.v1.adl")
+#     assert_nothing_raised do
+#       ast = @parser.parse(file, 'openEHR-EHR-OBSERVATION.body_mass_index.v1')
+#       assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID, ast.archetype_id
+#     end
+#   end
+
+
+end
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/scanner_test.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/scanner_test.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/scanner_test.rb	(revision 367)
@@ -0,0 +1,105 @@
+require File.dirname(__FILE__) + '/test_helper.rb'
+
+class ADLScannerTest < Test::Unit::TestCase
+  def setup
+    @scanner = OpenEHR::ADL::Scanner::ADLScanner.new([:adl], "filename")
+  end
+
+  must "assert OpenEHR::ADL::Scanner::ADLScanner scanner instance" do
+    assert_instance_of OpenEHR::ADL::Scanner::ADLScanner, @scanner
+  end
+
+  must "assert ADLScanner scanner scan CR and lineno incremented" do
+    lineno = @scanner.lineno
+    @scanner.scan("\n")
+    assert_equal lineno+1, @scanner.lineno
+  end
+
+  must "assert ADLScanner scanner scan ARCHETYPE_ID" do
+    lineno = @scanner.lineno
+    @scanner.scan("openEHR-EHR-OBSERVATION.body_mass_index.v1") do |sym, val|
+      assert_equal :V_ARCHETYPE_ID,sym
+      assert_instance_of OpenEHR::RM::Support::Identification::Archetype_ID,val
+    end
+  end
+
+  must "assert ADLScanner scanner scan white space and lineno unchanged" do
+    lineno = @scanner.lineno
+    @scanner.scan(" ")
+    assert_equal lineno, @scanner.lineno
+  end
+
+  must "assert ADLScanner scanner scan V_QUALIFIED_TERM_CODE_REF" do
+    @scanner.scan("[ICD10AM(1998)::F23]") do |sym, val|
+      assert_equal :V_QUALIFIED_TERM_CODE_REF,sym
+      assert_equal "ICD10AM(1998)::F23",val
+    end
+  end
+end
+
+class CADLScannerTest < Test::Unit::TestCase
+  def setup
+    @scanner = OpenEHR::ADL::Scanner::CADLScanner.new([:cadl], "filename")
+  end
+
+  must "assert OpenEHR::ADL::Scanner::CADLScanner scanner instance" do
+    assert_instance_of OpenEHR::ADL::Scanner::CADLScanner, @scanner
+  end
+
+  must "assert CADLScanner scanner scan V_ATTRIBUTE_IDENTIFIER" do
+    lineno = @scanner.lineno
+    @scanner.scan("identifier") do |sym, val|
+      assert_equal :V_ATTRIBUTE_IDENTIFIER, sym
+      assert_equal "identifier", val
+    end
+    assert_equal lineno, @scanner.lineno
+  end
+
+  must "assert CADLScanner scanner scan reserved words" do
+    lineno = @scanner.lineno
+    @scanner.scan("then") do |sym, val|
+      assert_equal :SYM_THEN, sym
+    end
+  end
+
+  must "assert CADLScanner scanner scan V_QUALIFIED_TERM_CODE_REF" do
+    @scanner.scan("[ICD10AM(1998)::F23]") do |sym, val|
+      assert_equal :V_QUALIFIED_TERM_CODE_REF,sym
+      assert_equal "ICD10AM(1998)::F23",val
+    end
+  end
+
+  must "assert CADLScanner scanner scan V_ISO8601_DURATION" do
+    @scanner.scan("PT1M") do |sym, val|
+      assert_equal :V_ISO8601_DURATION,sym
+      assert_equal "PT1M",val
+    end
+  end
+end
+
+class DADLScannerTest < Test::Unit::TestCase
+  def setup
+    @scanner = OpenEHR::ADL::Scanner::DADLScanner.new([:dadl], "filename")
+  end
+
+  must "assert DADLScanner scanner scan V_QUALIFIED_TERM_CODE_REF" do
+    @scanner.scan("[ICD10AM(1998)::F23]") do |sym, val|
+      assert_equal :V_QUALIFIED_TERM_CODE_REF,sym
+      assert_equal "ICD10AM(1998)::F23",val
+    end
+  end
+
+  must "assert DADLScanner scanner scan V_ISO8601_EXTENDED_DATE" do
+    @scanner.scan("2005-10-10") do |sym, val|
+      assert_equal :V_ISO8601_EXTENDED_DATE,sym
+      assert_equal "2005-10-10",val
+    end
+  end
+
+  must "assert DADLScanner scanner scan V_STRING" do
+    @scanner.scan("\"string\"") do |sym, val|
+      assert_equal :V_STRING,sym
+      assert_equal "string",val
+    end
+  end
+end
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/semantic_test.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/semantic_test.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/semantic_test.rb	(revision 367)
@@ -0,0 +1,11 @@
+require File.dirname(__FILE__) + '/test_helper.rb'
+
+class ADLSemanticTest < Test::Unit::TestCase
+  def setup
+    @parser = ::OpenEHR::ADL::Parser.new
+  end
+
+  must "assert adl parser instance" do
+    assert_instance_of ::OpenEHR::ADL::Parser,@parser
+  end
+end
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/shell_test.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/shell_test.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/shell_test.rb	(revision 367)
@@ -0,0 +1,27 @@
+require File.dirname(__FILE__) + '/test_helper.rb'
+
+class ShellADLValidatorTest < Test::Unit::TestCase
+  def setup
+    @adl_validator = ::OpenEHR::Application::ADLValidator.new(::OpenEHR::ADL::Validator.new(::OpenEHR::ADL::Parser.new))
+  end
+
+  must "assert application validator instance" do
+    assert_instance_of ::OpenEHR::Application::ADLValidator,@adl_validator
+  end
+
+
+  must "validating openEHR-EHR-CLUSTER.exam-nervous_system.v1 using File.open not raised" do
+    assert_nothing_raised do
+      adl_file = File.open("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-nervous_system.v1.adl")
+      @adl_validator.run(adl_file)
+    end
+  end
+
+  must "validating openEHR-EHR-CLUSTER.exam-nervous_system.v1 using File.read not raised" do
+    assert_nothing_raised do
+      adl_string = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-nervous_system.v1.adl")
+      stringio = StringIO.new(adl_string)
+      @adl_validator.run(stringio)
+    end
+  end
+end
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/test_helper.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/test_helper.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/test_helper.rb	(revision 367)
@@ -0,0 +1,28 @@
+require 'test/unit'
+
+TEST_ROOT_DIR = File.dirname(__FILE__)
+$LOAD_PATH << File.join(TEST_ROOT_DIR, '..', 'lib')
+require "rubygems"
+require 'adl_parser.rb'
+require 'adl_scanner.rb'
+require 'rm.rb'
+require 'am.rb'
+
+
+# c.f. "Ruby Best Practice",p.75
+module Test::Unit
+  class TestCase
+    def self.must(name, &block)
+      test_name = "test_#{name.gsub(/\s+/,'_')}".to_sym
+      defined = instance_method(test_name) rescue false
+      raise "#{test_name} is already defined in #{self}" if defined
+      if block_given?
+        define_method(test_name, &block)
+      else
+        define_method(test_name) do
+          flunk "No implementation provided for #{name}"
+        end
+      end
+    end
+  end
+end
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/validator_test.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/validator_test.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/validator_test.rb	(revision 367)
@@ -0,0 +1,23 @@
+require File.dirname(__FILE__) + '/test_helper.rb'
+
+
+class ADLValidatorTest < Test::Unit::TestCase
+  def setup
+    @validator = ::OpenEHR::ADL::Validator.new(::OpenEHR::ADL::Parser.new)
+  end
+
+  must "assert adl validator instance" do
+    assert_instance_of ::OpenEHR::ADL::Validator,@validator
+  end
+
+  must "assert validation openEHR-EHR-CLUSTER.exam-nervous_system.v1" do
+    exam_nervous_system = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-CLUSTER.exam-nervous_system.v1.adl")
+    assert_nothing_raised do
+      @validator.validate(exam_nervous_system, 'openEHR-EHR-CLUSTER.exam-nervous_system.v1')
+    end
+  end
+#     exam_uterine_cervix = File.read('tests/openEHR-EHR-CLUSTER.exam-uterine_cervix.v1.adl')
+# #    assert_raise(Racc::ParseError) do
+#    @validator.validate(exam_uterine_cervix, 'openEHR-EHR-CLUSTER.exam-uterine_cervix.v1.adl')
+# #    end
+end
Index: /ruby/tags/release-0.5.0/lib/adl_parser/test/vital_signs.cadl
===================================================================
--- /ruby/tags/release-0.5.0/lib/adl_parser/test/vital_signs.cadl	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/adl_parser/test/vital_signs.cadl	(revision 367)
@@ -0,0 +1,14 @@
+	SECTION[at0000] matches {	-- Vital signs or clinical 'observations'
+		items cardinality matches {0..*; unordered} matches {
+			allow_archetype OBSERVATION occurrences matches {1..5} matches {
+				include
+					domain_concept matches {/blood_pressure.v1/}
+					domain_concept matches {/heart_rate-pulse.v1/}
+					domain_concept matches {/temperature.v1/}
+					domain_concept matches {/blood_gases.v1/}
+					domain_concept matches {/respirations.v1/}
+				exclude
+					domain_concept matches {/.*/}
+			}
+		}
+	}
Index: /ruby/tags/release-0.5.0/lib/models/COPYING
===================================================================
--- /ruby/tags/release-0.5.0/lib/models/COPYING	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/models/COPYING	(revision 367)
@@ -0,0 +1,3 @@
+openEHR Open Source Software License
+
+The openEHR Foundation uses the Mozilla Tri-license 1.1 on all software copyrighted to the Foundation. This licence essentially provides the user a choice of licence conditions under which to operate with any given piece of software, being: the Mozilla Public licence (MPL), and the Free Software Foundation GNU General Public Licence (GPL) and Lesser GNU Public Licence (LGPL). See the Mozilla relicensing FAQ for details of this license. This in no way constrains the way in which software created by other organisations is licenced. 
Index: /ruby/tags/release-0.5.0/lib/models/Rakefile
===================================================================
--- /ruby/tags/release-0.5.0/lib/models/Rakefile	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/models/Rakefile	(revision 367)
@@ -0,0 +1,72 @@
+require 'rubygems'
+#Gem::manage_gems
+require 'rake'
+require 'rake/testtask'
+require 'rake/rdoctask'
+require 'rake/clean'
+require 'rake/gempackagetask'
+require 'yaml'
+
+task :default => [:test]
+
+desc "Whole Unit tests"
+task 'test' => ['test:am', 'test:rm', 'test:assumed_library_types']
+Rake::TestTask.new('test:am') do |t|
+  t.libs = ["lib"]
+  t.pattern = ['tests/test_archetype_model.rb']
+  t.warning = true
+  t.verbose = true
+end
+
+Rake::TestTask.new('test:rm') do |t|
+  t.libs = ["lib"]
+  t.pattern = ['tests/rm/test_*.rb']
+  t.warning = true
+  t.verbose = true
+end
+
+Rake::TestTask.new('test:assumed_library_types') do |t|
+  t.libs = ["lib"]
+  t.pattern = ['tests/test_assumed_library_types.rb']
+  t.warning = true
+  t.verbose = true
+end
+
+
+gem_spec = Gem::Specification.new do |s|
+  s.name = 'openehr_models'
+  s.author = 'Shinji KOBAYASHI, Akimichi TATSUKAWA'
+  s.version = '0.0.3'
+  s.summary = 'OpenEHR models'
+  s.email = 'openehr-jp@openehr.jp'
+  s.test_files = FileList['tests/test_*.rb', '*.adl']
+
+  candidates = Dir.glob("{am,rm,docs,tests}/**/*") + FileList['COPYING', 'Rakefile','am.rb','assumed_library_types.rb','rm.rb']
+  s.files = candidates.delete_if do |item|
+    item.include?(".svn") || item.include?("rdoc")
+  end
+#  s.require_paths += [".","am","rm"]
+  s.require_path = "."
+  s.has_rdoc = true
+#  s.extra_rdoc_files = ["README"]
+end
+
+
+Rake::GemPackageTask.new(gem_spec) do |pkg|
+  pkg.need_zip = false
+  pkg.need_tar = false
+end
+
+#CLOBBER.include('rdoc')
+#CLEAN.include('lib/*.output', 'log/*.log')
+
+
+
+
+### Local Variables:
+### mode:ruby
+### mode:font-lock
+### comment-column:0
+### comment-start: "### "
+### comment-end:"" 
+### End:
Index: /ruby/tags/release-0.5.0/lib/models/tests/test_archetype_model.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/models/tests/test_archetype_model.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/models/tests/test_archetype_model.rb	(revision 367)
@@ -0,0 +1,193 @@
+require 'test/unit'
+require 'am.rb'
+require 'rm.rb'
+
+class ArchetypeModelTest < Test::Unit::TestCase
+  def setup
+    @archetype = OpenEhr::AM::Archetype::ARCHETYPE.new
+    @validity_kind = OpenEhr::AM::Archetype::VALIDITY_KIND.new
+
+    @archetype_description = OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION.new
+    @archetype_description_item = OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION_ITEM.new
+  end
+  
+  def test_init
+    assert_instance_of OpenEhr::AM::Archetype::ARCHETYPE, @archetype
+    assert_instance_of OpenEhr::AM::Archetype::VALIDITY_KIND, @validity_kind
+    assert_instance_of OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION, @archetype_description
+    assert_instance_of OpenEhr::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION_ITEM, @archetype_description_item
+    assert_instance_of OpenEhr::AM::Archetype::ARCHETYPE, @archetype
+  end
+
+  def test_create
+    archetype_instance = OpenEhr::AM::Archetype::ARCHETYPE.create() do |archetype|
+      archetype.adl_version = '1.4'
+    end
+
+    assert_instance_of OpenEhr::AM::Archetype::ARCHETYPE, archetype_instance
+  end
+end
+
+class ArchetypeModelConstraintTest < Test::Unit::TestCase
+  def setup
+    @archetype_constraint = OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT.new
+    @cardinality = OpenEhr::AM::Archetype::Constraint_Model::CARDINALITY.new
+    
+    @archetype_constraint = OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT.new
+    @c_object = OpenEhr::AM::Archetype::Constraint_Model::C_OBJECT.new
+    @c_defined_object = OpenEhr::AM::Archetype::Constraint_Model::C_DEFINED_OBJECT.new
+    @c_attribute = OpenEhr::AM::Archetype::Constraint_Model::C_ATTRIBUTE.new
+    @c_single_attribute = OpenEhr::AM::Archetype::Constraint_Model::C_SINGLE_ATTRIBUTE.new
+    @c_multiple_attribute = OpenEhr::AM::Archetype::Constraint_Model::C_MULTIPLE_ATTRIBUTE.new(:rm_attribute_name => 'attribute_name', :cardinality => @cardinality)
+    @c_primitive_object = OpenEhr::AM::Archetype::Constraint_Model::C_PRIMITIVE_OBJECT.new
+    @c_reference_object =  OpenEhr::AM::Archetype::Constraint_Model::C_REFERENCE_OBJECT.new
+    @archetype_internal_ref =  OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_INTERNAL_REF.new
+    @archetype_slot = OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_SLOT.new
+    @constraint_ref = OpenEhr::AM::Archetype::Constraint_Model::CONSTRAINT_REF.new
+    @c_domain_type = OpenEhr::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE.new
+    @c_complex_object = OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.new(:attributes => [@c_single_attribute])
+  end
+
+  def test_init
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT, @archetype_constraint
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_OBJECT, @c_object
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_DEFINED_OBJECT, @c_defined_object
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_ATTRIBUTE, @c_attribute
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_SINGLE_ATTRIBUTE, @c_single_attribute
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_MULTIPLE_ATTRIBUTE, @c_multiple_attribute
+    assert_equal 'attribute_name', @c_multiple_attribute.rm_attribute_name
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::CARDINALITY, @c_multiple_attribute.cardinality
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_PRIMITIVE_OBJECT, @c_primitive_object
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_REFERENCE_OBJECT, @c_reference_object
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_INTERNAL_REF, @archetype_internal_ref
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_SLOT, @archetype_slot
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::CONSTRAINT_REF, @constraint_ref
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE, @c_domain_type
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, @c_complex_object
+    assert_instance_of Array, @c_complex_object.attributes
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT, @archetype_constraint
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::CARDINALITY, @cardinality
+  end
+
+  def test_create
+    c_complex_object = OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.create(:node_id => 'test_node',
+                                                                                         :attributes => [1,2],
+                                                                                         :assumed_value => Array
+                                                                                         )
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, c_complex_object
+    assert_equal 'test_node', c_complex_object.node_id
+  end
+end
+
+class ArchetypeModelPrimitiveTest < Test::Unit::TestCase
+  def setup
+    #@c_primitive = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_PRIMITIVE.new
+    @c_boolean = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true,
+                                                                                    :false_valid => true,
+                                                                                    :assumed_value => true)
+    @c_string = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_STRING.new
+    @c_integer = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_INTEGER.new
+    @c_real = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_REAL.new
+    @c_time = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_TIME.new
+    @c_date = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DATE.new
+    @c_date_time = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME.new
+    @c_duration = OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DURATION.new
+  end
+
+  def test_init
+    #assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_PRIMITIVE, @c_primitive
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN, @c_boolean
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_STRING, @c_string
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_INTEGER, @c_integer
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_REAL, @c_real
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_TIME, @c_time
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DATE, @c_date
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME, @c_date_time
+    assert_instance_of OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_DURATION, @c_duration
+  end
+
+  def test_primitive
+    assert @c_boolean.true_valid
+    assert @c_boolean.false_valid
+    assert @c_boolean.assumed_value
+    assert @c_boolean.has_assumed_value?
+    assert @c_boolean.default_value
+    assert @c_boolean.default_value(true)
+    assert_raise(ArgumentError) do
+      @c_boolean.true_valid = false
+      @c_boolean.false_valid = false
+    end
+    assert_raise(ArgumentError) do 
+      OpenEhr::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid =>false,
+                                                                         :false_valid => false,
+                                                                         :assumed_value => false)
+    end
+  end
+  
+end
+
+class ArchetypeModelOntologyTest < Test::Unit::TestCase
+  def setup
+    @archetype_ontology = OpenEhr::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY.new
+    @archetype_term = OpenEhr::AM::Archetype::Ontology::ARCHETYPE_TERM.new(:code => '', :items => '')
+  end
+
+  def test_init
+    assert_instance_of OpenEhr::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY, @archetype_ontology
+    assert_instance_of OpenEhr::AM::Archetype::Ontology::ARCHETYPE_TERM, @archetype_term
+  end
+end
+    
+class ArchetypeModelAssertionTest < Test::Unit::TestCase
+  def setup
+    @assertion = OpenEhr::AM::Archetype::Assertion::ASSERTION.new
+    @assertion_variable = OpenEhr::AM::Archetype::Assertion::ASSERTION_VARIABLE.new
+    @operator_kind = OpenEhr::AM::Archetype::Assertion::OPERATOR_KIND.new
+    @expr_item = OpenEhr::AM::Archetype::Assertion::EXPR_ITEM.new
+    @expr_leaf = OpenEhr::AM::Archetype::Assertion::EXPR_LEAF.new
+    @expr_operator = OpenEhr::AM::Archetype::Assertion::EXPR_OPERATOR.new
+    @expr_unary_operator = OpenEhr::AM::Archetype::Assertion::EXPR_UNARY_OPERATOR.new
+    @expr_binary_operator = OpenEhr::AM::Archetype::Assertion::EXPR_BINARY_OPERATOR.new
+  end
+
+  def test_init
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::ASSERTION, @assertion
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::ASSERTION_VARIABLE, @assertion_variable
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::OPERATOR_KIND, @operator_kind
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::EXPR_ITEM, @expr_item
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::EXPR_LEAF, @expr_leaf
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::EXPR_OPERATOR, @expr_operator
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::EXPR_UNARY_OPERATOR, @expr_unary_operator
+    assert_instance_of OpenEhr::AM::Archetype::Assertion::EXPR_BINARY_OPERATOR, @expr_binary_operator
+  end
+end
+
+class ArchetypeModelProfileTest < Test::Unit::TestCase
+  def setup
+    @c_dv_state = OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::C_DV_STATE.new
+    @state_machine = OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::STATE_MACHINE.new
+    @state = OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::STATE.new
+    @terminal_state = OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::TERMINAL_STATE.new
+    @non_terminal_state = OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::NON_TERMINAL_STATE.new
+    @transition = OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::TRANSITION.new
+
+    @c_code_phase = OpenEhr::AM::OpenEHR_Profile::DataTypes::Text::C_CODE_PHASE.new
+
+    @c_dv_quantity = OpenEhr::AM::OpenEHR_Profile::DataTypes::Quantity::C_DV_QUANTITY.new
+    @c_dv_ordinal = OpenEhr::AM::OpenEHR_Profile::DataTypes::Quantity::C_DV_ORDINAL.new
+    @c_quantity_item = OpenEhr::AM::OpenEHR_Profile::DataTypes::Quantity::C_QUANTITY_ITEM.new
+  end
+
+  def test_init
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::C_DV_STATE, @c_dv_state
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::STATE_MACHINE, @state_machine
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::STATE, @state
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::TERMINAL_STATE, @terminal_state
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::NON_TERMINAL_STATE, @non_terminal_state
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Basic::TRANSITION, @transition
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Text::C_CODE_PHASE, @c_code_phase
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Quantity::C_DV_QUANTITY, @c_dv_quantity
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Quantity::C_DV_ORDINAL, @c_dv_ordinal
+    assert_instance_of OpenEhr::AM::OpenEHR_Profile::DataTypes::Quantity::C_QUANTITY_ITEM, @c_quantity_item
+  end
+end
Index: /ruby/tags/release-0.5.0/lib/models/tests/test_assumed_library_types.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/models/tests/test_assumed_library_types.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/models/tests/test_assumed_library_types.rb	(revision 367)
@@ -0,0 +1,356 @@
+require 'test/unit'
+require 'assumed_library_types.rb'
+
+include OpenEhr::AssumedLibraryTypes
+
+class Assumed_Library_Test < Test::Unit::TestCase
+  def setup
+    assert_nothing_raised(Exception){@interval = OpenEhr::AssumedLibraryTypes::Interval.new(1,2)}
+    assert_nothing_raised(Exception){@iso8601_date = OpenEhr::AssumedLibraryTypes::ISO8601_DATE.new('2009-04-27')}
+    assert_nothing_raised(Exception){@iso8601_time = OpenEhr::AssumedLibraryTypes::ISO8601_TIME.new('15:55:37.32+0900')}
+    assert_nothing_raised(Exception){@iso8601_date_time = OpenEhr::AssumedLibraryTypes::ISO8601_DATE_TIME.new('2009-04-27T15:55:37.32+0900')}
+    assert_nothing_raised(Exception){@iso8601_duration = OpenEhr::AssumedLibraryTypes::ISO8601_DURATION.new('P1Y2M3W4DT5H6M7.8S')}
+    assert_nothing_raised(Exception){@iso8601_timezone = OpenEhr::AssumedLibraryTypes::ISO8601_TIMEZONE.new}
+  end
+
+  def test_initialize
+    assert_instance_of OpenEhr::AssumedLibraryTypes::Interval, @interval
+    assert_instance_of OpenEhr::AssumedLibraryTypes::ISO8601_DATE, @iso8601_date
+    assert_instance_of OpenEhr::AssumedLibraryTypes::ISO8601_TIME, @iso8601_time
+    assert_instance_of OpenEhr::AssumedLibraryTypes::ISO8601_DATE_TIME, @iso8601_date_time
+    assert_instance_of OpenEhr::AssumedLibraryTypes::ISO8601_DURATION, @iso8601_duration
+    assert_instance_of OpenEhr::AssumedLibraryTypes::ISO8601_TIMEZONE, @iso8601_timezone
+  end
+
+  def test_limits_comparable
+    assert @interval.lower < @interval.upper
+    assert_nothing_raised(Exception){@interval.lower=1.0}
+    assert_nothing_raised(Exception){@interval.upper=2.0}
+    assert @interval.lower < @interval.upper
+  end
+
+  def test_limits_consistent
+    assert @interval.has?(1.5)
+    assert !@interval.has?(3.0)
+    assert !@interval.has?(0.5)
+    assert_nothing_raised(Exception){@interval.lower_included=true}
+    assert @interval.has?(1.0)
+    assert_nothing_raised(Exception){@interval.lower_included=false}
+    assert !@interval.has?(1.0)
+    assert_nothing_raised(Exception){@interval.upper_included=true}
+    assert @interval.has?(2.0)
+    assert_nothing_raised(Exception){@interval.upper_included=false}
+    assert !@interval.has?(2.0)
+  end
+
+  def test_lower_included_valid
+    assert_nothing_raised(Exception){@interval.lower=nil}
+    assert @interval.lower_unbounded?
+    assert !@interval.lower_included?
+    assert_nothing_raised(Exception){@interval.lower=1.0}
+  end
+
+  def test_upper_included_valid
+    assert_nothing_raised(Exception){@interval.upper=nil}
+    assert @interval.upper_unbounded?
+    assert !@interval.upper_included?
+  end
+
+  def test_time_definitions
+    assert_equal OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS::DAYS_IN_LEAP_YEAR, 366
+    assert_equal OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS::DAYS_IN_WEEK, 7
+    assert_equal OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS::DAYS_IN_YEAR, 365
+    assert_equal OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS::HOURS_IN_DAY, 24
+    assert_equal OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS::MAX_DAYS_IN_MONTH, 31
+    assert_equal OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS::MAX_DAYS_IN_YEAR, 366
+    assert_equal OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS::MINUTES_IN_HOUR, 60
+    assert_equal OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS::MONTH_IN_YEAR, 12
+    assert_equal OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS::NOMINAL_DAYS_IN_MONTH, 30.42
+    assert_equal OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS::NOMINAL_DAYS_IN_YEAR, 365.24
+    assert_equal OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS::SECONDS_IN_MINUTE, 60
+  end
+
+  def test_time_definition_validity
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_year?(2008)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_year?(-20)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_year?(0)
+# today
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,6,19)
+# test valid_day lower limit
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(0,0,0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(0,1,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(-1,1,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(0,1,0)
+# test valid_day upper and lowerlimit of each month
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(0,0,1)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,1,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,1,0)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,0,1)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,1,31)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,1,32)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,2,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,2,0)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,2,31)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,3,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,3,0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,3,31)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,3,32)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,4,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,4,0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,4,30)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,4,31)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,5,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,5,0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,5,31)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,5,32)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,6,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,6,0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,6,30)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,6,31)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,7,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,7,0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,7,31)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,7,32)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,8,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,8,0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,8,31)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,8,32)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,9,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,9,0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,9,30)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,9,31)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,10,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,10,0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,10,31)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,10,32)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,11,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,11,0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,11,30)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,11,31)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,12,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,12,0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,12,31)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,12,32)
+# test valid_day leap year
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(1900,2,28)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(1900,2,29)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2000,2,29)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_day?(2008,2,29)
+# test valid_hour lower limit
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_hour?(0,0,0)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_hour?(-1,0,0)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_hour?(0,-1,0)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_hour?(0,0,-1)
+# test valid_hour upper limit
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_hour?(0,59,0)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_hour?(0,60,0)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_hour?(0,0,59)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_hour?(0,0,60)
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_hour?(24,0,0)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_hour?(24,0,1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_hour?(24,1,0)
+# test valid_minute method lower limit
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_minute?(0)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_minute?(-1)
+# test valid_minute method upper limit
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_minute?(59)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_minute?(60)
+# test valid_second method lower limit
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_second?(0)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_second?(-1)
+# test valid_second method upper limit
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_second?(59)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_second?(60)
+# test valid_month method lower limit
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_month?(1)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_month?(0)
+# test valid_month method upper limit
+    assert OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_month?(12)
+    assert !OpenEhr::AssumedLibraryTypes::TIME_DEFINITIONS.valid_month?(13)
+  end
+  def test_iso8601_date
+    assert_equal 2009, @iso8601_date.year
+    assert_equal 4,@iso8601_date.month
+    assert_equal 27,@iso8601_date.day
+    assert_nothing_raised(Exception){@iso8601_date = OpenEhr::AssumedLibraryTypes::ISO8601_DATE.new('2008')}
+    assert @iso8601_date.day_unknown?
+    assert @iso8601_date.month_unknown?
+    assert @iso8601_date.is_partial?
+    assert @iso8601_date.is_extended?
+    assert_nothing_raised(Exception){@iso8601_date.year = 2008}
+    assert_raise(ArgumentError){@iso8601_date.year = -1}
+    assert_equal "2008", @iso8601_date.as_string
+    assert_nothing_raised(Exception){@iso8601_date.month = 6}
+    assert_equal 6, @iso8601_date.month
+    assert_raise(ArgumentError){@iso8601_date.month = 13}
+    assert_raise(ArgumentError){@iso8601_date.month = 0}
+    assert !@iso8601_date.month_unknown?
+    assert_equal "2008-06", @iso8601_date.as_string
+    assert_nothing_raised(Exception){@iso8601_date.day = 14}
+    assert_equal 14, @iso8601_date.day
+    assert_raise(ArgumentError){@iso8601_date.day = 0}
+    assert_raise(ArgumentError){@iso8601_date.day = 31}
+    assert !@iso8601_date.day_unknown?
+    assert !@iso8601_date.is_partial?
+    assert_equal "2008-06-14", @iso8601_date.as_string
+    assert OpenEhr::AssumedLibraryTypes::ISO8601_DATE.valid_iso8601_date?("2006-06-14")
+    assert !OpenEhr::AssumedLibraryTypes::ISO8601_DATE.valid_iso8601_date?("ABCDEFG")
+  end
+
+  def test_iso8601_time
+    assert_equal 15, @iso8601_time.hour
+    assert_equal 55, @iso8601_time.minute
+    assert_equal 37, @iso8601_time.second
+    assert_equal 0.32, @iso8601_time.fractional_second
+    assert_equal '+0900', @iso8601_time.timezone
+
+#    assert_nothing_raised(Exception){@iso8601_time = OpenEHR::Assumed_Library_Types::ISO8601_TIME.new('15:55:37.32+0900')}
+
+    assert_nothing_raised(Exception){@iso8601_time = OpenEhr::AssumedLibraryTypes::ISO8601_TIME.new('01')}
+    assert_equal 1, @iso8601_time.hour
+    assert @iso8601_time.is_partial?
+    assert_equal "01", @iso8601_time.as_string
+    assert_raise(ArgumentError){@iso8601_time.hour = -1}
+    assert_raise(ArgumentError){@iso8601_time.hour = 24}
+    assert_nothing_raised(Exception){@iso8601_time.hour = 0}
+    assert_equal 0, @iso8601_time.hour
+    assert_equal "00", @iso8601_time.as_string
+    assert_nothing_raised(Exception){@iso8601_time.hour = 23}
+    assert_equal 23, @iso8601_time.hour
+    assert_equal "23", @iso8601_time.as_string
+    assert @iso8601_time.minute_unknown?
+    assert @iso8601_time.second_unknown?
+    assert !@iso8601_time.has_fractional_second?
+    assert_raise(ArgumentError){@iso8601_time.fractional_second = 0.012}
+    assert_raise(ArgumentError){@iso8601_time.second = 10}
+    assert_raise(ArgumentError){@iso8601_time.minute = -1}
+    assert_raise(ArgumentError){@iso8601_time.minute = 60}
+    assert_nothing_raised(Exception){@iso8601_time.minute = 0}
+    assert_equal 0, @iso8601_time.minute
+    assert_equal "23:00", @iso8601_time.as_string
+    assert_nothing_raised(Exception){@iso8601_time.minute = 59}
+    assert_equal 59, @iso8601_time.minute
+    assert_equal "23:59", @iso8601_time.as_string
+    assert !@iso8601_time.minute_unknown?
+    assert @iso8601_time.second_unknown?
+    assert @iso8601_time.is_partial?
+    assert_raise(ArgumentError){@iso8601_time.fractional_second = 0.012}
+    assert_raise(ArgumentError){@iso8601_time.second = -1}
+    assert_raise(ArgumentError){@iso8601_time.second = 60}
+    assert_nothing_raised(Exception){@iso8601_time.second = 0}
+    assert !@iso8601_time.second_unknown?
+    assert_equal 0, @iso8601_time.second
+    assert_equal "23:59:00", @iso8601_time.as_string
+    assert_nothing_raised(Exception){@iso8601_time.second = 59}
+    assert_equal 59, @iso8601_time.second
+    assert_equal "23:59:59", @iso8601_time.as_string
+    assert !@iso8601_time.is_partial?
+    assert_raise(ArgumentError){@iso8601_time.fractional_second = 1.23}
+    assert_nothing_raised(Exception){@iso8601_time.fractional_second = 0.23}
+    assert @iso8601_time.has_fractional_second?
+    assert_equal 0.23, @iso8601_time.fractional_second
+    assert_equal "23:59:59.23", @iso8601_time.as_string
+    assert @iso8601_time.is_extended?
+    assert !@iso8601_time.is_decimal_sign_comma?
+    assert OpenEhr::AssumedLibraryTypes::ISO8601_TIME.valid_iso8601_time?("012345Z")
+    assert OpenEhr::AssumedLibraryTypes::ISO8601_TIME.valid_iso8601_time?("012345.67+0900")
+    assert !OpenEhr::AssumedLibraryTypes::ISO8601_TIME.valid_iso8601_time?("242345.67+0900")
+    assert !OpenEhr::AssumedLibraryTypes::ISO8601_TIME.valid_iso8601_time?("242345.67+0900")
+    assert OpenEhr::AssumedLibraryTypes::ISO8601_TIME.valid_iso8601_time?("240000")
+    assert OpenEhr::AssumedLibraryTypes::ISO8601_TIME.valid_iso8601_time?("240000Z")
+    assert !OpenEhr::AssumedLibraryTypes::ISO8601_TIME.valid_iso8601_time?("240000.011Z")
+  end
+
+  def test_iso_8601_date_time
+    assert_equal 2009, @iso8601_date_time.year
+    assert_equal 4, @iso8601_date_time.month
+    assert_equal 27, @iso8601_date_time.day
+    assert_equal 15, @iso8601_date_time.hour
+    assert_equal 55, @iso8601_date_time.minute
+    assert_equal 37, @iso8601_date_time.second
+    assert_equal 0.32, @iso8601_date_time.fractional_second
+    assert_equal '+0900', @iso8601_date_time.timezone
+    assert_equal '2009-04-27T15:55:37.32+0900', @iso8601_date_time.as_string
+    assert_nothing_raised(Exception){
+      @iso8601_date_time.year = 2008 }
+    assert_equal 2008, @iso8601_date_time.year
+  end
+
+  def test_iso8601_timezone
+    @iso8601_timezone.sign = "+1"
+    @iso8601_timezone.hour = 0
+    @iso8601_timezone.minute = 0
+    assert @iso8601_timezone.is_gmt?
+    assert_equal "Z+0000", @iso8601_timezone.as_string
+    @iso8601_timezone.hour = 9
+    assert_equal "Z+0900", @iso8601_timezone.as_string
+    assert !@iso8601_timezone.is_gmt?
+    @iso8601_timezone.sign = "-1"
+    @iso8601_timezone.hour = 4
+    @iso8601_timezone.minute = 30
+    assert_equal "Z-0430", @iso8601_timezone.as_string
+  end
+
+  def test_iso8601_duration
+    assert_equal 1, @iso8601_duration.years
+    assert_equal 2, @iso8601_duration.months
+    assert_equal 3, @iso8601_duration.weeks
+    assert_equal 4, @iso8601_duration.days
+    assert_equal 5, @iso8601_duration.hours
+    assert_equal 6, @iso8601_duration.minutes
+    assert_equal 7, @iso8601_duration.seconds
+    assert_equal 0.8, @iso8601_duration.fractional_second
+    assert_equal 'P1Y2M3W4DT5H6M7.8S', @iso8601_duration.as_string
+    assert_raise(ArgumentError){@iso8601_duration.years = -1}
+    assert_nothing_raised(Exception){@iso8601_duration.years = nil}
+    assert_nil @iso8601_duration.years
+    assert_equal 'P2M3W4DT5H6M7.8S', @iso8601_duration.as_string
+    assert_nothing_raised(Exception){@iso8601_duration.years = 2}
+    assert_equal 2, @iso8601_duration.years
+    assert_nothing_raised(Exception){@iso8601_duration.months = nil}
+    assert_nil @iso8601_duration.months
+    assert_equal 'P2Y3W4DT5H6M7.8S', @iso8601_duration.as_string
+    assert_raise(ArgumentError){@iso8601_duration.months = -1}
+    assert_nothing_raised(Exception){@iso8601_duration.months = 3}
+    assert_equal 3, @iso8601_duration.months
+    assert_nothing_raised(Exception){@iso8601_duration.weeks = nil}
+    assert_nil @iso8601_duration.weeks
+    assert_equal 'P2Y3M4DT5H6M7.8S', @iso8601_duration.as_string
+    assert_raise(ArgumentError){@iso8601_duration.weeks = -1}
+    assert_nothing_raised(Exception){@iso8601_duration.weeks = 1}
+    assert_equal 'P2Y3M1W4DT5H6M7.8S', @iso8601_duration.as_string
+    assert_raise(ArgumentError){@iso8601_duration.days = -1}
+    assert_nothing_raised(Exception){@iso8601_duration.days = nil}
+    assert_nil @iso8601_duration.days
+    assert_equal 'P2Y3M1WT5H6M7.8S', @iso8601_duration.as_string
+    assert_nothing_raised(Exception){@iso8601_duration.hours = nil}
+    assert_nil @iso8601_duration.hours
+    assert_equal 'P2Y3M1W', @iso8601_duration.as_string
+    assert_raise(ArgumentError){@iso8601_duration.hours = -1}
+    assert_nothing_raised(Exception){@iso8601_duration.hours = 5}
+    assert_equal 5, @iso8601_duration.hours
+    assert_equal 'P2Y3M1WT5H6M7.8S', @iso8601_duration.as_string
+    assert_raise(ArgumentError){@iso8601_duration.minutes = -1}
+    assert_nothing_raised(Exception){@iso8601_duration.minutes = nil}
+    assert_nil @iso8601_duration.minutes
+    assert_equal 'P2Y3M1WT5H', @iso8601_duration.as_string
+    assert_nothing_raised(Exception){@iso8601_duration.minutes = 0}
+    assert_equal 0, @iso8601_duration.minutes
+    assert_equal 'P2Y3M1WT5H0M7.8S', @iso8601_duration.as_string
+    assert_raise(ArgumentError){@iso8601_duration.seconds = -1}
+    assert_nothing_raised(Exception){@iso8601_duration.seconds = nil}
+    assert_nil @iso8601_duration.seconds
+    assert_equal 'P2Y3M1WT5H0M', @iso8601_duration.as_string
+    assert_nothing_raised(Exception){@iso8601_duration.seconds = 10}
+    assert_equal 10, @iso8601_duration.seconds
+    assert_equal 'P2Y3M1WT5H0M10.8S', @iso8601_duration.as_string
+    assert_raise(ArgumentError){@iso8601_duration.fractional_second = 1.0}
+    assert_raise(ArgumentError){@iso8601_duration.fractional_second = -0.1}
+    assert_nothing_raised(Exception){@iso8601_duration.fractional_second = nil}
+    assert_nil @iso8601_duration.fractional_second
+    assert_equal 'P2Y3M1WT5H0M10S', @iso8601_duration.as_string
+    assert_nothing_raised(Exception){@iso8601_duration.fractional_second = 0.2}
+    assert_equal 0.2, @iso8601_duration.fractional_second
+    assert_equal 'P2Y3M1WT5H0M10.2S', @iso8601_duration.as_string
+  end
+end
Index: /ruby/tags/release-0.5.0/lib/models/tests/test_reference_model.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/models/tests/test_reference_model.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/models/tests/test_reference_model.rb	(revision 367)
@@ -0,0 +1,6 @@
+# this is obsoleted file
+require 'test/unit'
+require 'set'
+require 'rm'
+
+Test::Unit::AutoRunner.run(true, './tests/rm')
Index: /ruby/tags/release-0.5.0/lib/open_ehr/am.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/am.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/am.rb	(revision 367)
@@ -0,0 +1,57 @@
+#! /usr/bin/env ruby
+# component: openEHR Ruby reference implementation
+# description: This file includes Archetype 
+#      class that contains Archetype values.
+#      Main concept is based on Java ref impl.
+#      We should make refactoring to suit for Ruby way.
+# keywords: archetype
+# author: Akimichi TATSUKAWA, Shinji KOBAYASHI
+# support: openEHR.jp
+# license: openEHR open source license
+#
+
+$:.unshift File.join(File.dirname(__FILE__))
+require 'rm/common/resource.rb'
+#require 'rm/support/terminology/openehr_code_set_identifier.rb'
+module OpenEhr
+  module AM
+    module Archetype
+      autoload :ARCHETYPE, "am/archetype/archetype.rb"
+      autoload :Constraint_Model, "am/archetype/constraint_model/archetype_constraint.rb"
+      autoload :Ontology, "am/archetype/ontology.rb"
+      
+      module Archetype_Description
+        autoload :ARCHETYPE_DESCRIPTION, "am/archetype/archetype_description/archetype_description.rb"
+      end
+
+      module Constraint_Model
+        autoload :ARCHETYPE_CONSTRAINT, "am/archetype/constraint_model/archetype_constraint.rb"
+        autoload :ARCHETYPE_SLOT, "am/archetype/constraint_model/archetype_constraint.rb"
+        autoload :Primitive, "am/archetype/constraint_model/primitive.rb"
+      end #end of ConstraintModel
+
+      module Assertion
+        autoload :ASSERTION, "am/archetype/constraint_model/assertion.rb"
+      end
+
+    end # of Archetype
+
+    module OpenEHR_Profile
+      module DataTypes
+        module Basic
+          autoload :C_DV_STATE, "am/openehr_profile/data_types/basic.rb"
+        end
+
+        module Text
+          autoload :C_CODE_PHASE, "am/openehr_profile/data_types/text.rb"
+        end
+
+        module Quantity
+          autoload :C_DV_QUANTITY, "am/openehr_profile/data_types/quantity.rb"
+          autoload :C_DV_ORDINAL, "am/openehr_profile/data_types/quantity.rb"
+          autoload :C_QUANTITY_ITEM, "am/openehr_profile/data_types/quantity.rb"
+        end
+      end
+    end
+  end # of AM
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/am/archetype/archetype.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/am/archetype/archetype.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/am/archetype/archetype.rb	(revision 367)
@@ -0,0 +1,85 @@
+require 'rm/support/terminology.rb'
+
+module OpenEhr
+  module AM
+    module Archetype
+      module ADL_Definition
+#        include OpenEHR::RM::Support::Terminology::OpenEHR_Code_Set_Identifier
+        include OpenEhr::RM::Support::Terminology
+        CURRENT_ADL_VERSION = "1.4"
+      end
+
+      class ARCHETYPE < OpenEhr::RM::Common::Resource::AuthoredResource
+        include ADL_Definition
+        attr_accessor :archetype_id, :concept_code, :is_controlled, :original_language, :parent_archtype_id, :uid
+
+        attr_reader :parent_id,:concept, :definition, :ontology
+        attr_accessor :adl_version,:description,:original_language
+        attr_accessor :revision_history, :translation
+
+        def initialize(args = {})
+          @adl_version = args[:adl_version] if args[:adl_version]
+          @archetype_id = args[:archetype_id] ? args[:archetype_id] : nil
+          @parent_id = args[:parent_id] if args[:parent_id]
+          @concept = args[:concept] if args[:concept]
+          @is_controled = args[:is_controled] if args[:is_controled]
+          @definition = args[:definition] if args[:definition]
+          @ontology = args[:ontology] if args[:ontology]
+ #         loadMaps(definition)
+          super
+        end
+
+        def self.create(args ={}, &block)
+          archetype = new(args)
+          if block_given?
+            yield archetype
+          end
+          return archetype
+        end
+
+        def concept_name(a_lang)
+        end
+
+        def constraint_references_valid?
+        end
+
+        def internal_references_valid?
+        end
+
+        def is_specialised?
+        end
+
+        def is_valid?
+        end
+
+        def logical_paths(a_lang)          
+        end
+
+        def node_ids_vaild?
+        end
+
+        def physical_paths
+        end
+
+        def previous_version
+        end
+
+        def short_concept_name
+        end
+
+        def specialisation_depth
+        end
+        
+        def version
+        end
+      end # end of ARCHETYPE
+      # original file:
+      # ref_imple_eiffel/components/adl_parser/src/interface/adl_definition.e
+
+      class VALIDITY_KIND
+      end
+    end
+
+
+  end # end of AM
+end # end of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/am/archetype/archetype_description/archetype_description.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/am/archetype/archetype_description/archetype_description.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/am/archetype/archetype_description/archetype_description.rb	(revision 367)
@@ -0,0 +1,21 @@
+
+module OpenEhr
+  module AM
+    module Archetype
+      module Archetype_Description
+        class ARCHETYPE_DESCRIPTION
+          attr_accessor :archetype_package_uri, :lifecycle_state, :original_author, :other_contributors, :other_details, :details
+          def initialize(args ={ })
+            @details = args[:details] ? args[:details] : []
+          end
+        end
+
+        class ARCHETYPE_DESCRIPTION_ITEM
+          attr_accessor :archetype_package_uri, :lifecycle_state, :original_author, :other_contributors, :other_details
+        end
+      end
+    end
+  end
+end
+
+
Index: /ruby/tags/release-0.5.0/lib/open_ehr/am/archetype/constraint_model/archetype_constraint.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/am/archetype/constraint_model/archetype_constraint.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/am/archetype/constraint_model/archetype_constraint.rb	(revision 367)
@@ -0,0 +1,144 @@
+
+module OpenEhr
+  module AM
+    module Archetype
+      module Constraint_Model
+        class ARCHETYPE_CONSTRAINT
+          
+        end
+
+        class CARDINALITY
+          attr_accessor :interval, :is_ordered, :is_unique
+
+          def initialize(args = { })
+            @interval = args[:interval]
+            @is_ordered = args[:is_ordered]
+            @is_unique = args[:is_unique]
+          end
+        end
+
+        class C_OBJECT < ARCHETYPE_CONSTRAINT
+          attr_accessor :node_id, :occurrences, :rm_type_name
+
+          def initialize(args = { })
+            @node_id = args[:node_id] if args[:node_id]
+            @occurrences = args[:occurrences] if args[:occurrences]
+            @rm_type_name = args[:rm_type_name] if args[:rm_type_name]
+          end
+
+          def self.create(args = { }, &block)
+            c_object = new(args)
+            if block_given?
+              yield c_object
+            end
+            return c_object
+          end
+        end
+
+        class C_ATTRIBUTE < ARCHETYPE_CONSTRAINT
+          attr_accessor :rm_attribute_name, :existence, :children
+
+          def initialize(args = { })
+            @rm_attribute_name = args[:rm_attribute_name] if args[:rm_attribute_name]
+            @existence = args[:existence] if args[:existence]
+            @children = args[:children] ? args[:children] : []
+            
+          end
+        end
+
+        class C_DEFINED_OBJECT < C_OBJECT
+          attr_accessor :assumed_value
+          
+          def initialize(args = { })
+            @assumed_value = args[:assumed_value] if args[:assumed_value]
+            super
+          end
+        end
+
+        class C_PRIMITIVE_OBJECT < C_DEFINED_OBJECT
+          attr_accessor :item
+
+          def initialize(args = { })
+            @attributes = args[:item] if args[:item]
+            super
+          end
+        end
+
+        class C_COMPLEX_OBJECT < C_DEFINED_OBJECT
+          attr_accessor :attributes, :attributes_valid
+
+          def initialize(args = { })
+            @attributes = args[:attributes] ? args[:attributes] : []
+            super
+          end
+
+          def self.create(args = { }, &block)
+            c_complex_object = new(args)
+            if block_given?
+              yield c_complex_object
+            end
+            return c_complex_object
+          end
+        end
+
+        class C_DOMAIN_TYPE < C_DEFINED_OBJECT
+          
+        end
+
+        class C_REFERENCE_OBJECT < C_OBJECT
+        end
+
+        class ARCHETYPE_INTERNAL_REF < C_REFERENCE_OBJECT
+          attr_accessor :target_path
+        end
+
+        class ARCHETYPE_SLOT < C_REFERENCE_OBJECT
+          attr_accessor :includes, :excludes
+
+          def self.create(args = { }, &block)
+            archetype_slot = new(args)
+            archetype_slot.includes = args[:includes]
+            archetype_slot.excludes = args[:excludes]
+            if block_given?
+              yield archetype_slot
+            end
+            return archetype_slot
+          end
+        end
+
+        class CONSTRAINT_REF < C_REFERENCE_OBJECT
+          attr_accessor :reference
+
+          def self.create(args = { }, &block)
+            constraint_ref = new(args)
+            constraint_ref.reference = args[:reference]
+            if block_given?
+              yield constraint_ref
+            end
+            return constraint_ref
+          end
+        end
+
+        class C_SINGLE_ATTRIBUTE < C_ATTRIBUTE
+          attr_accessor :alternatives
+
+          def initialize(args = { })
+            @alternatives = args[:alternatives] ? args[:alternatives] : []
+            super
+          end
+        end
+
+        class C_MULTIPLE_ATTRIBUTE < C_ATTRIBUTE
+          attr_accessor :members, :cardinality
+          
+          def initialize(args = { })
+            @members = args[:members] ? args[:members] : []
+            @cardinality = args[:cardinality] if args[:cardinality]
+            super
+          end
+        end
+      end
+    end
+  end
+end
+  
Index: /ruby/tags/release-0.5.0/lib/open_ehr/am/archetype/constraint_model/assertion.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/am/archetype/constraint_model/assertion.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/am/archetype/constraint_model/assertion.rb	(revision 367)
@@ -0,0 +1,31 @@
+module OpenEhr
+  module AM
+    module Archetype
+      module Assertion
+        class ASSERTION
+        end
+
+        class ASSERTION_VARIABLE
+        end
+
+        class OPERATOR_KIND
+        end
+
+        class EXPR_ITEM
+        end
+
+        class EXPR_LEAF < EXPR_ITEM
+        end
+
+        class EXPR_OPERATOR < EXPR_ITEM
+        end
+
+        class EXPR_UNARY_OPERATOR < EXPR_OPERATOR
+        end
+
+        class EXPR_BINARY_OPERATOR < EXPR_OPERATOR
+        end
+      end
+    end
+  end
+end
Index: /ruby/tags/release-0.5.0/lib/open_ehr/am/archetype/constraint_model/primitive.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/am/archetype/constraint_model/primitive.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/am/archetype/constraint_model/primitive.rb	(revision 367)
@@ -0,0 +1,150 @@
+module OpenEhr
+  module AM
+    module Archetype
+      module Constraint_Model
+
+        module Primitive
+
+          class C_PRIMITIVE
+
+            def initialize
+              raise "abstract class"
+            end
+
+            def self.create(args = {})
+              instance = new(args)
+
+              if block_given?
+                yield instance
+              end
+              return instance
+            end
+
+
+            def assumed_value
+              raise NotImplementedError, "assumed_value should be implemented"
+            end
+
+            def default_value
+              raise NotImplementedError, "assumed_value should be implemented"
+            end
+
+            def has_assumed_value?
+              assumed_value != nil
+            end
+
+            def valid_value?
+              raise NotImplementedError, "valid_value? should be implemented"
+            end
+          end
+
+          class C_BOOLEAN < C_PRIMITIVE
+            attr_reader :true_valid, :false_valid, :assumed_value
+
+            def initialize(args = { })
+              @true_valid = args[:true_valid] ? args[:true_valid] : false
+              @false_valid = args[:false_valid] ? args[:false_valid] : false
+              @assumed_value = args[:assumed_value] ? args[:assumed_value] : false
+              binary_consistency(@true_valid, @false_valid)
+            end
+
+            def true_valid=(true_valid)
+              binary_consistency(true_valid, @false_valid)
+              @true_valid = true_valid
+            end
+
+            def false_valid=(false_valid)
+              binary_consistency(@true_valid,false_valid)
+              @false_valid = false_valid 
+            end
+
+            def valid_value?
+              
+            end
+
+            def default_value(a_value = nil)
+              if a_value == nil
+                @true_valid
+              else
+                (a_value && @true_valid) || (!a_value && @false_valid) 
+              end
+            end
+
+            private 
+
+            def binary_consistency(true_valid, false_valid)
+              if !true_valid && !false_valid
+                raise ArgumentError, "Either true_valid or false_valid must be true"
+              end
+            end
+          end # of C_Boolean
+
+          class C_STRING < C_PRIMITIVE
+            attr_accessor :list, :assumed_value, :list_open, :pattern
+
+            def initialize(args = { })
+              @list, @assumed_value, @list_open, @pattern = args[:list], args[:assumed_value], args[:list_open], args[:pattern]
+            end
+          end
+
+          class C_INTEGER < C_PRIMITIVE
+            attr_accessor :list, :range, :assumed_value
+
+            def initialize(args = { })
+              @list, @range, @assumed_value = args[:list], args[:range], args[:assumed_value]
+            end
+
+            def self.create(args = {})
+              c_primitive = new(args)
+
+              if block_given?
+                yield c_primitive
+              end
+              return c_primitive
+            end
+          end
+
+          class C_REAL < C_PRIMITIVE
+            attr_accessor :list, :range, :assumed_value
+
+            def initialize(args = { })
+              @list, @range, @assumed_value = args[:list], args[:range], args[:assumed_value]
+            end
+          end
+
+          class C_TIME < C_PRIMITIVE
+            attr_accessor :assumed_value, :milli_second_validity, :minute_validity, :range, :second_validity, :timezone_validity
+            def initialize(args = { })
+              @assumed_value, @milli_second_validity, @minute_validity, @month_validity, @range, @second_validity, @timezone_validity = args[:assumed_value], args[:milli_second_validity], args[:minute_validity], args[:range], args[:second_validity], args[:timezone_validity]
+            end
+          end
+
+          class C_DATE < C_PRIMITIVE
+            attr_accessor :assumed_value, :day_validity, :hour_validity, :month_validity, :range, :timezone_validity
+            def initialize(args = { })
+              @assumed_value, @day_validity, @hour_validity,  @month_validity, @range,  @timezone_validity = args[:assumed_value], args[:day_validity], args[:hour_validity], args[:month_validity], args[:range], args[:timezone_validity]
+            end
+          end
+
+          class C_DATE_TIME < C_PRIMITIVE
+            attr_accessor :assumed_value, :day_validity, :hour_validity, :milli_second_validity, :minute_validity, :month_validity, :range, :second_validity, :timezone_validity
+            def initialize(args = { })
+              @assumed_value, @day_validity, @hour_validity, @milli_second_validity, @minute_validity, @month_validity, @range, @second_validity, @timezone_validity = args[:assumed_value], args[:day_validity], args[:hour_validity], args[:milli_second_validity], args[:minute_validity], args[:month_validity], args[:range], args[:second_validity], args[:timezone_validity]
+            end
+          end
+
+          class C_DURATION < C_PRIMITIVE
+            attr_accessor :years_allowed, :months_allowed, :weeks_allowed, :days_allowed, :hours_allowed, :minutes_allowed, :seconds_allowed, :fractional_seconds_allowed, :range, :assumed_value
+
+            def initialize(args = { })
+              @years_allowed, @months_allowed, @weeks_allowed, @days_allowed, @hours_allowed, @minutes_allowed, @seconds_allowed, @fractional_seconds_allowed, @range, @assumed_value = args[:years_allowed], args[:months_allowed], args[:weeks_allowed], args[:days_allowed], args[:hours_allowed], args[:minutes_allowed], args[:seconds_allowed], args[:fractional_seconds_allowed], args[:range], args[:assumed_value]
+            end
+          end
+
+
+
+        end # of Primitive
+      end # of Constraint_Model
+    end # of Archetype
+  end # of AM
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/am/archetype/ontology.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/am/archetype/ontology.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/am/archetype/ontology.rb	(revision 367)
@@ -0,0 +1,54 @@
+module OpenEhr
+  module AM
+    module Archetype
+      module Ontology
+        class ARCHETYPE_ONTOLOGY
+          attr_accessor :constraint_codes, :specialisation_depth
+          attr_accessor :term_attribute_names, :term_codes
+          attr_accessor :terminologies_available
+
+          def constraint_binding(a_terminology, a_code)
+          end
+
+          def constraint_definition(a_lang, a_code)
+          end
+
+          def has_language?(a_lang)
+          end
+
+          def has_terminology?(a_terminology)
+          end
+
+          def term_binding(a_terminology, a_code)
+          end
+
+          def term_definition(a_lang, a_code)
+          end
+        end
+
+        class ARCHETYPE_TERM
+          attr_accessor :code, :items
+
+          def initialize(args = { })
+                         
+            @code = if args[:code]
+                      args[:code]
+                    else
+                      raise ArgumentError, "Code is empty"
+                    end
+            @items = if args[:items]
+                       args[:items]
+                     else
+                       raise ArgumentError, "Items is empty"
+                     end
+          end
+
+          def keys
+            @items.keys
+          end
+        end
+      end # end of Ontology
+    end # end of Archetype
+  end # end of AM
+end # end of OpenEHR
+
Index: /ruby/tags/release-0.5.0/lib/open_ehr/am/archetype/validity_kind.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/am/archetype/validity_kind.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/am/archetype/validity_kind.rb	(revision 367)
@@ -0,0 +1,20 @@
+module OpenEhr
+  module AM
+    module Archetype
+      class VALIDITY_KIND
+        attr_accessor :value
+        MANDATORY = 1001
+        OPTIONAL = 1002
+        DISALLOWED = 1003
+        
+        def initialize(arg)
+          @value = arg
+        end
+        
+        def valid_validity
+          
+        end
+      end
+    end # of Archetype
+  end # of AM
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/am/open_ehr_profile/data_types/basic.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/am/open_ehr_profile/data_types/basic.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/am/open_ehr_profile/data_types/basic.rb	(revision 367)
@@ -0,0 +1,29 @@
+module OpenEhr
+  module AM
+    module OpenEHR_Profile
+      module DataTypes
+        module Basic
+          class C_DV_STATE
+          end
+
+          class STATE_MACHINE
+          end
+
+          class STATE
+          end
+
+          class TERMINAL_STATE < STATE
+          end
+
+          class NON_TERMINAL_STATE < STATE
+          end
+
+          class TRANSITION
+          end
+        end
+
+        
+      end # of Data_Types
+    end # of OpenEHR Profile
+  end # of RM
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/am/open_ehr_profile/data_types/quantity.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/am/open_ehr_profile/data_types/quantity.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/am/open_ehr_profile/data_types/quantity.rb	(revision 367)
@@ -0,0 +1,19 @@
+module OpenEhr
+  module AM
+    module OpenEHR_Profile
+      module DataTypes
+
+        module Quantity
+          class C_DV_QUANTITY < OpenEhr::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE
+          end
+          
+          class C_DV_ORDINAL < OpenEhr::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE
+          end
+
+          class C_QUANTITY_ITEM
+          end
+        end
+      end # of Data_Types
+    end # of OpenEHR Profile
+  end # of RM
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/am/open_ehr_profile/data_types/text.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/am/open_ehr_profile/data_types/text.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/am/open_ehr_profile/data_types/text.rb	(revision 367)
@@ -0,0 +1,12 @@
+module OpenEhr
+  module AM
+    module OpenEHR_Profile
+      module DataTypes
+        module Text
+          class C_CODE_PHASE < OpenEhr::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE
+          end
+        end
+      end # of Data_Types
+    end # of OpenEHR Profile
+  end # of RM
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/assumed_library_types.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/assumed_library_types.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/assumed_library_types.rb	(revision 367)
@@ -0,0 +1,591 @@
+# This module is related to the ticket #36
+require 'date'
+require 'time'
+
+module OpenEHR
+  module AssumedLibraryTypes
+    class Any < Object
+      
+    end # of Any
+
+    class Interval < Any
+      attr_reader :lower, :upper
+      
+      def initialize(args = {})
+        check_lower_upper(args[:lower], args[:upper])
+        self.lower_included = args[:lower_included]
+        self.upper_included = args[:upper_included]
+      end
+
+      def lower=(lower)
+        check_lower_upper(lower, @upper)
+      end
+
+      def upper=(upper)
+        check_lower_upper(@lower, upper)
+      end
+
+      def lower_included?
+        return @lower_included
+      end
+
+      def lower_included=(lower_included)
+        if (lower == nil) && (lower_included != nil)
+          raise ArgumentError, "lower is not set"
+        end
+        @lower_included = lower_included
+      end
+      
+      def lower_unbounded?
+        return @lower.nil?
+      end
+
+      def upper_included?
+        return @upper_included
+      end
+
+      def upper_included=(upper_included)
+        if (@upper.nil?) && (upper_included != nil)
+          raise ArgumentError, "upper is not set"
+        end
+        @upper_included = upper_included
+      end
+
+      def upper_unbounded?
+        return @upper.nil?
+      end
+
+      def has?(value)
+        if ((@lower.nil?||@lower < value||((@lower_included == true) && (@lower == value)))&&
+            (@upper.nil?||value < @upper||((@upper_included == true) && (@upper == value))))
+          true
+        else
+          false
+        end
+      end
+
+      private
+
+      def check_lower_upper(lower, upper)
+        if lower.nil? && upper.nil?
+          raise ArgumentError, "Either lower or upper must be assigned"
+        end
+        unless (lower.nil? || upper.nil?)
+          if lower > upper
+            raise ArgumentError, "Upper must be larger than lower."
+          end
+        end
+        @lower = lower
+        @upper = upper
+      end
+    end # end of Interval
+  
+    class TimeDefinitions < Any
+      DAYS_IN_LEAP_YEAR = 366
+      DAYS_IN_WEEK = 7
+      DAYS_IN_YEAR = 365
+      HOURS_IN_DAY = 24
+      MAX_DAYS_IN_MONTH = 31
+      MAX_DAYS_IN_YEAR = 366
+      MINUTES_IN_HOUR = 60
+      MONTH_IN_YEAR = 12
+      NOMINAL_DAYS_IN_MONTH = 30.42
+      NOMINAL_DAYS_IN_YEAR = 365.24
+      SECONDS_IN_MINUTE = 60
+
+      def self.valid_year?(year)
+        return !year.nil? && year >= 0
+      end
+
+      def self.valid_day?(y, m, d)
+        unless y.nil? || m.nil? || d.nil?
+          return Date.valid_date?(y,m,d)
+        end
+        if (y.nil?) || (m.nil? && !d.nil?)
+          return false
+        end
+        return self.valid_year?(y) && self.valid_month?(m)
+      end
+
+      def self.valid_hour?(h,m = nil, s = nil)
+        if h.nil?
+          return false
+        end
+        if !m.nil? and !valid_minute?(m)
+          return false
+        end
+        if !s.nil? and (!m.nil? and !valid_second?(s))
+          return false
+        end
+        (h >= 0 and h < HOURS_IN_DAY) or (h == HOURS_IN_DAY and m == 0 and s == 0)
+      end
+
+      def self.valid_minute?(mi)
+        mi >= 0 and mi < MINUTES_IN_HOUR
+      end
+
+      def self.valid_second?(s)
+        s >= 0 and s < SECONDS_IN_MINUTE
+      end
+
+      def self.valid_month?(mo)
+        mo >= 1 and mo <= MONTH_IN_YEAR
+      end
+    end # end of TimeDefinitions
+
+    module ISO8601DateModule
+      attr_reader :year, :month, :day
+
+      def year=(year)
+        unless ISO8601Date.valid_year?(year)
+          raise ArgumentError, "Year is not valid"
+        end
+        @year = year
+      end
+
+      def month=(month)
+        raise ArgumentError, "Month is not valid" unless month.nil? or ISO8601Date.valid_month?(month)
+        @month = month
+      end
+
+      def day=(day)
+        
+        raise ArgumentError, "Day is not valid" unless day.nil? or ISO8601Date.valid_day?(@year, @month, day)
+        @day = day
+      end
+
+      def as_string
+        if (!@year.nil? and !@month.nil? and !@day.nil?)
+          Date.new(@year, @month, @day).to_s
+        elsif (!@year.nil? and !@month.nil? and @day.nil?)
+          Date.new(@year, @month).to_s[0,7]
+        elsif (!@year.nil? and @month.nil? and @day.nil?)
+          Date.new(@year).to_s[0,4]
+        end          
+      end
+
+      def month_unknown?
+        @month.nil?
+      end
+
+      def day_unknown?
+        @day.nil?
+      end
+
+      def is_extended?
+        true
+      end
+
+      def is_partial?
+        month_unknown? or day_unknown?
+      end
+
+      protected
+      def leapyear?(year)
+        case
+        when year % 400 == 0: true
+        when year % 100 == 0: false
+        else year % 4 == 0
+        end
+      end
+    end
+
+    class ISO8601Date < TimeDefinitions
+      include ISO8601DateModule
+      def initialize(string)
+        /(\d{4})(?:-(\d{2})(?:-(\d{2})?)?)?/ =~ string
+        if $1.nil?
+          raise ArgumentError, 'data invalid'
+        else
+          self.year = $1.to_i
+        end
+        if $2.nil?
+          self.month = nil
+        else
+          self.month = $2.to_i
+        end
+        if $3.nil?
+          self.day = nil
+        else
+          self.day = $3.to_i
+        end
+      end
+
+      def self.valid_iso8601_date?(string)
+        begin
+          Date.parse(string)
+        rescue
+          return false
+        end
+        true
+      end
+    end # end of ISO8601_DATE
+
+    module ISO8601TimeModule
+      attr_reader :hour, :minute, :second, :fractional_second, :timezone
+
+      def hour=(hour)
+        unless ISO8601Time.valid_hour?(hour, @minute, @second)
+          raise ArgumentError, "hour is not valid"
+        end
+        @hour = hour
+      end
+
+      def minute_unknown?
+        @minute.nil?
+      end
+
+      def minute=(minute)
+        raise ArgumentError, "minute is not valid" if !minute.nil? and !ISO8601Time.valid_minute?(minute)
+        @minute = minute
+      end
+
+      def second_unknown?
+        @second.nil?
+      end
+
+      def second=(second)
+        raise ArgumentError, "minute not defined" if @minute.nil? and !second.nil?
+        raise ArgumentError, "second is not valid" if !second.nil? and !ISO8601Time.valid_second?(second)
+        @second = second
+      end
+
+      def fractional_second=(fractional_second)
+        raise ArgumentError, "minute not defined" if minute_unknown? and !fractional_second.nil?
+        raise ArgumentError, "second not defined" if second_unknown? and !fractional_second.nil?
+        if !fractional_second.nil? &&
+            (fractional_second < 0.0 || fractional_second >= 1.0)
+          raise ArgumentError, 'fractional second should be between 0.0 - 1.0'
+        end
+        @fractional_second = fractional_second
+      end
+
+      def has_fractional_second?
+        return !@fractional_second.nil?
+      end
+
+      def timezone=(timezone)
+        unless timezone.nil? or timezone == 'Z'
+          if /[+-](\d{2}):?(\d{2})/ =~ timezone
+            @timezone = timezone
+          else
+            raise ArgumentError, "timezone invalid"
+          end
+        else
+          @timezone = nil
+        end
+      end
+
+      def is_decimal_sign_comma?
+        false
+      end
+
+      def is_extended?
+        true
+      end
+
+      def is_partial?
+        second_unknown? or minute_unknown?
+      end
+
+      def as_string
+        s = sprintf("%02d", @hour)
+        if !@minute.nil?
+          s += ":" + sprintf("%02d",@minute)
+          if !@second.nil?
+            s += ":" + sprintf("%02d", @second)
+            if !@fractional_second.nil?
+              s += "." + @fractional_second.to_s[2..-1]
+              if !@timezone.nil?
+                s += @timezone
+              end
+            end
+          end
+        end
+        return s
+      end
+    end
+
+    class ISO8601Time < TimeDefinitions
+      include ISO8601TimeModule
+      def initialize(string)
+        /(\d{2}):?(\d{2})?(:?)(\d{2})?((\.|,)(\d+))?(Z|([+-](\d{2}):?(\d{2})))?/ =~ string
+        if $2.nil?
+          self.minute = nil
+        else
+          self.minute = $2.to_i
+        end
+        if $4.nil?
+          self.second = nil
+        else
+          self.second = $4.to_i
+        end
+        if $1.nil?
+          raise ArgumentError, 'data invalid'
+        else
+          self.hour = $1.to_i
+        end
+        if $7.nil?
+          self.fractional_second = nil
+        else
+          self.fractional_second = ("0." + $7).to_f
+        end
+        if $8.nil?
+          self.timezone = nil
+        else
+          self.timezone = $8
+        end
+      end
+
+      def self.valid_iso8601_time?(s)
+        if /^(\d{2}):?(\d{2})?(:?)(\d{2})?((\.|,)(\d+))?(Z|([+-](\d{2}):?(\d{2})))?$/ =~ s
+# ISO 8601 regular expression by H. Yuki
+#  http://digit.que.ne.jp/work/wiki.cgi?Perl%E3%83%A1%E3%83%A2%2FW3C%E5%BD%A2%E5%BC%8F%E3%81%AE%E6%97%A5%E6%99%82%E3%81%AE%E8%A7%A3%E6%9E%90
+# (\d{4})(?:-(\d{2})(?:-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d))?)?(Z|([+-]\d{2}):(\d{2}))?)?)?)?
+          hh = $1; mm = $2; ss = $4; msec = $7; tz = $8
+          if hh.to_i == HOURS_IN_DAY and (mm.nil? or mm.to_i == 0) and (ss.nil? or ss.to_i == 0) and (msec.nil? or msec.to_i==0)
+            return true
+          end
+          if hh.nil? or (hh.to_i < 0 or hh.to_i >= HOURS_IN_DAY)
+            return false
+          end
+          if !mm.nil? 
+            if !self.valid_minute?(mm.to_i)
+              return false
+            end
+          end
+          if !ss.nil? 
+            if !self.valid_second?(ss.to_i)
+              return false
+            end
+          end
+          if !tz.nil? and tz != "Z"
+            if /[+-](\d{2}):?(\d{2})/ =~ tz
+              h = $1; m = $2
+              if h.to_i < 0 or h.to_i >= HOURS_IN_DAY
+                return false
+              end
+              if m.to_i < 0 or m.to_i >= MINUTES_IN_HOUR
+                return false
+              end
+            end
+          end
+          return true
+        else
+          return false
+        end
+      end
+    end # end of ISO8601_TIME
+
+    module ISO8601DateTimeModule
+      include ISO8601DateModule, ISO8601TimeModule
+      def as_string
+        if (!@year.nil? and !@month.nil? and !@day.nil?)
+          s = Date.new(@year, @month, @day).to_s
+        elsif (!@year.nil? and !@month.nil? and @day.nil?)
+          return Date.new(@year, @month).to_s[0,7]
+        elsif (!@year.nil? and @month.nil? and @day.nil?)
+          return Date.new(@year).to_s[0,4]
+        end
+        unless hour.nil?
+          s += sprintf("T%02d", @hour)
+          unless @minute.nil?
+            s += ":" + sprintf("%02d",@minute)
+            unless @second.nil?
+              s += ":" + sprintf("%02d", @second)
+              unless @fractional_second.nil?
+                s += "." + @fractional_second.to_s[2..-1]
+                unless @timezone.nil?
+                  s += @timezone
+                end
+              end
+            end
+          end
+        end
+        return s
+      end
+    end
+
+    class ISO8601DateTime < ISO8601Date
+      include ISO8601DateTimeModule
+      def initialize(string)
+        unless /(\d{4})(?:-(\d{2})(?:-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?(Z|([+-]\d{2}):?(\d{2}))?)?)?)?/ =~ string
+          raise ArgumentError, 'format invalid'
+        else
+          self.year = $1.to_i
+        end
+        if $2.nil?
+          self.month = nil
+        else
+          self.month = $2.to_i
+        end
+        if $3.nil?
+          self.day = nil
+        else
+          self.day = $3.to_i
+        end
+        if $5.nil?
+          self.minute = nil
+        else
+          self.minute = $5.to_i
+        end
+        if $6.nil?
+          self.second = nil
+        else
+          self.second = $6.to_i
+        end
+        if $4.nil?
+          self.hour = nil
+        else
+          self.hour = $4.to_i
+        end
+        if $7.nil? or $7.empty?
+          self.fractional_second = nil
+        else
+          self.fractional_second = ("0."+$7).to_f
+        end
+        if $8.nil?
+          self.timezone = nil
+        else
+          self.timezone = $9+$10
+        end
+      end
+    end
+  
+    class ISO8601Timezone
+      attr_accessor :sign, :hour, :minute
+
+      def initialize(string)
+        unless /(Z|(([+-])(\d{2}):?(\d{2})))/ =~ string
+          raise ArgumentError, 'invaild format'
+        end
+        if $1 == 'Z'
+          @sign, @hour, @minute = +1, 0, 0
+        else
+          @sign, @hour, @minute = ($3+'1').to_i, $4.to_i , $5.to_i
+        end
+      end
+
+      def is_gmt?
+        @sign == +1 and @hour == 0 and @minute == 0
+      end
+
+      def as_string
+        if @sign == +1
+          s = "+"
+        elsif @sign == -1
+          s = "-"
+        end
+        sprintf("%s%02d%02d", s, @hour, @minute)
+      end
+    end # end of ISO8601Timezone
+
+    module ISO8601DurationModule
+      attr_reader :years, :months, :weeks, :days
+      attr_reader :hours, :minutes, :seconds, :fractional_second
+
+      def years=(years)
+        unless years.nil? || years >= 0
+          raise ArgumentError, 'years must be above zero'
+        end
+        @years = years
+      end
+
+      def months=(months)
+        unless months.nil? || months >= 0
+          raise ArgumentError, 'months must be above zero'
+        end
+        @months = months
+      end
+
+      def weeks=(weeks)
+        unless weeks.nil? || weeks >= 0
+          raise ArgumentError, 'weeks must be above zero'
+        end
+        @weeks = weeks
+      end
+
+      def days=(days)
+        unless days.nil? || days >= 0
+          raise ArgumentError, 'days must be above zero'
+        end
+        @days = days
+      end
+
+      def hours=(hours)
+        unless hours.nil? || hours >= 0
+          raise ArgumentError, 'hours must be above zero'
+        end
+        @hours = hours
+      end
+
+      def minutes=(minutes)
+        unless minutes.nil? || minutes >= 0
+          raise ArgumentError, 'minutes must be above zero'
+        end
+        @minutes = minutes
+      end
+
+      def seconds=(seconds)
+        unless seconds.nil? || seconds >= 0
+          raise ArgumentError, 'seconds must be above zero'
+        end
+        @seconds = seconds
+      end
+
+      def fractional_second=(fractional_second)
+        unless fractional_second.nil? || (fractional_second >= 0 && fractional_second < 1.0)
+          raise ArgumentError, 'fractional_second must be between 0.0 and 1.0'
+        end
+        @fractional_second = fractional_second
+      end
+
+      def as_string
+        str = 'P'
+        unless @years.nil?
+          str += @years.to_s + 'Y'
+        end
+        unless @months.nil?
+          str += @months.to_s + 'M'
+        end
+        unless @weeks.nil?
+          str += @weeks.to_s + 'W'
+        end
+        unless @days.nil?
+          str += @days.to_s + 'D'
+        end
+        unless @hours.nil?
+          str += 'T' + @hours.to_s + 'H'
+          unless @minutes.nil?
+            str += @minutes.to_s + 'M'
+            unless @seconds.nil?
+              str += @seconds.to_s
+              unless @fractional_second.nil?
+                str += @fractional_second.to_s[1 .. -1]
+              end
+              str += 'S'
+            end
+          end
+        end
+        return str
+      end
+    end
+
+    class ISO8601Duration < TimeDefinitions
+      include ISO8601DurationModule
+      def initialize(str)
+        /^P((\d+)Y)?((\d+)M)?((\d+)W)?((\d)D)?(T((\d+)H)?((\d+)M)?((\d+)(\.\d+)?S)?)?$/ =~ str
+        self.years = $2.to_i
+        self.months = $4.to_i
+        self.weeks = $6.to_i
+        self.days = $8.to_i
+        self.hours = $11.to_i
+        self.minutes = $13.to_i
+        self.seconds = $15.to_i
+        unless $16.nil?
+          self.fractional_second = $16.to_f
+        end
+      end
+    end # end of ISO8601Duration
+  end # end of Assumed_Types
+end # end of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/common/archetyped.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/common/archetyped.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/common/archetyped.rb	(revision 367)
@@ -0,0 +1,182 @@
+# This module is based on the UML,
+# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109318114715_211173_0Report.html
+# Ticket refs #65
+module OpenEHR
+  module RM
+    module Common
+      module Archetyped
+        module LocaterConstants
+          CURRENT_TRANSACTION_ID = "current"
+          FRAGMENT_SEPARATOR = "#"
+          CONTENT_PATH_SEPARATOR = "|"
+          ORGANIZER_PATH_SEPARATOR = "/"
+          MULTIPART_ID_DELIMITER = "::"
+        end
+
+        class Pathable
+          attr_accessor :parent
+
+          def initialize(args = { })
+            self.parent = args[:parent]
+          end
+
+          def item_at_path(path)
+            raise NotImplementedError, "item_at_path must be implemented"
+          end
+
+          def items_at_path(path)
+            raise NotImplementedError, "items_at_path must be implemented"
+          end
+
+          def path_exists?(path)
+            raise NotImplementedError, "path_exists? must be implemented"
+          end
+
+          def path_of_item(item)
+            raise NotImplementedError, "path_of_item must be implemented"
+          end
+
+          def path_unique?(path)
+            raise NotImplementedError, "path_unique? must be implemented"
+          end
+        end
+
+        class Locatable < Pathable
+          include LocaterConstants
+          attr_reader :archetype_node_id, :name, :links
+          attr_accessor :uid, :archetype_details, :feeder_audit
+
+          def initialize(args = { })
+            super(args)
+            self.archetype_node_id = args[:archetype_node_id]
+            self.name = args[:name]
+            self.links = args[:links]
+            self.uid = args[:uid]
+            self.archetype_details = args[:archetype_details]
+            self.feeder_audit = args[:feeder_audit]
+          end
+          
+          def archetype_node_id=(archetype_node_id)
+            if archetype_node_id.nil? or archetype_node_id.empty?
+              raise ArgumentError, 'archetype_node_id should not be nil'
+            end
+            @archetype_node_id = archetype_node_id
+          end
+
+          def name=(name)
+            if name.nil? or name.value.empty?
+              raise ArgumentError, 'name should not be empty'
+            end
+            @name = name
+          end
+
+          def links=(links)
+            if !links.nil? and links.empty?
+              raise ArgumentError, "links shoud not be empty"
+            end
+            @links = links
+          end
+
+          def concept
+            if self.is_archetype_root?
+              return DvText.new(:value => 
+                                @archetype_details.archetype_id.concept_name)
+            else
+              raise ArgumentError, 'this is not root'
+            end
+          end
+
+          def is_archetype_root?
+            !archetype_details.nil?
+          end
+        end
+
+        class Archetyped
+          attr_reader :archetype_id, :rm_version
+          attr_accessor :template_id
+
+          def initialize(args = { })
+            self.archetype_id = args[:archetype_id]
+            self.rm_version = args[:rm_version]
+            self.template_id = args[:template_id]
+          end
+
+          def archetype_id=(archetype_id)
+            raise ArgumentError, "invalid archetype_id" if archetype_id.nil?
+            @archetype_id = archetype_id
+          end
+
+          def rm_version=(rm_version)
+            if rm_version.nil? or rm_version.empty?
+              raise ArgumentError, "invalid rm_version"
+            end
+            @rm_version = rm_version
+          end
+        end
+
+        class Link
+          attr_reader :meaning, :target, :type
+          def initialize(args = { })
+            self.meaning = args[:meaning]
+            self.target = args[:target]
+            self.type = args[:type]
+          end
+          def meaning=(meaning)
+            raise ArgumentError, "meaning should not be nil" if meaning.nil?
+            @meaning = meaning
+          end
+          def target=(target)
+            raise ArgumentError, "target should not be nil" if target.nil?
+            @target = target
+          end
+          def type=(type)
+            raise ArgumentError, "type should not be nil" if type.nil?
+            @type = type
+          end
+        end # of Link
+
+        class FeederAudit
+          attr_reader :originating_system_audit
+          attr_accessor :originating_system_item_ids, :feeder_system_audit,
+                        :feeder_system_item_ids, :original_content
+
+          def initialize(args = { })
+            self.originating_system_audit = args[:originating_system_audit]
+            self.originating_system_item_ids = args[:originating_system_item_ids]
+            self.feeder_system_audit = args[:feeder_system_audit]
+            self.feeder_system_item_ids = args[:feeder_system_item_ids]
+            self.original_content = args[:original_content]
+          end
+
+          def originating_system_audit=(originating_system_audit)
+            if originating_system_audit.nil?
+              raise ArgumentError, 'originating_system_audit must be not nil'
+            end
+            @originating_system_audit = originating_system_audit
+          end
+        end # of FeederAudit
+
+        class FeederAuditDetails
+          attr_reader :system_id
+          attr_accessor :provider, :location, :time, :subject, :version_id
+
+          def initialize(args = { })
+            self.system_id = args[:system_id]
+            self.provider = args[:provider]
+            self.location = args[:location]
+            self.time = args[:time]
+            self.subject = args[:subject]
+            self.version_id = args[:version_id]
+          end
+
+          def system_id=(system_id)
+            if system_id.nil? or system_id.empty?
+              raise ArgumentError, 'system_id invalid'
+            end
+            @system_id = system_id
+          end
+        end # of FeederAudit_Details
+      end # of Archetyped
+    end # of Common
+  end # of RM
+end # OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/common/change_control.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/common/change_control.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/common/change_control.rb	(revision 367)
@@ -0,0 +1,332 @@
+# This module is based on the UML,
+# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109326589721_134411_997Report.html
+# Ticket refs #64
+include OpenEHR::RM::Common::Generic
+module OpenEHR
+  module RM
+    module Common
+      module ChangeControl
+        class Contribution
+          attr_reader :uid, :versions, :audit
+
+          def initialize(args = { })
+            self.uid = args[:uid]
+            self.versions = args[:versions]
+            self.audit = args[:audit]
+          end
+
+          def uid=(uid)
+            if uid.nil?
+              raise ArgumentError, "uid should not be nil."
+            end
+            @uid = uid
+          end
+
+          def versions=(versions)
+            unless versions.nil?
+              if versions.empty?
+                raise ArgumentError, 'versions shoud not be nil or empty.'
+              end
+            end
+            @versions = versions
+          end
+
+          def audit=(audit)
+            if audit.nil?
+              raise ArgumentError, 'audit should not be nil.'
+            end
+            if audit.description.nil?
+              raise ArgumentError, 'audit.description should not be nil.'
+            end
+            @audit = audit
+          end
+        end
+
+        class Version
+          attr_reader :uid, :preceding_version_uid, :lifecycle_state,
+                      :commit_audit, :contribution
+          attr_accessor :data, :signature
+
+          def initialize(args = { })
+            self.uid = args[:uid]
+            self.preceding_version_uid = args[:preceding_version_uid]
+            self.data = args[:data]
+            self.lifcycle_state = args[:lifecycle_state]
+            self.commit_audit = args[:commit_audit]
+            self.contribution = args[:contribution]
+            self.signature = args[:signature]
+          end
+
+          def uid=(uid)
+            raise ArgumentError, "uid should not be nil" if uid.nil?
+            @uid = uid
+          end
+
+          def preceding_version_uid=(preceding_version_uid)
+            if (!preceding_version_uid.nil?) ==  @uid.version_tree_id.is_first?
+              raise ArgumentError, 'preceding version is invalid'
+            end
+            @preceding_version_uid = preceding_version_uid
+          end
+
+# remove hard coding of lifecycle
+          def lifcycle_state=(lifecycle_state)
+            if lifecycle_state.nil? ||
+                !%w[532 553 523].include?(
+                              lifecycle_state.defining_code.code_string)
+              raise ArgumentError, 'invalid lifecycle_state'
+            end
+            @lifecycle_state = lifecycle_state
+          end
+
+          def commit_audit=(commit_audit)
+            if commit_audit.nil?
+              raise ArgumentError,'commit_audit is mandatory'
+            end
+            @commit_audit = commit_audit
+          end
+
+          def contribution=(contribution)
+            if contribution.nil? or contribution.type.empty?
+              raise ArgumentError, "contribution is invalid"
+            end
+            if contribution.type == 'CONTRIBUTION'
+              @contribution = contribution
+            else
+              raise ArgumentError, 'contribution is invalid'
+            end
+          end
+
+          def owner_id
+            return HierObjectID.new(:value => @uid.value)
+          end
+
+          def is_branch?
+            return @uid.is_branch?
+          end
+
+          def canonical_form
+            raise NotImplementedError, 'canonical form is not determined'
+          end
+        end
+
+        class ImportedVersion < Version
+          attr_reader :item
+
+          def initialize(args = { })
+            self.item = args[:item]
+            super(:uid => @item.uid,
+                  :preceding_version_uid => @item.preceding_version_uid,
+                  :data => @item.data, :commit_audit=> args[:commit_audit],
+                  :commit_audit => args[:commit_audit],
+                  :contribution => args[:contribution],
+                  :lifecycle_state => @item.lifecycle_state,
+                  :signature => args[:signature])                  
+          end
+
+          def item=(item)
+            raise ArgumentError, 'item is mandatory' if item.nil?
+            @item = item
+          end
+        end
+
+        class OriginalVersion < Version
+          attr_reader :attestations, :other_input_version_uids
+
+          def initialize(args = { })
+            super(args)
+            self.attestations = args[:attestations]
+            self.other_input_version_uids = args[:other_input_version_uids]
+          end
+
+          def attestations=(attestations)
+            if attestations.nil? || attestations.empty?
+              raise ArgumentError, 'attestations is mandatory'
+            end
+            @attestations = attestations
+          end
+
+          def other_input_version_uids=(other_input_version_uids)
+            if !other_input_version_uids.nil? && other_input_version_uids.empty?
+              raise ArgumentError, 'invaild other_input_version_uids'
+            end
+            @other_input_version_uids = other_input_version_uids
+          end
+
+          def is_merged?
+            return !other_input_version_uids.nil?
+          end
+        end
+
+        class VersionedObject
+          attr_reader :uid, :owner_id, :time_created, :all_versions
+
+          def initialize(args = { })
+            self.uid = args[:uid]
+            self.owner_id = args[:owner_id]
+            self.time_created = args[:time_created]
+            self.all_versions = args[:all_versions]
+          end
+
+          def uid=(uid)
+            raise ArgumentError, 'uid is mandatory' if uid.nil?
+            @uid = uid
+          end
+
+          def owner_id=(owner_id)
+            raise ArgumentError, 'owner_id is mandatory' if owner_id.nil?
+            @owner_id = owner_id
+          end
+
+          def time_created=(time_created)
+            if time_created.nil?
+              raise ArgumentError, 'time_created is mandatory'
+            end
+            @time_created = time_created
+          end
+
+          def all_versions=(all_versions)
+            if all_versions.nil? || all_versions.size < 0
+              raise ArgumentError, 'version count invalid'
+            end
+            @all_versions = all_versions
+          end
+
+          def all_version_ids
+            ids = []
+            @all_versions.each{|id| ids << id.uid}
+            return ids
+          end
+
+          def version_count
+            return all_versions.size
+          end
+
+          def has_version_id?(a_ver_id)
+            raise ArgumentError, 'argument is mandatory' if a_ver_id.nil?
+            return self.all_version_ids.include?(a_ver_id)
+          end
+
+          def is_original_version?(a_ver_id)
+            if a_ver_id.nil? || !self.has_version_id?(a_ver_id)
+              raise ArgumentError, 'invalid a_ver_id'
+            end
+            return @all_versions[self.all_version_ids.index(a_ver_id)].instance_of? OriginalVersion
+          end
+
+          def has_version_at_time?(a_time)
+            raise ArgumentError, 'argument mandatory' if a_time.nil?
+            @all_versions.each do |ver|
+              if ver.commit_audit.time_committed == a_time
+                return true
+              end
+            end
+            return false
+          end
+
+          def version_with_id(a_ver_id)
+            if a_ver_id.nil? || !self.has_version_id?(a_ver_id)
+              raise ArgumentError, 'argument invalid'
+            end
+            return @all_versions[self.all_version_ids.index(a_ver_id)]
+          end
+
+          def version_at_time(a_time)
+            if a_time.nil? || !self.has_version_at_time?(a_time)
+              raise ArgumentError, 'argument invalid'
+            end
+            @all_versions.each do |ver|
+              if ver.commit_audit.time_committed == a_time
+                return ver
+              end
+            end
+          end
+
+          def latest_version
+            time_sorted_version = @all_versions.sort do |a,b|
+              a.commit_audit.time_committed <=> b.commit_audit.time_committed
+            end
+            return time_sorted_version.last
+          end
+
+          def latest_trunk_version
+            trunk_versions = [ ]
+            @all_versions.each do |ver|
+              if ver.uid.version_tree_id.trunk_version == '1'
+                trunk_versions << ver
+              end
+            end
+            sorted_trunk_version = trunk_versions.sort do |a,b|
+              a.commit_audit.time_committed <=> b.commit_audit.time_committed
+            end
+            return sorted_trunk_version.last
+          end
+
+          def trunk_lifecycle_state
+            return self.latest_trunk_version.lifecycle_state
+          end
+
+          def revision_history
+            revision_history_items = [ ]
+            @all_versions.each do |ver|
+              audits = [ ]
+              if ver.instance_of? OriginalVersion
+                audits << ver.attestations
+              end
+              audits << ver.commit_audit
+              revision_history_items << RevisionHistoryItem.new(
+                                          :audits => audits,
+                                          :version_id => ver.uid)
+            end
+            return RevisionHistory.new(:items => revision_history_items)
+          end
+
+          def commit_original_version(args={ })
+            if has_version_id?(args[:preceding_version_uid]) or self.version_count == 0
+              @all_versions << OriginalVersion.new(:uid => args[:uid],
+                                                   :preceding_version_uid => args[:preceding_version_uid],
+                                                   :contribution => args[:contribution],
+                                                   :commit_audit => args[:commit_audit],
+                                                   :lifecycle_state => args[:lifecycle_state],
+                                                   :data => args[:data],
+                                                   :attestations => args[:attestations],
+                                                   :signature => args[:signature])
+            else
+              raise ArgumentError, 'invalid preceding uid'
+            end
+          end
+            
+          def commit_original_merged_version(args = { })
+            @all_versions << OriginalVersion.new(:uid => args[:uid],
+                                                  :contribution => args[:contribution],
+                                              :preceding_version_uid => args[:preceding_version_uid],
+                                              :commit_audit => args[:commit_audit],
+                                              :lifecycle_state => args[:lifecycle_state],
+                                              :data => args[:data],
+                                              :attestations => args[:attestations],
+                                              :other_input_version_uids => args[:other_input_version_uids],
+                                              :signature => args[:signature])
+          end
+
+          def commit_imported_version(args = { })
+            @all_versions << ImportedVersion.new(:item => args[:item],
+                                                 :contribution => args[:contribution],
+                                                 :commit_audit => args[:commit_audit])
+          end
+
+          def commit_attestation(args = { })
+            if args[:attestation].nil?
+              raise ArgumentError, 'attestation is mandatory'
+            end
+            if self.has_version_id?(args[:uid]) && self.is_original_version?(args[:uid])
+              self.version_with_id(args[:uid]).attestations << args[:attestation]
+              self.version_with_id(args[:uid]).signature = args[:signature]
+            else
+              raise ArgumentError, 'uid invalid'
+            end
+          end
+        end
+      end # of ChangeControl
+    end # of Common
+  end # of RM
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/common/directory.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/common/directory.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/common/directory.rb	(revision 367)
@@ -0,0 +1,29 @@
+# This module is based on the UML,
+# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_5_1_76d0249_1140536622627_218703_7149Report.html
+# Ticket refs #63
+include OpenEHR::RM::DataTypes::Text
+module OpenEHR
+  module RM
+    module Common
+      module Directory
+        class Folder < OpenEHR::RM::Common::Archetyped::Locatable
+          attr_accessor :items
+          attr_reader :folders
+
+          def initialize(args = { })
+            super(args)
+            self.folders = args[:folders]
+            self.items = args[:items]
+          end
+
+          def folders=(folders)
+            raise ArgumentError, "empty subfolder" if !folders.nil? and folders.empty?
+            @folders = folders
+          end
+        end        
+        class VersionedFolder < OpenEHR::RM::Common::ChangeControl::VersionedObject
+        end
+      end # of Directory
+    end # of Common
+  end # of RM
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/common/generic.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/common/generic.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/common/generic.rb	(revision 367)
@@ -0,0 +1,216 @@
+# This module is a implementation of the bellow UML
+# 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::DataTypes::Basic
+module OpenEHR
+  module RM
+    module Common
+      module Generic
+        class AuditDetails
+          attr_reader :system_id, :committer, :time_committed, :change_type
+          attr_accessor :description
+
+          def initialize(args = { })
+            self.system_id = args[:system_id]
+            self.committer = args[:committer]
+            self.time_committed = args[:time_committed]
+            self.change_type = args[:change_type]
+            self.description = args[:description]
+          end
+
+          def system_id=(system_id)
+            if system_id.nil? or system_id.empty?
+              raise ArgumentError, 'system_id is mandatory'
+            end
+            @system_id = system_id
+          end
+
+          def committer=(committer)
+            raise ArgumentError, 'committer is mandatory' if committer.nil?
+            @committer = committer
+          end
+
+          def time_committed=(time_committed)
+            if time_committed.nil?
+              raise ArgumentError, 'time_committed is mandatory'
+            end
+            @time_committed = time_committed
+          end
+             
+          def change_type=(change_type)
+            raise ArgumentError, 'change_type is mandatory' if change_type.nil?
+            @change_type = change_type
+          end
+        end
+
+        class RevisionHistory
+          attr_reader :items
+
+          def initialize(args = { })
+            self.items = args[:items]
+          end
+
+          def items=(items)
+            if items.nil? or items.empty?
+              raise ArgumentError, 'item(s) is/are mandatory'
+            end
+            @items  = items
+          end
+
+          def most_recent_version
+            return @items.last.version_id.value
+          end
+
+          def most_recent_version_time_committed
+            return @items.last.audits.first.time_committed.value
+          end
+        end # of RevisionHistory
+
+        class RevisionHistoryItem
+          attr_reader :version_id, :audits
+
+          def initialize(args = { })
+            self.version_id = args[:version_id]
+            self.audits = args[:audits]
+          end
+
+          def audits=(audits)
+            if audits.nil? or audits.empty?
+              raise ArgumentError, 'audits is mandatory'
+            end
+            @audits = audits
+          end
+
+          def version_id=(version_id)
+            raise ArgumentError, 'version_id is mandatory' if version_id.nil?
+            @version_id = version_id
+          end
+        end # of RevisionHistory_Item
+
+        class PartyProxy
+          attr_accessor :external_ref
+
+          def initialize(args = { })
+            self.external_ref = args[:external_ref]
+          end
+        end
+
+        class PartySelf < PartyProxy
+
+        end
+
+        class PartyIdentified < PartyProxy
+          attr_reader :name, :identifier
+
+          def initialize(args = { })
+            if args[:external_ref].nil? && args[:name].nil? &&
+                args[:identifier].nil?
+              raise ArgumentError, 'cannot identified'
+            end
+            self.name = args[:name]
+            self.identifier = args[:identifier]
+            super(args)
+          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
+            if !identifier.nil? && identifier.empty?
+              raise ArgumentError, 'invaild identifier'
+            end
+            @identifier = identifier
+          end
+
+          def external_ref=(external_ref)
+            if @name.nil? && @identifier.nil? && external_ref.nil?
+              raise ArgumentError, 'invalid external_ref'
+            end
+            @external_ref = external_ref
+          end
+        end
+
+        class PartyRelated < PartyIdentified
+          attr_reader :relationship
+          def initialize(args = { })
+            super(args)
+            self.relationship = args[:relationship]
+          end
+
+          def relationship=(relationship)
+            if relationship.nil?
+              raise ArgumentError, 'relationship must not be nil'
+            end
+            @relationship = relationship
+          end
+        end
+
+        class Participation
+          attr_reader :performer, :function, :mode
+          attr_accessor :time
+
+          def initialize(args ={ })
+            self.performer = args[:performer]
+            self.function = args[:function]
+            self.mode = args[:mode]
+            self.time = args[:time]
+          end
+
+          def performer=(performer)
+            raise ArgumentError, 'performer is mandatory' if performer.nil?
+            @performer = performer
+          end
+
+          def function=(function)
+            raise ArgumentError, 'function is mandatory' if function.nil?
+            @function = function
+          end
+
+          def mode=(mode)
+            raise ArgumentError, 'mode is mandatory' if mode.nil?
+            @mode = mode
+          end
+        end
+
+        class Attestation < AuditDetails
+          attr_reader :reason
+          attr_accessor :proof, :attested_view, :is_pending, :items
+
+          def initialize(args = { })
+            super(args)
+            self.reason = args[:reason]
+            self.proof = args[:proof]
+            self.items = args[:items]
+            self.attested_view = args[:attested_view]
+            self.is_pending = args[:is_pending]
+          end
+
+          def reason=(reason)
+            raise ArgumentError, 'reason is mandatory' if reason.nil?
+            @reason = reason
+          end
+
+          def items=(items)
+            if !items.nil? && items.empty?
+              raise ArgumentError, 'items should not be empty'
+            end
+            @items = items
+          end
+          
+          def is_pending?
+            return is_pending
+          end
+        end
+      end # of Generic
+    end # of Common
+  end # of RM
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/common/resource.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/common/resource.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/common/resource.rb	(revision 367)
@@ -0,0 +1,154 @@
+require 'set'
+module OpenEHR
+  module RM
+    module Common
+      module Resource
+        class AuthoredResource
+          attr_reader  :original_language, :translations
+          attr_accessor :description, :revision_history
+
+          def initialize(args = { })
+            self.original_language = args[:original_language]
+            self.translations = args[:translations]
+            self.revision_history = args[:revision_history]
+            self.description = args[:description]
+          end
+
+          def original_language=(original_language)
+            if original_language.nil?
+              raise ArgumentError, 'original language is mandatory'
+            end
+            @original_language = original_language
+          end
+
+          def translations=(translations)
+            if !translations.nil? && translations.empty?
+              raise ArgumentError, 'translation is empty'
+            end
+            @translations = translations
+          end
+
+          def current_revision
+            @revision_history.most_recent_version
+          end
+
+          def languages_available
+            return Set.new(@translations.keys) << original_language.code_string
+          end
+
+          def is_controlled?
+            return !@revision_history.nil?
+          end
+        end
+
+        class TranslationDetails
+          attr_reader :language, :author
+          attr_accessor :accreditation, :other_details
+
+          def initialize(args = {})
+            self.language = args[:language]
+            self.author = args[:author]
+            self.accreditation = args[:accreditation]
+            self.other_details = args[:other_details]
+          end
+
+          def language=(language)
+            raise ArgumentError, 'language is mandatory' if language.nil?
+            @language = language
+          end
+
+          def author=(author)
+            raise ArgumentError, 'author is mandatory' if author.nil?
+            @author = author
+          end
+        end
+
+        class ResourceDescription
+          attr_reader :original_author, :lifecycle_state, :details
+          attr_accessor :other_contributors, :resource_package_uri,
+                        :other_details, :parent_resource
+
+          def initialize(args = {})
+            self.original_author = args[:original_author]
+            self.lifecycle_state = args[:lifecycle_state]
+            self.details = args[:details]
+            self.other_contributors = args[:other_contributors]
+            self.resource_package_uri = args[:resource_package_uri]
+            self.other_details = args[:other_details]
+            self.parent_resource = args[:parent_resource]
+          end
+
+          def original_author=(original_author)
+            if original_author.nil? || original_author.empty?
+              raise ArgumentError, 'original_author is mandatory'
+            end
+            @original_author = original_author
+          end
+
+          def lifecycle_state=(lifecycle_state)
+            if lifecycle_state.nil? || lifecycle_state.empty?
+              raise ArgumentError, 'lifecycle_state is malformatted'
+            end
+            @lifecycle_state = lifecycle_state
+          end
+
+          def details=(details)
+            if details.nil? || details.empty?
+              raise ArgumentError, 'nil or empty details'
+            end
+            @details = details
+          end
+        end
+
+        class ResourceDescriptionItem
+          attr_reader :language, :purpose, :use, :misuse, :copyright
+          attr_accessor :keywords, :original_resource_uri, :other_details
+
+          def initialize(args = { })
+            self.language = args[:language]
+            self.purpose = args[:purpose]
+            self.keywords = args[:keywords]
+            self.use = args[:use]
+            self.misuse = args[:misuse]
+            self.copyright = args[:copyright]
+            self.original_resource_uri = args[:original_resource_uri]
+            self.other_details = args[:other_details]
+          end
+
+          def language=(language)
+            raise ArgumentError, 'language is mandatory' if language.nil?
+            @language = language
+          end
+
+          def purpose=(purpose)
+            if purpose.nil? || purpose.empty?
+              raise ArgumentError, 'purpose is mandatory'
+            end
+            @purpose = purpose
+          end
+
+          def use=(use)
+            if !use.nil? && use.empty?
+              raise ArgumentError, 'use is invalid'
+            end
+            @use = use
+          end
+
+          def misuse=(misuse)
+            if !misuse.nil? && misuse.empty?
+              raise ArgumentError, 'misuse is invalid'
+            end
+            @misuse = misuse
+          end
+
+          def copyright=(copyright)
+            if !copyright.nil? && copyright.empty?
+              raise ArgumentError, 'copyright is invalid'
+            end
+            @copyright = copyright
+          end
+        end
+      end # end of Resouce
+    end # end of module Common
+  end # end of module RM
+end # end of module OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/composition.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/composition.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/composition.rb	(revision 367)
@@ -0,0 +1,100 @@
+# rm::composition
+# composition module
+# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109005072243_448526_217Report.html
+# refs #79
+include OpenEHR::RM::Common::Archetyped
+module OpenEHR
+  module RM
+    module Composition
+      class Composition < Locatable
+        attr_reader :language, :category, :territory, :composer
+        attr_accessor :content, :context
+
+        def initialize(args = { })
+          super(args)
+          self.language = args[:language]
+          self.category = args[:category]
+          self.territory = args[:territory]
+          self.composer = args[:composer]
+          self.content = args[:content]
+          self.context = args[:context]
+        end
+
+        def language=(language)
+          if language.nil?
+            raise ArgumentError, 'language is mandatory'
+          end
+          @language = language
+        end
+
+        def category=(category)
+          if category.nil?
+            raise ArgumentError, 'category is mandatory'
+          end
+          @category = category
+        end
+
+        def territory=(territory)
+          if territory.nil?
+            raise ArgumentError, 'territory is mandatory'
+          end
+          @territory = territory
+        end
+
+        def composer=(composer)
+          if composer.nil?
+            raise ArgumentError, 'composer is mandatory'
+          end
+          @composer = composer
+        end
+
+        def is_persistent?
+          return category.value == 'persistent'
+        end
+      end
+
+      class EventContext < Pathable
+        attr_reader :start_time, :setting, :participations, :location
+        attr_accessor :end_time, :other_context
+
+        def initialize(args = { })
+          super(args)
+          self.start_time = args[:start_time]
+          self.setting = args[:setting]
+          self.end_time = args[:end_time]
+          self.participations = args[:participations]
+          self.location = args[:location]
+          self.other_context = args[:other_context]
+        end
+
+        def start_time=(start_time)
+          if start_time.nil?
+            raise ArgumentError, 'start_time is mandatory'
+          end
+          @start_time = start_time
+        end
+
+        def setting=(setting)
+          if setting.nil?
+            raise ArgumentError, 'setting is mandatory'
+          end
+          @setting = setting
+        end
+
+        def participations=(participations)
+          if !participations.nil? and participations.empty?
+            raise ArgumentError, 'participations should not be empty'
+          end
+          @participations = participations
+        end
+
+        def location=(location)
+          if !location.nil? and location.empty?
+            raise ArgumentError, 'location should not be empty'
+          end
+          @location = location
+        end
+      end
+    end # end of Composition
+  end # end of RM
+end # end of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/composition/content.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/composition/content.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/composition/content.rb	(revision 367)
@@ -0,0 +1,17 @@
+# rm::composition::content
+# content module
+# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_5_1_76d0249_1140524925046_706492_3290Report.html
+# refs #58
+include OpenEHR::RM::Common::Archetyped
+
+module OpenEHR
+  module RM
+    module Composition
+      module Content
+        class ContentItem < Locatable
+
+        end
+      end # end of Content
+    end # end of Composition
+  end # end of RM
+end # end of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/composition/content/entry.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/composition/content/entry.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/composition/content/entry.rb	(revision 367)
@@ -0,0 +1,246 @@
+# rm::composition::content::entry
+# entry module
+# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109264528523_312165_346Report.html
+# refs #56
+include OpenEHR::RM::Composition::Content
+
+module OpenEHR
+  module RM
+    module Composition
+      module Content
+        module Entry
+          class Entry < ContentItem
+            attr_reader :language, :encoding, :subject
+            attr_accessor :provider, :other_participations, :workflow_id
+            def initialize(args = { })
+              super(args)
+              self.language = args[:language]
+              self.encoding = args[:encoding]
+              self.subject = args[:subject]
+              self.provider = args[:provider]
+              self.other_participations = args[:other_participations]
+              self.workflow_id = args[:workflow_id]
+            end
+
+            def language=(language)
+              raise ArgumentError, 'language is mandatory' if language.nil?
+              @language = language
+            end
+
+            def encoding=(encoding)
+              raise ArgumentError, 'encoding is mandatory' if encoding.nil?
+              @encoding = encoding
+            end
+
+            def subject=(subject)
+              raise ArgumentError, 'subject is mandatory' if subject.nil?
+              @subject = subject
+            end
+
+            def subject_is_self?
+              return @subject.instance_of? PartySelf
+            end
+          end
+
+          class AdminEntry < Entry
+            attr_reader :data
+
+            def initialize(args = { })
+              super(args)
+              self.data = args[:data]
+            end
+
+            def data=(data)
+              raise ArgumentError, 'data are mandatory' if data.nil?
+              @data = data
+            end
+          end
+          class CareEntry < Entry
+            attr_accessor :protocol, :guideline_id
+
+            def initialize(args = { })
+              super(args)
+              self.protocol = args[:protocol]
+              self.guideline_id = args[:guideline_id]
+            end
+          end
+
+          class Observation < CareEntry
+            attr_reader :data
+            attr_accessor :state
+
+            def initialize(args = { })
+              super(args)
+              self.data = args[:data]
+              self.state = args[:state]
+            end
+
+            def data=(data)
+              raise ArgumentError, 'data are mandatory' if data.nil?
+              @data = data
+            end
+          end
+
+          class Evaluation < CareEntry
+            attr_reader :data
+
+            def initialize(args = { })
+              super(args)
+              self.data = args[:data]
+            end
+
+            def data=(data)
+              raise ArgumentError, 'data are mandatory' if data.nil?
+              @data = data
+            end
+          end
+
+          class Instruction < CareEntry
+            attr_reader :narrative, :activities
+            attr_accessor :expiry_time, :wf_definition
+
+            def initialize(args = { })
+              super(args)
+              self.narrative = args[:narrative]
+              self.activities = args[:activities]
+              self.expiry_time = args[:expiry_time]
+              self.wf_definition = args[:wf_definition]
+            end
+
+            def narrative=(narrative)
+              if narrative.nil?
+                raise ArgumentError, 'narrative is mandatory'
+              end
+              @narrative = narrative
+            end
+
+            def activities=(activities)
+              if !activities.nil? && activities.empty?
+                raise ArgumentError, 'activities should not be empty'
+              end
+              @activities = activities
+            end
+          end
+
+          class Activity < Locatable
+            attr_reader :description, :timing, :action_archetype_id
+
+            def initialize(args = { })
+              super(args)
+              self.description = args[:description]
+              self.timing = args[:timing]
+              self.action_archetype_id = args[:action_archetype_id]
+            end
+
+            def description=(description)
+              if description.nil?
+                raise ArgumentError, 'description is mandatory'
+              end
+              @description = description
+            end
+
+            def timing=(timing)
+              if timing.nil?
+                raise ArgumentError, 'timing is mandatory'
+              end
+              @timing = timing
+            end
+          end
+
+          def action_archetype_id=(action_archetype_id)
+            if action_archetype_id.nil? || action_archetype_id.empty?
+              raise ArgumentError, 'action_archetype_id is mandatory'
+            end
+            @action_archetype_id = action_archetype_id
+          end
+
+          class Action < CareEntry
+            attr_reader :time, :description, :ism_transition
+            attr_accessor :instruction_details
+            
+            def initialize(args = { })
+              super(args)
+              self.description = args[:description]
+              self.time = args[:time]
+              self.ism_transition = args[:ism_transition]
+              self.instruction_details = args[:instruction_details]
+            end
+
+            def time=(time)
+              if time.nil?
+                raise ArgumentError, 'time is mandatory'
+              end
+              @time = time
+            end
+
+            def description=(description)
+              if description.nil?
+                raise ArgumentError, 'description is mandatory'
+              end
+              @description = description
+            end
+
+            def ism_transition=(ism_transition)
+              if ism_transition.nil?
+                raise ArgumentError
+              end
+              @ism_transition = ism_transition
+            end
+          end
+
+          class InstructionDetails < Pathable
+            attr_reader :instruction_id, :activity_id
+            attr_accessor :wf_details
+
+            def initialize(args = { })
+              super(args)
+              self.instruction_id = args[:instruction_id]
+              self.activity_id = args[:activity_id]
+              self.wf_details = args[:wf_details]
+            end
+
+            def instruction_id=(instruction_id)
+              if instruction_id.nil?
+                raise ArgumentError, 'instruction_id is mandatory'
+              end
+              @instruction_id = instruction_id
+            end
+
+            def activity_id=(activity_id)
+              if activity_id.nil? || activity_id.empty?
+                raise ArgumentError, 'activity_id is mandatory'
+              end
+              @activity_id = activity_id
+            end
+          end
+
+          class IsmTransition < Pathable
+            attr_reader :current_state, :transition
+            attr_accessor :careflow_step
+
+            def initialize(args = { })
+              super(args)
+              self.current_state = args[:current_state]
+              self.transition = args[:transition]
+              self.careflow_step = args[:careflow_step]
+            end
+
+            def current_state=(current_state)
+              if current_state.nil?
+                raise ArgumentError, 'current_state is mandatory'
+              end
+              @current_state = current_state
+            end
+
+            def transition=(transition)
+              if transition.nil?
+                raise ArgumentError, 'transition is mandatory'
+              end
+              @transition = transition
+            end
+          end
+        end # of Entry
+      end # of Content
+    end # of Composition
+  end # of RM
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/composition/content/navigation.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/composition/content/navigation.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/composition/content/navigation.rb	(revision 367)
@@ -0,0 +1,31 @@
+# rm::composition::content::navigation
+# navigation module
+# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109264528523_312165_346Report.html
+# refs #56
+include OpenEHR::RM::Composition::Content
+
+module OpenEHR
+  module RM
+    module Composition
+      module Content
+        module Navigation
+          class Section < ContentItem
+            attr_reader :items 
+
+            def initialize(args = { })
+              super(args)
+              self.items = args[:items]
+            end
+
+            def items=(items)
+              if !items.nil? && items.empty?
+                raise ArgumentError, 'items should not be empty'
+              end
+              @items = items
+            end
+          end
+        end
+      end # end of Content
+    end # end of Composition
+  end # end of RM
+end # end of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_structures.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_structures.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_structures.rb	(revision 367)
@@ -0,0 +1,20 @@
+# rm::data_structures
+# class DATA_STRUCTURE
+# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_5_1_76d0249_1140447518205_872539_864Report.html
+# refs #59
+
+module OpenEHR
+  module RM
+    module DataStructures
+      class DataStructure < OpenEHR::RM::Common::Archetyped::Locatable
+        def initialize(args = { })
+          super(args)
+        end
+
+        def as_hierarchy
+          raise NotImplementedError, "as_hirarchy must be implemented"
+        end
+      end
+    end # of Data_Structures
+  end # of RM
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_structures/history.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_structures/history.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_structures/history.rb	(revision 367)
@@ -0,0 +1,114 @@
+# rm::data_structures::history
+# history module
+# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109157527311_729550_7234Report.html
+# refs #55
+require 'time'
+include OpenEHR::RM::DataStructures
+include OpenEHR::RM::Common::Archetyped
+
+module OpenEHR
+  module RM
+    module DataStructures
+      module History
+        class History < DataStructure
+          attr_reader :origin, :events
+          attr_accessor :duration, :period, :summary
+
+          def initialize(args = { })
+            super(args)
+            self.origin = args[:origin]
+            self.duration = args[:duration]
+            self.period = args[:period]
+            self.events = args[:events]
+            self.summary = args[:summary]
+          end
+
+          def origin=(origin)
+            raise ArgumentError, 'origin is mandatory' if origin.nil?
+            @origin = origin
+          end
+
+          def events=(events)
+            if !events.nil? and events.empty?
+              raise ArgumentError, 'events should not be empty'
+            end
+            @events = events
+          end
+
+          def is_periodic?
+            return !@period.nil?
+          end
+        end
+
+        class Event < Locatable
+          attr_reader :data, :time
+          attr_accessor :state
+
+          def initialize(args = { })
+            super(args)
+            self.data = args[:data]
+            self.time = args[:time]
+            self.state = args[:state]
+          end
+
+          def data=(data)
+            raise ArgumentError, 'data is mandatory' if data.nil?
+            @data = data
+          end
+
+          def time=(time)
+            raise ArgumentError, 'time is mandatory' if time.nil?
+            @time = time
+          end
+
+          def offset
+            return @time.diff(@parent.origin)
+          end
+        end
+
+        class PointEvent < Event
+
+        end
+
+        class IntervalEvent < Event
+          attr_reader :width, :math_function
+          attr_accessor :sample_count
+
+          def initialize(args = { })
+            super(args)
+            self.width = args[:width]
+            self.math_function = args[:math_function]
+            self.sample_count = args[:sample_count]
+          end
+
+          def width=(width)
+            raise ArgumentError, 'width is mandatory' if width.nil?
+            @width = width
+          end
+
+          def math_function=(math_function)
+            if math_function.nil?
+              raise ArgumentError, 'math_function is mandatory'
+            end
+            @math_function = math_function
+          end
+
+          def interval_start_time
+            date_time = ::Time.iso8601(time.as_string)
+            start_time = (@width.years).years.ago date_time
+            start_time = (@width.months).months.ago start_time
+            start_time = (@width.days).days.ago start_time
+            start_time = (@width.hours).hours.ago start_time
+            start_time = (@width.minutes).minutes.ago start_time
+            seconds = @width.seconds
+            unless @width.fractional_second.nil?
+              seconds += @width.fractional_second
+            end
+            start_time = seconds.ago start_time
+            return DvDateTime.new(:value => start_time.iso8601)
+          end
+        end
+      end # end of History
+    end # end of DataStructure
+  end # end of RM
+end # end of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_structures/item_structure.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_structures/item_structure.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_structures/item_structure.rb	(revision 367)
@@ -0,0 +1,213 @@
+# rm::data_structures::item_structure
+# ItemStructure module
+# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109346709572_859750_3810Report.html
+# refs #54
+require 'set'
+include OpenEHR::RM::DataStructures
+module OpenEHR
+  module RM
+    module DataStructures
+      module ItemStructure
+        class ItemStructure < DataStructure
+        end
+
+        class ItemSingle < ItemStructure
+          attr_reader :item
+
+          def initialize(args = {})
+            super(args)
+            self.item = args[:item]
+          end
+
+          def as_hierarchy
+            return @item
+          end
+
+          def item=(item)
+            raise ArgumentError, 'item is mandatory' if item.nil?
+            @item = item
+          end
+        end
+
+        class ItemList < ItemStructure
+          attr_accessor :items
+
+          def initialize(args = {})
+            super(args)
+            self.items = args[:items]
+          end
+
+          def item_count
+            unless @items.nil?
+              return @items.size
+            else
+              return 0
+            end
+          end
+
+          def names
+            return @items.collect{|item| item.name}
+          end
+
+          def named_item(a_name)
+            @items.each do |item|
+              return item if item.name.value == a_name
+            end
+            return nil
+          end
+
+          def ith_item(i)
+            raise ArgumentError, 'index invalid' if i <= 0
+            return @items[i - 1]
+          end
+
+          def as_hierarchy
+            return Cluster.new(:name => @name,
+                               :archetype_node_id => @archetype_node_id,
+                               :items => @items)
+          end
+        end
+
+        class ItemTable < ItemStructure
+          attr_accessor :rows
+
+          def initialize(args = {})
+            super(args)
+            self.rows = args[:rows]
+          end
+
+          def row_count
+            if @rows.nil?
+              return 0
+            else
+              return @rows.size
+            end
+          end
+
+          def column_count
+            if @rows.nil?
+              return 0
+            else
+              return @rows[0].items.count
+            end
+          end
+
+          def row_names
+            if @rows.nil?
+              return []
+            else
+              return @rows.collect{|r| r.name}
+            end
+          end
+
+          def column_names
+            if @rows.nil?
+              return []
+            else
+              return @rows[0].items.collect{|i| i.name}
+            end
+          end
+
+          def ith_row(i)
+            raise ArgumentError, 'invalid index' if i<=0 or i>@rows.size
+            return @rows[i - 1]
+          end
+
+          def has_row_with_name?(key)
+            raise ArgumentError, 'invalid argument' if key.nil? or key.empty?
+            @rows.each do |row|
+              return true if row.items[0].name.value == key
+            end
+            return false
+          end
+
+          def has_column_with_name?(key)
+            raise ArgumentError, 'invalid argument' if key.nil? or key.empty?
+            self.column_names.each do |name|
+              return true if name.value == key
+            end
+            return false
+          end
+
+          def named_row(key)
+            raise ArgumentError, 'invalid argument' unless has_row_with_name?(key)
+            @rows.each do |row|
+              return row if row.items[0].name.value == key
+            end
+          end
+
+          def has_row_with_key?(keys)
+            keys.each do |key|
+              @rows.each do |row|
+                return true if row.items[0].name.value == key
+              end
+            end
+            return false
+          end
+
+          def row_with_key(keys)
+            unless has_row_with_key?(keys)
+              raise ArgumentError, 'no row for key'
+            end
+            keys.each do |key|
+              @rows.each do |row|
+                return row if row.items[0].name.value == key
+              end
+            end
+          end
+
+          def element_at_cell_ij(i,j)
+            return @rows[i-1].items[j-1]
+          end
+
+          def element_at_named_cell(row_key, column_key)
+            i,j=0,0
+            @rows[0].items.each do |c|
+              break if c.name.value == column_key
+              i+=1
+            end
+            @rows.each do |row|
+              break if row.name.value == row_key
+              j+=1
+            end            
+            return element_at_cell_ij(i,j)
+          end
+
+          def as_hierarchy
+            return @rows[0]
+          end
+        end
+
+        class ItemTree < ItemStructure
+          attr_accessor :items
+
+          def initialize(args ={ })
+            super(args)
+            self.items = args[:items]
+          end
+
+          def has_element_path?(path)
+            paths = [ ]
+            @items.each do |item|
+              paths << item.archetype_node_id
+            end
+            return paths.include? path
+          end
+
+          def element_at_path(path)
+            @items.each do |item|
+              return item if item.archetype_node_id == path
+            end
+            return nil
+          end
+
+          def as_hierarchy
+            return Cluster.new(:name => @name,
+                               :archetype_node_id => @archetype_node_id,
+                               :items => @items)
+          end
+        end
+      end # of ItemStructure
+    end # of DataStructures
+  end # of RM
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_structures/item_structure/representation.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_structures/item_structure/representation.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_structures/item_structure/representation.rb	(revision 367)
@@ -0,0 +1,63 @@
+# rm::data_structures::item_structure::representation
+# representation module
+# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109066789167_738055_2581Report.html
+# refs #53
+module OpenEHR
+  module RM
+    module DataStructures
+      module ItemStructure
+        module Representation
+          class Item < OpenEHR::RM::Common::Archetyped::Locatable
+            def initialize(args = {})
+              super(args)
+            end
+          end
+
+          class Element < Item
+            attr_accessor :value
+            attr_reader :null_flavor
+            def initialize(args = {})
+              super(args)
+              self.value = args[:value]
+              self.null_flavor= args[:null_flavor]
+            end
+
+            def null_flavor=(null_flavor)
+              sr = nil
+              if !null_flavor.nil? and
+                  null_flavor.defining_code.terminology_id.name == 'openehr'
+                sr = Terminology.find(:first,                                  
+                                      :conditions => "code = '#{null_flavor.defining_code.code_string}'")
+              end
+              if null_flavor.nil? or (!sr.nil? and sr.group == 'null flavours')
+                @null_flavor = null_flavor
+              else
+                raise ArgumentError, 'null_flavor is invalid'
+              end
+            end
+
+            def is_null?
+              return @value.nil?
+            end
+          end
+
+          class Cluster < Item
+            attr_reader :items
+
+            def initialize(args = {})
+              super(args)
+              self.items = args[:items]
+            end
+
+            def items=(items)
+              if !items.nil? and items.empty?
+                raise ArgumentError, 'items should not empty'
+              end
+              @items = items
+            end
+          end
+        end # of Representation
+      end # of ItemStructure
+    end # of DataStructures
+  end # of RM
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/basic.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/basic.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/basic.rb	(revision 367)
@@ -0,0 +1,108 @@
+# This module is implemented from this UML:
+# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109067591791_562382_3151Report.html
+# Ticket refs #52
+module OpenEHR
+  module RM
+    module DataTypes
+      module Basic
+        module CanonicalFragment
+        end
+
+        class DataValue
+          include OpenEHR::RM::Support::Definition::BasicDefinition
+          attr_accessor :value
+          alias :v :value
+
+          def initialize(args = {})
+            self.value = args[:value]
+          end
+
+          def ==(other)
+            return self.value == other.value
+          end
+        end
+
+        class DvBoolean < DataValue
+          def initialize(args)
+            super(args)
+          end
+
+          def value=(value)
+            raise ArgumentError, "value must not be nil" if value.nil?
+            if value == true or value =~ /TRUE/i
+              @value = true
+            else
+              @value = false
+            end
+          end
+
+          def value?
+            @value == true
+          end
+        end  # end of DvBoolean
+
+        class DvState < DataValue
+          attr_reader :is_terminal
+
+          def initialize(args)            
+            super(args)
+            self.is_terminal = args[:is_terminal]
+          end
+
+          def value=(v)
+            raise ArgumentError, "value should not be nil" if v.nil?
+            @value = v
+          end
+
+          def is_terminal?
+            @is_terminal
+          end
+
+          def is_terminal=(s)
+            raise ArgumentError, "terminal should not be nil" if s.nil?
+            @is_terminal = s
+          end
+        end # end of DvState
+
+        class DvIdentifier < DataValue
+          attr_reader :issuer, :assigner, :id, :type
+
+          def initialize(args = {})
+            self.issuer = args[:issuer]
+            self.assigner = args[:assigner]
+            self.id = args[:id]
+            self.type = args[:type]
+          end
+
+          def issuer=(issuer)
+            if issuer.nil? or issuer.empty?
+              raise ArgumentError, 'issuer is mandatory'
+            end
+            @issuer = issuer
+          end
+
+          def assigner=(assigner)
+            if assigner.nil? or assigner.empty?
+              raise ArgumentError, 'assigner is mandatory'
+            end
+            @assigner = assigner
+          end
+
+          def id=(id)
+            if id.nil? or id.empty?
+              raise ArgumentError, 'id is manadtory'
+            end
+            @id = id
+          end
+
+          def type=(type)
+            if type.nil? or type.empty?
+              raise ArgumentError, 'type is mandatory'
+            end
+            @type = type
+          end
+        end #end of DvIdentifier
+      end # end of Basic
+    end # end of DataTypes
+  end # end of RM
+end # end of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/charset.lst
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/charset.lst	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/charset.lst	(revision 367)
@@ -0,0 +1,818 @@
+ANSI_X3.4-1968
+iso-ir-6
+ANSI_X3.4-1986
+ISO_646.irv:1991
+ASCII
+ISO646-US
+US-ASCII
+us
+IBM367
+cp367
+csASCII
+ISO_8859-1:1987
+iso-ir-100
+ISO_8859-1
+ISO-8859-1
+latin1
+l1
+IBM819
+CP819
+csISOLatin1
+ISO_8859-2:1987
+iso-ir-101
+ISO_8859-2
+ISO-8859-2
+latin2
+l2
+csISOLatin2
+ISO_8859-3:1988
+iso-ir-109
+ISO_8859-3
+ISO-8859-3
+latin3
+l3
+csISOLatin3
+ISO_8859-4:1988
+iso-ir-110
+ISO_8859-4
+ISO-8859-4
+latin4
+l4
+csISOLatin4
+ISO_8859-5:1988
+iso-ir-144
+ISO_8859-5
+ISO-8859-5
+cyrillic
+csISOLatinCyrillic
+ISO_8859-6:1987
+iso-ir-127
+ISO_8859-6
+ISO-8859-6
+ECMA-114
+ASMO-708
+arabic
+csISOLatinArabic
+ISO_8859-7:1987
+iso-ir-126
+ISO_8859-7
+ISO-8859-7
+ELOT_928
+ECMA-118
+greek
+greek8
+csISOLatinGreek
+ISO_8859-8:1988
+iso-ir-138
+ISO_8859-8
+ISO-8859-8
+hebrew
+csISOLatinHebrew
+ISO_8859-9:1989
+iso-ir-148
+ISO_8859-9
+ISO-8859-9
+latin5
+l5
+csISOLatin5
+ISO-8859-10
+iso-ir-157
+l6
+ISO_8859-10:1992
+csISOLatin6
+latin6
+ISO_6937-2-add
+iso-ir-142
+csISOTextComm
+JIS_X0201
+X0201
+csHalfWidthKatakana
+JIS_Encoding
+csJISEncoding
+Shift_JIS
+MS_Kanji
+csShiftJIS
+Extended_UNIX_Code_Packed_Format_for_Japanese
+csEUCPkdFmtJapanese
+EUC-JP
+Extended_UNIX_Code_Fixed_Width_for_Japanese
+csEUCFixWidJapanese
+BS_4730
+iso-ir-4
+ISO646-GB
+gb
+uk
+csISO4UnitedKingdom
+SEN_850200_C
+iso-ir-11
+ISO646-SE2
+se2
+csISO11SwedishForNames
+IT
+iso-ir-15
+ISO646-IT
+csISO15Italian
+ES
+iso-ir-17
+ISO646-ES
+csISO17Spanish
+DIN_66003
+iso-ir-21
+de
+ISO646-DE
+csISO21German
+NS_4551-1
+iso-ir-60
+ISO646-NO
+no
+csISO60DanishNorwegian
+csISO60Norwegian1
+NF_Z_62-010
+iso-ir-69
+ISO646-FR
+fr
+csISO69French
+ISO-10646-UTF-1
+csISO10646UTF1
+ISO_646.basic:1983
+ref
+csISO646basic1983
+INVARIANT
+csINVARIANT
+ISO_646.irv:1983
+iso-ir-2
+irv
+csISO2IntlRefVersion
+NATS-SEFI
+iso-ir-8-1
+csNATSSEFI
+NATS-SEFI-ADD
+iso-ir-8-2
+csNATSSEFIADD
+NATS-DANO
+iso-ir-9-1
+csNATSDANO
+NATS-DANO-ADD
+iso-ir-9-2
+csNATSDANOADD
+SEN_850200_B
+iso-ir-10
+FI
+ISO646-FI
+ISO646-SE
+se
+csISO10Swedish
+KS_C_5601-1987
+iso-ir-149
+KS_C_5601-1989
+KSC_5601
+korean
+csKSC56011987
+ISO-2022-KR
+csISO2022KR
+EUC-KR
+csEUCKR
+ISO-2022-JP
+csISO2022JP
+ISO-2022-JP-2
+csISO2022JP2
+JIS_C6220-1969-jp
+JIS_C6220-1969
+iso-ir-13
+katakana
+x0201-7
+csISO13JISC6220jp
+JIS_C6220-1969-ro
+iso-ir-14
+jp
+ISO646-JP
+csISO14JISC6220ro
+PT
+iso-ir-16
+ISO646-PT
+csISO16Portuguese
+greek7-old
+iso-ir-18
+csISO18Greek7Old
+latin-greek
+iso-ir-19
+csISO19LatinGreek
+NF_Z_62-010_(1973)
+iso-ir-25
+ISO646-FR1
+csISO25French
+Latin-greek-1
+iso-ir-27
+csISO27LatinGreek1
+ISO_5427
+iso-ir-37
+csISO5427Cyrillic
+JIS_C6226-1978
+iso-ir-42
+csISO42JISC62261978
+BS_viewdata
+iso-ir-47
+csISO47BSViewdata
+INIS
+iso-ir-49
+csISO49INIS
+INIS-8
+iso-ir-50
+csISO50INIS8
+INIS-cyrillic
+iso-ir-51
+csISO51INISCyrillic
+ISO_5427:1981
+iso-ir-54
+ISO5427Cyrillic1981
+ISO_5428:1980
+iso-ir-55
+csISO5428Greek
+GB_1988-80
+iso-ir-57
+cn
+ISO646-CN
+csISO57GB1988
+GB_2312-80
+iso-ir-58
+chinese
+csISO58GB231280
+NS_4551-2
+ISO646-NO2
+iso-ir-61
+no2
+csISO61Norwegian2
+videotex-suppl
+iso-ir-70
+csISO70VideotexSupp1
+PT2
+iso-ir-84
+ISO646-PT2
+csISO84Portuguese2
+ES2
+iso-ir-85
+ISO646-ES2
+csISO85Spanish2
+MSZ_7795.3
+iso-ir-86
+ISO646-HU
+hu
+csISO86Hungarian
+JIS_C6226-1983
+iso-ir-87
+x0208
+JIS_X0208-1983
+csISO87JISX0208
+greek7
+iso-ir-88
+csISO88Greek7
+ASMO_449
+ISO_9036
+arabic7
+iso-ir-89
+csISO89ASMO449
+iso-ir-90
+csISO90
+JIS_C6229-1984-a
+iso-ir-91
+jp-ocr-a
+csISO91JISC62291984a
+JIS_C6229-1984-b
+iso-ir-92
+ISO646-JP-OCR-B
+jp-ocr-b
+csISO92JISC62991984b
+JIS_C6229-1984-b-add
+iso-ir-93
+jp-ocr-b-add
+csISO93JIS62291984badd
+JIS_C6229-1984-hand
+iso-ir-94
+jp-ocr-hand
+csISO94JIS62291984hand
+JIS_C6229-1984-hand-add
+iso-ir-95
+jp-ocr-hand-add
+csISO95JIS62291984handadd
+JIS_C6229-1984-kana
+iso-ir-96
+csISO96JISC62291984kana
+ISO_2033-1983
+iso-ir-98
+e13b
+csISO2033
+ANSI_X3.110-1983
+iso-ir-99
+CSA_T500-1983
+NAPLPS
+csISO99NAPLPS
+T.61-7bit
+iso-ir-102
+csISO102T617bit
+T.61-8bit
+T.61
+iso-ir-103
+csISO103T618bit
+ECMA-cyrillic
+iso-ir-111
+KOI8-E
+csISO111ECMACyrillic
+CSA_Z243.4-1985-1
+iso-ir-121
+ISO646-CA
+csa7-1
+ca
+csISO121Canadian1
+CSA_Z243.4-1985-2
+iso-ir-122
+ISO646-CA2
+csa7-2
+csISO122Canadian2
+CSA_Z243.4-1985-gr
+iso-ir-123
+csISO123CSAZ24341985gr
+ISO_8859-6-E
+csISO88596E
+ISO-8859-6-E
+ISO_8859-6-I
+csISO88596I
+ISO-8859-6-I
+T.101-G2
+iso-ir-128
+csISO128T101G2
+ISO_8859-8-E
+csISO88598E
+ISO-8859-8-E
+ISO_8859-8-I
+csISO88598I
+ISO-8859-8-I
+CSN_369103
+iso-ir-139
+csISO139CSN369103
+JUS_I.B1.002
+iso-ir-141
+ISO646-YU
+js
+yu
+csISO141JUSIB1002
+IEC_P27-1
+iso-ir-143
+csISO143IECP271
+JUS_I.B1.003-serb
+iso-ir-146
+serbian
+csISO146Serbian
+JUS_I.B1.003-mac
+macedonian
+iso-ir-147
+csISO147Macedonian
+greek-ccitt
+iso-ir-150
+csISO150
+csISO150GreekCCITT
+NC_NC00-10:81
+cuba
+iso-ir-151
+ISO646-CU
+csISO151Cuba
+ISO_6937-2-25
+iso-ir-152
+csISO6937Add
+GOST_19768-74
+ST_SEV_358-88
+iso-ir-153
+csISO153GOST1976874
+ISO_8859-supp
+iso-ir-154
+latin1-2-5
+csISO8859Supp
+ISO_10367-box
+iso-ir-155
+csISO10367Box
+latin-lap
+lap
+iso-ir-158
+csISO158Lap
+JIS_X0212-1990
+x0212
+iso-ir-159
+csISO159JISX02121990
+DS_2089
+DS2089
+ISO646-DK
+dk
+csISO646Danish
+us-dk
+csUSDK
+dk-us
+csDKUS
+KSC5636
+ISO646-KR
+csKSC5636
+UNICODE-1-1-UTF-7
+csUnicode11UTF7
+ISO-2022-CN
+ISO-2022-CN-EXT
+UTF-8
+ISO-8859-13
+ISO-8859-14
+iso-ir-199
+ISO_8859-14:1998
+ISO_8859-14
+latin8
+iso-celtic
+l8
+ISO-8859-15
+ISO_8859-15
+Latin-9
+ISO-8859-16
+iso-ir-226
+ISO_8859-16:2001
+ISO_8859-16
+latin10
+l10
+GBK
+CP936
+MS936
+windows-936
+GB18030
+ISO-11548-1
+ISO_11548-1
+ISO_TR_11548-1
+csISO115481
+KZ-1048
+STRK1048-2002
+RK1048
+csKZ1048
+ISO-10646-UCS-2
+csUnicode
+ISO-10646-UCS-4
+csUCS4
+ISO-10646-UCS-Basic
+csUnicodeASCII
+ISO-10646-Unicode-Latin1
+csUnicodeLatin1
+ISO-10646
+ISO-10646-J-1
+ISO-Unicode-IBM-1261
+csUnicodeIBM1261
+ISO-Unicode-IBM-1268
+csUnicodeIBM1268
+ISO-Unicode-IBM-1276
+csUnicodeIBM1276
+ISO-Unicode-IBM-1264
+csUnicodeIBM1264
+ISO-Unicode-IBM-1265
+csUnicodeIBM1265
+UNICODE-1-1
+csUnicode11
+SCSU
+UTF-7
+UTF-16BE
+UTF-16LE
+UTF-16
+CESU-8
+csCESU-8
+UTF-32
+UTF-32BE
+UTF-32LE
+BOCU-1
+csBOCU-1
+ISO-8859-1-Windows-3.0-Latin-1
+csWindows30Latin1
+ISO-8859-1-Windows-3.1-Latin-1
+csWindows31Latin1
+ISO-8859-2-Windows-Latin-2
+csWindows31Latin2
+ISO-8859-9-Windows-Latin-5
+csWindows31Latin5
+hp-roman8
+roman8
+r8
+csHPRoman8
+Adobe-Standard-Encoding
+csAdobeStandardEncoding
+Ventura-US
+csVenturaUS
+Ventura-International
+csVenturaInternational
+DEC-MCS
+dec
+csDECMCS
+IBM850
+cp850
+850
+csPC850Multilingual
+PC8-Danish-Norwegian
+csPC8DanishNorwegian
+IBM862
+cp862
+862
+csPC862LatinHebrew
+PC8-Turkish
+csPC8Turkish
+IBM-Symbols
+csIBMSymbols
+IBM-Thai
+csIBMThai
+HP-Legal
+csHPLegal
+HP-Pi-font
+csHPPiFont
+HP-Math8
+csHPMath8
+Adobe-Symbol-Encoding
+csHPPSMath
+HP-DeskTop
+csHPDesktop
+Ventura-Math
+csVenturaMath
+Microsoft-Publishing
+csMicrosoftPublishing
+Windows-31J
+csWindows31J
+GB2312
+csGB2312
+Big5
+csBig5
+macintosh
+mac
+csMacintosh
+IBM037
+cp037
+ebcdic-cp-us
+ebcdic-cp-ca
+ebcdic-cp-wt
+ebcdic-cp-nl
+csIBM037
+IBM038
+EBCDIC-INT
+cp038
+csIBM038
+IBM273
+CP273
+csIBM273
+IBM274
+EBCDIC-BE
+CP274
+csIBM274
+IBM275
+EBCDIC-BR
+cp275
+csIBM275
+IBM277
+EBCDIC-CP-DK
+EBCDIC-CP-NO
+csIBM277
+IBM278
+CP278
+ebcdic-cp-fi
+ebcdic-cp-se
+csIBM278
+IBM280
+CP280
+ebcdic-cp-it
+csIBM280
+IBM281
+EBCDIC-JP-E
+cp281
+csIBM281
+IBM284
+CP284
+ebcdic-cp-es
+csIBM284
+IBM285
+CP285
+ebcdic-cp-gb
+csIBM285
+IBM290
+cp290
+EBCDIC-JP-kana
+csIBM290
+IBM297
+cp297
+ebcdic-cp-fr
+csIBM297
+IBM420
+cp420
+ebcdic-cp-ar1
+csIBM420
+IBM423
+cp423
+ebcdic-cp-gr
+csIBM423
+IBM424
+cp424
+ebcdic-cp-he
+csIBM424
+IBM437
+cp437
+437
+csPC8CodePage437
+IBM500
+CP500
+ebcdic-cp-be
+ebcdic-cp-ch
+csIBM500
+IBM851
+cp851
+851
+csIBM851
+IBM852
+cp852
+852
+csPCp852
+IBM855
+cp855
+855
+csIBM855
+IBM857
+cp857
+857
+csIBM857
+IBM860
+cp860
+860
+csIBM860
+IBM861
+cp861
+861
+cp-is
+csIBM861
+IBM863
+cp863
+863
+csIBM863
+IBM864
+cp864
+csIBM864
+IBM865
+cp865
+865
+csIBM865
+IBM868
+CP868
+cp-ar
+csIBM868
+IBM869
+cp869
+869
+cp-gr
+csIBM869
+IBM870
+CP870
+ebcdic-cp-roece
+ebcdic-cp-yu
+csIBM870
+IBM871
+CP871
+ebcdic-cp-is
+csIBM871
+IBM880
+cp880
+EBCDIC-Cyrillic
+csIBM880
+IBM891
+cp891
+csIBM891
+IBM903
+cp903
+csIBM903
+IBM904
+cp904
+904
+csIBBM904
+IBM905
+CP905
+ebcdic-cp-tr
+csIBM905
+IBM918
+CP918
+ebcdic-cp-ar2
+csIBM918
+IBM1026
+CP1026
+csIBM1026
+EBCDIC-AT-DE
+csIBMEBCDICATDE
+EBCDIC-AT-DE-A
+csEBCDICATDEA
+EBCDIC-CA-FR
+csEBCDICCAFR
+EBCDIC-DK-NO
+csEBCDICDKNO
+EBCDIC-DK-NO-A
+csEBCDICDKNOA
+EBCDIC-FI-SE
+csEBCDICFISE
+EBCDIC-FI-SE-A
+csEBCDICFISEA
+EBCDIC-FR
+csEBCDICFR
+EBCDIC-IT
+csEBCDICIT
+EBCDIC-PT
+csEBCDICPT
+EBCDIC-ES
+csEBCDICES
+EBCDIC-ES-A
+csEBCDICESA
+EBCDIC-ES-S
+csEBCDICESS
+EBCDIC-UK
+csEBCDICUK
+EBCDIC-US
+csEBCDICUS
+UNKNOWN-8BIT
+csUnknown8BiT
+MNEMONIC
+csMnemonic
+MNEM
+csMnem
+VISCII
+csVISCII
+VIQR
+csVIQR
+KOI8-R
+csKOI8R
+HZ-GB-2312
+IBM866
+cp866
+866
+csIBM866
+IBM775
+cp775
+csPC775Baltic
+KOI8-U
+IBM00858
+CCSID00858
+CP00858
+PC-Multilingual-850+euro
+IBM00924
+CCSID00924
+CP00924
+ebcdic-Latin9--euro
+IBM01140
+CCSID01140
+CP01140
+ebcdic-us-37+euro
+IBM01141
+CCSID01141
+CP01141
+ebcdic-de-273+euro
+IBM01142
+CCSID01142
+CP01142
+ebcdic-dk-277+euro
+ebcdic-no-277+euro
+IBM01143
+CCSID01143
+CP01143
+ebcdic-fi-278+euro
+ebcdic-se-278+euro
+IBM01144
+CCSID01144
+CP01144
+ebcdic-it-280+euro
+IBM01145
+CCSID01145
+CP01145
+ebcdic-es-284+euro
+IBM01146
+CCSID01146
+CP01146
+ebcdic-gb-285+euro
+IBM01147
+CCSID01147
+CP01147
+ebcdic-fr-297+euro
+IBM01148
+CCSID01148
+CP01148
+ebcdic-international-500+euro
+IBM01149
+CCSID01149
+CP01149
+ebcdic-is-871+euro
+Big5-HKSCS
+IBM1047
+IBM-1047
+PTCP154
+csPTCP154
+PT154
+CP154
+Cyrillic-Asian
+BRF
+csBRF
+TSCII
+csTSCII
+windows-1250
+windows-1251
+windows-1252
+windows-1253
+windows-1254
+windows-1255
+windows-1256
+windows-1257
+windows-1258
+TIS-620
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/charset_extract.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/charset_extract.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/charset_extract.rb	(revision 367)
@@ -0,0 +1,24 @@
+#! /usr/bin/env ruby
+# charactor sets extraction from download file from
+# http://www.iana.org/assignments/character-sets
+# as character-sets
+
+class CharacterSets
+  def self.get_list
+    list = Array.new
+    open('character-sets') do |file|
+      while line = file.gets
+        if /^((Name:)|(Alias:)) (\S+)/ =~ line
+          list << $4 unless $4 == "None"
+        end
+      end
+    end
+    return list
+  end
+end
+
+open('charset.lst','w') do |f|
+  CharacterSets.get_list.each do |line|
+    f.puts(line)
+  end
+end
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/encapsulated.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/encapsulated.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/encapsulated.rb	(revision 367)
@@ -0,0 +1,98 @@
+# OpenEHR::RM::Data_Types::Encapsulated 
+# http://www.openehr.org/svn/specification/TAGS/Release-1.0.2/publishing/architecture/computable/UML/uml_start_view.html
+# refs #51
+require 'rubygems'
+require 'locale/info'
+
+module OpenEHR
+  module RM
+    module DataTypes
+      module Encapsulated
+        class DvEncapsulated  < OpenEHR::RM::DataTypes::Basic::DataValue
+          attr_reader :language, :charset
+
+          def initialize(args = {})
+            super(args)
+            self.charset = args[:charset]
+            self.language = args[:language]
+          end
+
+          def size
+            @value.size
+          end
+
+          def language=(language)
+            if !language.nil? &&
+                !Locale::Info.language_code?(language.code_string)
+              raise ArgumentError, 'invalid language code'
+            end
+            @language = language
+          end
+
+          def charset=(charset)
+            if !charset.nil? && !charset_valid?(charset.code_string)
+              raise ArgumentError, 'invalid charset'
+            end
+            @charset = charset
+          end
+
+          private
+
+          def charset_valid?(charset)
+            result = false
+            open('lib/open_ehr/rm/data_types/charset.lst') do |file|
+              while line = file.gets
+                if charset == line.chomp
+                  result = true
+                  break
+                end
+              end
+            end
+            return result
+          end
+        end
+
+# media type http://www.iana.org/assignments/media-types/text/
+        class DvMultimedia < DvEncapsulated
+          attr_reader :media_type
+          attr_accessor :uri, :data, :compression_algorithm,
+          :integrity_check, :integrity_check_algorithm, :alternate_text
+
+          def initialize(args = {})
+            super(args)
+            self.media_type = args[:media_type]
+            self.uri = args[:uri]
+            self.data = args[:data]
+            self.compression_algorithm = args[:compression_algorithm]
+            self.integrity_check = args[:integrity_check]
+            self.integrity_check_algorithm = args[:integrity_check_algorithm]
+            self.alternate_text = args[:alternate_text]
+          end
+
+          def media_type=(media_type)
+            if media_type.code_string.nil?
+              raise ArgumentError, 'media_type should not be nil'
+            end
+            @media_type = media_type
+          end
+        end
+
+        class DvParsable < DvEncapsulated
+          attr_reader :formalism
+
+          def initialize(args = {})
+            super(args)
+            self.formalism = args[:formalism]
+          end
+
+          def formalism=(formalism)
+            if formalism.nil? || formalism.empty?
+              raise ArgumentError, 'formalism is mandatory'
+            end
+            @formalism = formalism
+          end
+        end
+      end # of Encapsulated
+    end # of DataTypes
+  end # of RM
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/quantity.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/quantity.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/quantity.rb	(revision 367)
@@ -0,0 +1,397 @@
+# This modules are implemented from the UML shown bellow
+# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109599337877_94556_1510Report.html
+# Ticket refs #50
+#require 'assumed_library_types'
+module OpenEHR
+  module RM
+    module DataTypes
+      module Quantity
+        class DvOrdered < OpenEHR::RM::DataTypes::Basic::DataValue
+          include Comparable
+          attr_accessor :normal_range, :other_refference_ranges, :normal_status
+
+          def initialize(args = {})
+            super(args)
+            self.normal_range = args[:normal_range]
+            self.normal_status = args[:normal_status]
+            self.other_reference_ranges = args[:other_reference_ranges]
+          end          
+
+          def is_normal?
+            if @normal_range.nil? and @normal_status.nil?
+              return false
+            elsif !@normal_range.nil?
+              return @normal_range.has(@value)
+            elsif !@normal_status.nil?
+              return @normal_status.code_string == 'N'
+            end
+          end
+
+          def is_simple?
+            return @other_reference_ranges.nil?
+          end
+
+          def <=>(other)
+            raise NotImplementedError, 'This method should be implemented'
+          end
+
+          def other_reference_ranges=(other_reference_ranges)
+            if !other_reference_ranges.nil? && other_reference_ranges.empty?
+              raise ArgumentError, "Other reference ranges validity error"
+            end
+            @other_reference_ranges = other_reference_ranges
+          end
+
+          def is_strictly_comparable_to?(others)
+            if others.instance_of? self.class
+              return true
+            else
+              return false
+            end
+          end
+        end
+
+        class DvInterval < OpenEHR::AssumedLibraryTypes::Interval
+
+        end
+
+        class DvQuantified < DvOrdered
+          attr_reader :magnitude, :magnitude_status
+
+          def initialize(args = {})
+            super(args)
+            self.magnitude = args[:magnitude]
+            self.magnitude_status = args[:magnitude_status]
+          end
+
+          def <=>(others)
+            self.magnitude <=> others.magnitude
+          end
+
+          def magnitude=(magnitude)
+            raise ArgumentError, 'magnitude should not be nil' if magnitude.nil?
+            @magnitude = magnitude
+          end
+
+          def magnitude_status=(magnitude_status)
+            if magnitude_status.nil?
+              @magnitude_status = '='
+            elsif DvQuantified.valid_magnitude_status?(magnitude_status)
+              @magnitude_status = magnitude_status
+            else
+              raise ArgumentError, 'magnitude_status invalid'
+            end
+          end
+
+          def accuracy_unknown?
+            return @accuracy.nil?
+          end
+
+          def self.valid_magnitude_status?(s)
+            if s == '=' || s == '>' || s == '<' || s == '<=' ||
+                s == '>=' || s == '~'
+              return true
+            else
+              return false
+            end
+          end
+        end
+
+        class DvOrdinal < DvOrdered
+          attr_reader :value, :symbol, :limits
+
+          def initialize(args = {})
+            super(args)
+            self.symbol = args[:symbol]
+            self.limits = args[:limits]
+          end
+
+          def value=(value)
+            raise ArgumentError, 'value should not be nil' if value.nil?
+            @value = value
+          end
+
+          def symbol=(symbol)
+            raise ArgumentError,'symbol should not be nil' if symbol.nil?
+            @symbol = symbol
+          end
+
+          def <=>(other)
+            @value <=> other.value
+          end
+
+          def limits=(limits)
+            unless limits.nil? or limits.meaning.value == 'limits'
+              raise ArgumentError, 'invalid limits'
+            else
+              @limits = limits
+            end
+          end
+          def is_strictly_comparable_to?(others)
+            unless super(others)
+              return false
+            end
+            unless others.symbol.defining_code.terminology_id.value ==
+                @symbol.defining_code.terminology_id.value
+              return false
+            else
+              return true
+            end
+          end
+        end
+
+        class DvAbsoluteQuantity < DvQuantified
+          attr_accessor :accuracy
+
+          def initialize(args = {})
+            super(args)
+            self.accuracy = args[:accuracy]
+          end
+
+          def add(a_diff)
+            type_check(a_diff)
+            return result_builder(self.class,
+                                  @magnitude+a_diff.magnitude)
+          end
+
+          def diff(other)
+            type_check(other)
+            return result_builder(self.class,
+                                  (@magnitude-other.magnitude).abs)
+          end
+
+          def subtract(a_diff)
+            type_check(a_diff)
+            return result_builder(self.class,
+                                  @magnitude-a_diff.magnitude)
+          end
+          private
+          def type_check(other)
+            unless self.is_strictly_comparable_to? other
+              raise ArgumentError, 'type mismatch'
+            end
+          end
+
+          def result_builder(klass, magnitude)
+            return klass.new(:magnitude => magnitude,
+                             :magnitude_status => @magnitude_status,
+                             :accuracy => @accuracy,
+                             :accuracy_percent => @accuracy_percent,
+                             :normal_range => @normal_range,
+                             :normal_status => @normal_status,
+                             :other_reference_ranges => @other_reference_ranges)
+          end
+        end
+
+        class DvAmount < DvQuantified
+          attr_reader :accuracy, :accuracy_percent
+
+          def initialize(args = {})
+            super(args)
+            unless args[:accuracy].nil?
+              set_accuracy(args[:accuracy], args[:accuracy_percent])
+            else
+              @accuracy, @accuracy_percent = nil, nil
+            end
+          end
+
+          def +(other)
+            unless self.is_strictly_comparable_to? other
+              raise ArgumentError, 'type mismatch'
+            end
+            result = self.dup
+            result.magnitude = @magnitude + other.magnitude
+            return result
+          end
+
+          def -(other)            
+            other.magnitude = - other.magnitude
+            self+(other)
+          end
+
+          def set_accuracy(accuracy, accuracy_percent)
+            if accuracy_percent
+              raise ArgumentError, 'accuracy invalid' if accuracy < 0.0 || accuracy > 100.0
+            else
+              raise ArgumentError, 'accuracy invaild' if accuracy < 0.0 || accuracy > 1.0
+            end
+            @accuracy, @accuracy_percent = accuracy, accuracy_percent
+          end
+
+          def accuracy_is_percent?
+            return @accuracy_percent
+          end
+        end
+
+        class DvQuantity < DvAmount
+          attr_reader :units, :precision
+
+          def initialize(args = {})
+            super(args)
+            self.units = args[:units]
+            self.precision = args[:precision]
+          end
+
+          def units=(units)
+            raise ArgumentError, 'units should not be nil' if units.nil?
+            @units = units
+          end
+
+          def precision=(precision)
+            unless precision.nil? || precision >= -1
+              raise ArgumentError, 'precision invalid'
+            end
+            @precision = precision
+          end
+
+          def is_strictly_comparable_to?(others)
+            unless super(others)
+              return false
+            end
+            if others.units == @units
+              return true
+            else
+              return false
+            end
+          end
+
+          def is_integral?
+            if @precision.nil? || precision != 0
+              return false
+            else
+              return true
+            end
+          end
+        end
+
+        class DvCount < DvAmount
+
+        end
+
+        class ReferenceRange
+          attr_reader :meaning, :range
+
+          def initialize(args = {})
+            self.meaning = args[:meaning]
+            self.range = args[:range]
+          end
+
+          def meaning=(meaning)
+            if meaning.nil?
+              raise ArgumentError, 'meaning should not be nil'
+            end
+            @meaning = meaning
+          end
+
+          def range=(range)
+            if range.nil?
+              raise ArgumentError, 'range should not be nil'
+            end
+            @range = range
+          end
+
+          def is_in_range?(val)
+            return @range.has?(val)
+          end
+        end
+
+        module ProportionKind
+          PK_RATIO = 0
+          PK_UNITARY = 1
+          PK_PERCENT = 2
+          PK_FRACTION = 3
+          PK_INTEGER_FRACTION = 4
+
+          def ProportionKind.valid_proportion_kind?(kind)
+            return true if kind >= 0 && kind <= 4
+            return false
+          end
+        end # end of ProportionKind
+
+        class DvProportion < DvAmount
+          include ProportionKind
+          attr_reader :numerator, :denominator, :type, :precision
+
+          def initialize(args = {})
+            self.type = args[:type]
+            self.numerator = args[:numerator]
+            self.denominator = args[:denominator]
+            self.precision = args[:precision]
+            self.magnitude_status =args[:magnitude_status]
+            unless args[:accuracy].nil?
+              set_accuracy(args[:accuracy], args[:accuracy_percent])
+            else
+              @accuracy, @accuracy_percent = nil, nil
+            end
+            self.normal_range = args[:normal_range]
+            self.normal_status = args[:normal_status]
+            self.other_reference_ranges = args[:other_reference_ranges]
+          end
+
+          def numerator=(numerator)
+            raise ArgumentError, 'numerator should not be nil' if numerator.nil?
+            if (@type == PK_FRACTION || @type == PK_INTEGER_FRACTION) &&
+                !numerator.integer?
+              raise ArgumentError, 'numerator invalid for type'
+            end
+            @numerator = numerator
+          end
+
+          def denominator=(denominator)
+            case @type
+            when PK_UNITARY
+              unless denominator == 1
+                raise ArgumentError, 'Unitary denominator must be 1'
+              end
+            when PK_PERCENT
+              unless denominator == 100
+                raise ArgumentError, 'Percent denominator must be 100'
+              end
+            when PK_FRACTION, PK_INTEGER_FRACTION
+              unless denominator.integer? and @numerator.integer?
+                raise ArgumentError, 'Fraction numerator/denominator must be integer'
+              end
+            end
+            @denominator = denominator
+          end
+
+          def type=(type)
+            if ProportionKind.valid_proportion_kind?(type)
+              @type = type
+            else
+              raise ArgumentError, 'type invalid'
+            end
+          end
+
+          def magnitude
+            return numerator.to_f/denominator.to_f
+          end
+
+          def precision=(precision)
+            unless precision.nil?
+              if (self.is_integral? && precision !=0)
+                raise ArgumentError, 'precision invalid'
+              end
+            end
+            @precision = precision
+          end
+
+          def is_integral?
+            return denominator.integer? && numerator.integer?
+          end
+
+          def is_strictly_comparable_to?(other)
+            unless super(other)
+              return false
+            end
+            if other.type == @type
+              return true
+            else
+              return false
+            end
+          end
+        end # end of DvProportion
+      end # of Quantity
+    end # of Data_Types
+  end # of RM
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/quantity/date_time.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/quantity/date_time.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/quantity/date_time.rb	(revision 367)
@@ -0,0 +1,230 @@
+# This module is implementation of the UML:
+# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109696321450_28117_5362Report.html
+# Ticket refs #49
+#require 'assumed_library_types'
+require 'date'
+include OpenEHR::RM::DataTypes::Quantity
+include OpenEHR::AssumedLibraryTypes
+
+module OpenEHR
+  module RM
+    module DataTypes
+      module Quantity
+        module DateTime
+          class DvTemporal < DvAbsoluteQuantity
+            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)
+              if value.nil? or value.empty?
+                raise ArgumentError, 'invalid value'
+              end
+              @value = value
+            end
+
+            undef magnitude=
+          end
+
+          class DvDate < DvTemporal
+            include ISO8601DateModule
+
+            DAYS_IN_MONTH = [0,31,28,31,30,31,30,31,31,30,31,30,31]
+
+            def value=(value)
+              super(value)
+              iso8601_date = ISO8601Date.new(value)
+              @year = iso8601_date.year
+              @month = iso8601_date.month
+              @day = iso8601_date.day
+            end
+
+            def magnitude
+              return Date.new(@year, @month, @day)-Date.new(0000,1,1)
+            end
+
+            def diff(other)
+              if self.magnitude > other.magnitude
+                past, future = other, self
+              else
+                past, future = self, other
+              end
+              year, month, day = 0, 0, 0
+              if (future.day >= past.day)
+                day = future.day - past.day
+              else
+                month = -1
+                previous_month = future.month - 1
+                if previous_month == 0
+                  previous_month = 12
+                end
+                day = DAYS_IN_MONTH[previous_month] + future.day - past.day
+                if leapyear?(future.year) && (previous_month == 2)
+                  day += 1
+                end
+              end
+              week = day / 7
+              if (future.month >= past.month)
+                month += future.month - past.month
+              else
+                year -= 1
+                month += future.month + 12 - past.month
+              end
+              if month < 0
+                year -= 1
+                month += 12
+              end
+              year += future.year - past.year
+              return DvDuration.new(:value =>
+                   'P' + year.to_s + 'Y' + month.to_s + 'M' + 
+                         week.to_s + 'W' + day.to_s + 'D')
+            end
+          end
+          
+          class DvTime < DvTemporal
+            include ISO8601TimeModule
+
+            def value=(value)
+              super(value)
+              iso8601_time = ISO8601Time.new(value)
+              @hour = iso8601_time.hour
+              @minute = iso8601_time.minute
+              @second = iso8601_time.second
+              @fractional_second = iso8601_time.fractional_second
+            end
+
+            def magnitude
+              if @fractional_second.nil?
+                return @hour * 60 * 60 + @minute * 60 + @second
+              else
+                return @hour * 60 * 60 + @minute * 60 + @second + @fractional_second
+              end
+            end
+
+            def diff(other)
+              diff = (other.magnitude - self.magnitude).abs
+              hour = (diff / 60 / 60).to_i
+              minute = ((diff - hour*60*60)/60).to_i
+              second = (diff - hour * 60 *60 - minute * 60).to_i
+              fractional_second = ((diff - diff.to_i)*1000000.0).to_i/1000000.0
+              str = 'P0Y0M0W0DT' + hour.to_s + 'H' +
+                minute.to_s + 'M' + second.to_s
+              if @fractional_second.nil?
+                str += 'S'
+              else
+                str += fractional_second.to_s[1..-1] + 'S'
+              end
+              return DvDuration.new(:value => str)
+            end
+          end
+
+          class DvDateTime < DvTemporal
+            include OpenEHR::AssumedLibraryTypes::ISO8601DateTimeModule
+
+            def value=(value)              
+              super(value)
+              iso8601date_time = AssumedLibraryTypes::ISO8601DateTime.new(value)
+              self.year = iso8601date_time.year
+              self.month = iso8601date_time.month
+              self.day = iso8601date_time.day
+              self.minute = iso8601date_time.minute
+              self.second = iso8601date_time.second
+              self.hour = iso8601date_time.hour
+              self.fractional_second = iso8601date_time.fractional_second
+              self.timezone = iso8601date_time.timezone
+            end
+
+            def magnitude
+              seconds = (((@year * 365.24 +
+                           @month * 30.42 +
+                           @day) * 24 + @hour) * 60 +
+                         @minute) * 60 + @second
+              if @fractional_second.nil?
+                return seconds
+              else
+                return seconds + @fractional_second
+              end
+            end
+
+            def diff(other)
+              if self.magnitude >= other.magnitude
+                past, future = other, self
+              else
+                past, future = self, other
+              end
+              past_date, past_time = split_date_time(past)
+              future_date, future_time = split_date_time(future)
+              time_diff = future_time.magnitude - past_time.magnitude
+              if future_time.magnitude < past_time.magnitude
+                future_date.day = future_date.day - 1
+                time_diff += 24 * 60 * 60
+              end
+              date_duration = past_date.diff(future_date)
+              hour = (time_diff / 60 / 60).to_i
+              minute = ((time_diff - hour*60*60)/60).to_i
+              second = (time_diff - hour * 60 *60 - minute * 60).to_i
+              str = date_duration.value + 'T' + hour.to_s + 'H' +
+                minute.to_s + 'M' + second.to_s
+              if @fractional_second.nil?
+                return DvDuration.new(:value => str +'S')
+              else
+                fractional_second =
+                  ((time_diff - time_diff.to_i)*1000000.0).to_i/1000000.0
+                return DvDuration.new(:value => str +
+                                      fractional_second.to_s[1..-1] + 'S')
+              end
+            end
+
+            private
+
+            def split_date_time(date_time)
+              /^(.*)T(.*)$/ =~ date_time.as_string
+              return DvDate.new(:value => $1), DvTime.new(:value => $2)
+            end
+          end
+
+          class DvDuration < DvAmount
+            include AssumedLibraryTypes::ISO8601DurationModule
+            attr_reader :value
+            
+            def initialize(args = { })
+              self.value = args[:value]
+              self.magnitude_status = args[:magnitude_status]
+              self.normal_range = args[:normal_range]
+              self.normal_status = args[:normal_status]
+              self.other_reference_ranges = args[:other_reference_ranges]
+            end
+
+            def value=(value)
+              raise ArgumentError, 'value must be not nil' if value.nil?
+              @value = value
+              iso8601_duration = AssumedLibraryTypes::ISO8601Duration.new(value)
+              self.years = iso8601_duration.years
+              self.months = iso8601_duration.months
+              self.weeks = iso8601_duration.weeks
+              self.days = iso8601_duration.days
+              self.hours = iso8601_duration.hours
+              self.minutes = iso8601_duration.minutes
+              self.seconds = iso8601_duration.seconds
+              self.fractional_second = iso8601_duration.fractional_second
+            end
+
+            def magnitude
+              return ((((@year + @month/MONTH_IN_YEAR)*NOMINAL_DAYS_IN_MONTH) +
+                @week * DAYS_IN_WEEK + @days) * HOURS_IN_DAY * MINUTES_IN_HOUR*
+                SECONDS_IN_MINUTE) + @second + @fractional_second
+            end
+            
+            undef magnitude=
+
+          end
+        end # of DateTime
+      end # of Quantity
+    end # of Data_Types
+  end # of RM
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/text.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/text.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/text.rb	(revision 367)
@@ -0,0 +1,168 @@
+# This module implemented from this UML
+# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109067605961_209522_3179Report.html
+# Ticket refs #48
+include OpenEHR::RM::DataTypes::Basic
+
+module OpenEHR
+  module RM
+    module DataTypes
+      module Text
+        class TermMapping
+          attr_reader :match, :purpose, :target
+
+          def initialize(args ={})
+            self.match = args[:match]
+            self.purpose = args[:purpose]
+            self.target = args[:target]
+          end
+
+          def match=(match)
+            unless TermMapping.is_valid_mach_code? match
+              raise ArgumentError, 'invalid match character'
+            end
+            @match = match
+          end
+
+          def purpose=(purpose)
+#            if !purpose.nil? and !purpose.instance_of?(DvCodedText)
+#              raise ArgumentError, "purpose is not valid"
+#            end
+            # should be settled after terminology service implemented
+            @purpose = purpose
+          end
+
+          def target=(target)
+            raise ArgumentError, "target must not be nil" if target.nil?
+            @target = target
+          end
+
+          def broader?
+            match == '>'
+          end
+
+          def equivalent?
+            match == '='
+          end
+
+          def narrower?
+            match == '<'
+          end
+
+          def unknown?
+            match == '?'
+          end
+
+          def TermMapping.is_valid_mach_code?(c)
+            c == '>' or c == '=' or c == '<' or c == '?'
+          end
+        end
+
+        class CodePhrase
+          attr_reader :terminology_id, :code_string
+
+          def initialize(args = {})
+            self.code_string = args[:code_string]
+            self.terminology_id = args[:terminology_id]
+          end
+
+          def terminology_id=(terminology_id)
+            if terminology_id.nil?
+              raise ArgumentError, "terminology_id should not be nil"
+            end
+            @terminology_id = terminology_id
+          end
+
+          def code_string=(code_string)
+            if code_string.nil? or code_string.empty?
+              raise ArgumentError, "code_string should not be empty"
+            end
+            @code_string = code_string
+          end 
+        end # of CodePhrase
+
+        class DvText < OpenEHR::RM::DataTypes::Basic::DataValue
+          attr_reader :formatting, :hyperlink, :mappings,
+                      :language, :encoding
+
+          def initialize(args = {})
+            super(args)
+            self.formatting = args[:formatting]
+            self.encoding = args[:encoding]
+            self.mappings = args[:mappings]
+            self.language = args[:language]
+          end
+
+          def value=(value)
+            if value.nil? or value.empty? or 
+                value.include? CR or value.include? LF
+              raise ArgumentError, "value is not valid"
+              # CR and LF are defined in Basic_Definition inherited DataValue.
+            end
+            @value = value
+          end
+
+          def formatting=(formatting)
+            if !formatting.nil? and formatting.empty?
+              raise ArgumentError, "formatting is not valid"
+            end
+            @formatting = formatting
+          end
+
+          def encoding=(encoding)
+            if !encoding.nil? and encoding.code_string.empty?
+              raise ArgumentError, "encoding is not valid"
+            end
+            @encoding = encoding
+          end
+          def mappings=(mappings)
+            if !mappings.nil? and !mappings.instance_of? Set
+              raise ArgumentError, "mapping(s) is(are) not valid"
+            elsif !mappings.nil? and mappings.instance_of? Set and
+                mappings.empty?
+              raise ArgumentError, "mapping(s) is(are) not valid"
+            end
+            @mappings = mappings
+          end
+          def language=(language)
+            if !@language.nil? and language.empty?
+              raise ArgumentError, "langage is not valid"
+            end
+            @language = language
+          end
+        end
+
+        class DvCodedText < DvText
+          attr_reader :defining_code
+
+          def initialize(args = {})
+            super(args)
+            self.defining_code = args[:defining_code]
+          end
+
+          def defining_code=(defining_code)
+            if defining_code.nil?
+              raise ArgumentError, 'defiining code is mandatory'
+            end
+            @defining_code = defining_code
+          end
+        end
+
+        class DvParagraph < OpenEHR::RM::DataTypes::Basic::DataValue
+          attr_reader :items
+
+          def initialize(args ={})
+            self.items = args[:items]
+          end
+
+          def items=(items)
+            if items.nil? or items.empty?
+              raise ArgumentError, "Items are not valid"
+            end
+            @items = items
+          end
+        end
+
+      end # of Text
+    end # of DataTypes
+  end # of RM
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/time_specification.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/time_specification.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/time_specification.rb	(revision 367)
@@ -0,0 +1,75 @@
+# This module is related to the ticket #47
+
+module OpenEHR
+  module RM
+    module DataTypes
+      module TimeSpecification
+        class DvTimeSpecification < OpenEHR::RM::DataTypes::Basic::DataValue
+          attr_reader :value
+
+          def initialize(value)
+            self.value=(value)
+          end
+
+          def value=(value)
+            raise ArgumentError, 'value must be not nil' if value.nil?
+            @value = value
+          end
+          
+          def calender_alignment
+            raise NotImlementedError, "calender_alignment must be implemented"
+          end
+
+          def event_alignment
+            raise NotImlementedError, "event_alignment must be implemented"
+          end
+
+          def institution_specified
+            raise NotImlementedError, "institution_specified must be implemented"
+          end
+        end
+
+# I have not implemented two classes bellow,
+# because I could not obtain HL7 specification related them.
+
+
+        class DvGeneralTimeSpecification < DvTimeSpecification
+          attr_reader :value
+          def initialize(value)
+            super(value)
+          end
+          def value=(value)
+            raise ArgumentError, "value is not valied" unless value.formalism.is_equal?('HL7:GTS')
+            @value = value
+          end
+          private
+          def value_valid(value)
+          end
+        end
+
+        class DvPeriodicTimeSpecification < DvTimeSpecification
+          attr_reader :value, :calender_alignment, :event_alingment, :period
+          def initialize(value)
+            value_valid(value)
+            super(value)
+          end
+          def value=(value)
+            unless value.formalism.is_equal('HL7:PIVL') or value.formalism.is_equal('HL7:EIVL')
+              raise ArgumentError, "value is not valid"
+            end
+            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
+        end
+      end
+    end # of Data_Type
+  end # of RM
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/uri.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/uri.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/data_types/uri.rb	(revision 367)
@@ -0,0 +1,83 @@
+# This module is implemented from this UML:
+#http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109701308832_384250_6986Report.html
+# Ticket refs #46
+
+require 'uri'
+
+module URI
+  class EHR < ::URI::Generic
+    COMPONENT = [
+      :scheme, :path, :fragment, :query
+    ].freeze
+
+    def self.build(args)
+      tmp = Util::make_components_hash(self, args)
+      super(tmp)
+    end
+
+    def initialize(*arg)
+      super(*arg)
+    end
+
+    def self.use_registry
+      true
+    end
+  end
+  @@schemes['EHR'] = EHR
+end
+
+module OpenEHR
+  module RM
+    module DataTypes
+      module Uri
+        class DvUri < OpenEHR::RM::DataTypes::Basic::DataValue
+          def initialize(args = {})
+            self.value = args[:value]
+          end
+
+          def value
+            @value.to_s
+          end
+
+          def fragment_id
+            @value.fragment
+          end
+
+          def path
+            @value.path
+          end
+
+          def query
+            @value.query
+          end
+
+          def scheme
+            @value.scheme
+          end
+
+          def value=(value)
+            raise ArgumentError, "value is empty" if value.nil?
+            parse(value)
+          end
+
+          private
+
+          def parse(value)
+            @value = ::URI.parse(value)
+          end
+        end
+
+        class DvEhrUri < DvUri
+          def initialize(value)
+            super(value)
+          end
+
+          def value=(value)
+            raise ArgumentError, "scheme must be ehr" if !(value =~ /^ehr/i)
+            @value = parse(value)
+          end
+        end # of DV_EHR_URI
+      end # of URI
+    end # of DataTypes
+  end # of RM
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/demographic.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/demographic.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/demographic.rb	(revision 367)
@@ -0,0 +1,269 @@
+# This module is based on the UML,
+# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_5_76d0249_1118674798473_6021_0Report.html
+# Ticket refs #45
+include OpenEHR::RM::Common::Archetyped
+
+module OpenEHR
+  module RM
+    module Demographic
+      class Party < Locatable
+        attr_reader :uid, :identities, :contacts, :relationships,
+                    :reverse_relationships
+        attr_accessor :details
+        alias :type :name
+
+        def initialize(args = { })
+          super(args)
+          self.uid = args[:uid]
+          self.identities = args[:identities]
+          self.contacts = args[:contacts]
+          self.relationships = args[:relationships]
+          self.reverse_relationships =
+            args[:reverse_relationships]
+          self.details = args[:details]
+        end
+
+        def uid=(uid)
+          raise ArgumentError, 'uid is mandatory' if uid.nil?
+          @uid = uid
+        end
+
+        def identities=(identities)
+          if identities.nil? || identities.empty?
+            raise ArgumentError, 'identities are mandatory'
+          end
+          @identities = identities
+        end
+
+        def contacts=(contacts)
+          if !contacts.nil? && contacts.empty?
+            raise ArgumentError, 'contacts should not be empty'
+          end
+          @contacts = contacts
+        end
+
+        def parent=(parent)
+          @parent = nil
+        end
+
+        def relationships=(relationships)
+          unless relationships.nil?
+            if relationships.empty?
+              raise ArgumentError, 'relationships should not be empty?'
+            else
+              relationships.each do |rel|
+                if rel.source.id.value != @uid.value
+                  raise ArgumentError, 'invalid source of relationships'
+                end
+              end
+            end
+          end
+          @relationships = relationships
+        end
+
+        def reverse_relationships=(reverse_relationships)
+          if !reverse_relationships.nil? && reverse_relationships.empty?
+            raise ArgumentError, 'reverse_relationships should not be empty'
+          end
+          @reverse_relationships = reverse_relationships
+        end
+      end
+
+      class PartyIdentity < Locatable
+        attr_reader :details
+
+        def initialize(args = { })
+          super(args)
+          self.details = args[:details]
+        end
+
+        def details=(details)
+          if details.nil?
+            raise ArgumentError, 'details are mandatory'
+          end
+          @details = details
+        end
+
+        def purpose
+          return @name
+        end
+      end
+
+      class Contact < Locatable
+        attr_accessor :time_validity
+        attr_reader :addresses
+
+        def initialize(args = { })
+          super(args)
+          self.addresses = args[:addresses]
+          self.time_validity = args[:time_validity]
+        end
+
+        def purpose
+          return @name
+        end
+
+        def addresses=(addresses)
+          if addresses.nil? || addresses.empty?
+            raise ArgumentError, 'address is mandatory'
+          end
+          @addresses = addresses
+        end
+      end
+
+      class Address < Locatable
+        attr_reader :details
+
+        def initialize(args = { })
+          super(args)
+          self.details = args[:details]
+        end
+
+        def details=(details)
+          if details.nil?
+            raise ArgumentError, 'details are mandatory'
+          end
+          @details = details
+        end
+
+        def type
+          return @name
+        end
+      end
+
+      class Actor < Party
+        LEAGAL_IDENTITY = 'legal identity'
+        attr_reader :languages, :roles
+
+        def initialize(args = { })
+          super(args)
+          self.roles = args[:roles]
+          self.languages = args[:languages]
+        end
+
+        def roles=(roles)
+          if !roles.nil? && roles.empty?
+            raise ArgumentError, 'roles should not be empty'
+          end
+          @roles = roles
+        end
+
+        def has_legal_identity?
+          @identities.each do |identity|
+            if identity.purpose.value == LEAGAL_IDENTITY
+              return true
+            end
+          end
+          return false
+        end
+
+        def languages=(languages)
+          if !languages.nil? && languages.empty?
+            raise ArgumentError, 'languages should not be empty.'
+          end
+          @languages = languages
+        end
+      end
+
+      class Person < Actor
+
+      end
+
+      class Organisation < Actor
+
+      end
+
+      class Group < Actor
+
+      end
+
+      class Agent < Actor
+
+      end
+
+      class Role < Party
+        attr_reader :performer, :capabilities
+        attr_accessor :time_validity
+
+        def initialize(args = { })
+          super(args)
+          self.performer = args[:performer]
+          self.capabilities = args[:capabilities]
+          self.time_validity = args[:time_validity]
+        end
+
+        def performer=(performer)
+          if performer.nil?
+            raise ArgumentError, 'performer is mandatory'
+          end
+          @performer = performer
+        end
+
+        def capabilities=(capabilities)
+          if !capabilities.nil? && capabilities.empty?
+            raise ArgumentError, 'capability should not be empty'
+          end
+          @capabilities = capabilities
+        end
+      end
+
+      class Capability < Locatable
+        attr_reader :credentials
+        attr_accessor :time_validity
+
+        def initialize(args = { })
+          super(args)
+          self.credentials = args[:credentials]
+          self.time_validity = args[:time_validity]
+        end
+
+        def credentials=(credentials)
+          if credentials.nil?
+            raise ArgumentError, 'credentials are mandatory'
+          end
+          @credentials = credentials
+        end
+      end
+
+      class PartyRelationship < Locatable
+        attr_accessor :details, :time_validity
+        attr_reader :source, :target
+        alias :type :name
+
+        def initialize(args = { })
+          super(args)
+          self.uid = args[:uid]
+          self.details = args[:details]
+          self.time_validity = args[:time_validity]
+          self.source = args[:source]
+          self.target = args[:target]
+        end
+
+        def uid=(uid)
+          if uid.nil?
+            raise ArgumentError, 'uid is mandatory'
+          end
+          @uid = uid
+        end
+
+        def source=(source)
+          if source.nil? or source.id.value != @uid.value
+            raise ArgumentError, 'source is invalid'
+          end
+          @source = source
+        end
+
+        def target=(target)
+          if target.nil?
+            raise ArgumentError, 'taraget is invalid'
+          end
+          @target = target
+        end
+      end
+
+      class VersionedParty < Locatable
+
+      end
+    end # of Demographic
+  end # of RM
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/ehr.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/ehr.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/ehr.rb	(revision 367)
@@ -0,0 +1,162 @@
+# rm::ehr
+# ehr module
+# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109004889781_854011_47Report.html
+# refs #44
+include OpenEHR::RM::Common::ChangeControl
+include OpenEHR::RM::Common::Archetyped
+include OpenEHR::RM::Security
+
+module OpenEHR
+  module RM
+    module EHR
+      class EHR
+        attr_reader :system_id, :ehr_id, :time_created, :contributions,
+                    :ehr_access, :ehr_status, :compositions, :directory
+
+        def initialize(args = { })
+          self.system_id = args[:system_id]
+          self.ehr_id = args[:ehr_id]
+          self.time_created = args[:time_created]
+          self.contributions = args[:contributions]
+          self.ehr_access = args[:ehr_access]
+          self.ehr_status = args[:ehr_status]
+          self.compositions = args[:compositions]
+          self.directory = args[:directory]
+        end
+
+        def system_id=(system_id)
+          if system_id.nil?
+            raise ArgumentError, 'system_id is mandatory'
+          end
+          @system_id = system_id
+        end
+
+        def ehr_id=(ehr_id)
+          if ehr_id.nil?
+            raise ArgumentError, 'ehr_id is mandatory'
+          end
+          @ehr_id = ehr_id
+        end
+
+        def time_created=(time_created)
+          if time_created.nil?
+            raise ArgumentError, 'time_created is mandatory'
+          end
+          @time_created = time_created
+        end
+
+        def contributions=(contributions)
+          unless contributions.nil?
+            contributions.each do |contrib|
+              unless contrib.type == 'CONTRIBUTION'
+                raise ArgumentError, 'contribution type should be CONTRIBUTION'
+              end
+            end
+            @contributions = contributions
+          else
+            raise ArgumentError, 'contributions are mandatory'
+          end
+        end
+
+        def ehr_access=(ehr_access)
+          if ehr_access.nil? || ehr_access.type != 'VERSIONED_EHR_ACCESS'
+            raise ArgumentError, 'ehr_access is invalid'
+          end
+          @ehr_access = ehr_access
+        end
+
+        def ehr_status=(ehr_status)
+          if ehr_status.nil? || ehr_status.type != 'VERSIONED_EHR_STATUS'
+            raise ArgumentError, 'ehr_status is invalid'
+          end
+          @ehr_status = ehr_status
+        end
+
+        def compositions=(compositions)
+          unless compositions.nil?
+            compositions.each do |compo|
+              unless compo.type == 'VERSIONED_COMPOSITION'
+                raise ArgumentError, 'composition type should be VERSIONED_COMPOSITION'
+              end
+            end
+            @compositions = compositions
+          else
+            raise ArgumentError, 'compositions are mandatory'
+          end
+        end
+
+        def directory=(directory)
+          if !directory.nil? && directory.type != 'VERSIONED_FOLDER'
+            raise ArgumentError, 'invalid directory'
+          end
+          @directory = directory
+        end
+      end
+
+      class VersionedEHRAccesss < VersionedObject
+
+      end
+
+      class EHRAccess < Locatable
+        attr_accessor :settings
+        attr_reader :scheme
+
+        def initialize(args = { })
+          super(args)
+          self.settings = args[:settings]
+          self.scheme = args[:scheme]
+        end
+
+        def scheme=(scheme)
+          if scheme.nil? || scheme.empty?
+            raise ArgumentError, 'scheme is mandatory'
+          end
+          @scheme = scheme
+        end
+      end
+
+      class VersionedEHRStatus < VersionedObject
+
+      end
+
+      class EHRStatus < Locatable
+        attr_reader :subject
+        attr_accessor :is_modifiable, :is_queryable, :other_details
+
+        def initialize(args = { })
+          super(args)
+          self.subject = args[:subject]
+          self.is_queryable = args[:is_queryable]
+          self.is_modifiable = args[:is_modifiable]
+          self.other_details = args[:other_details]
+        end
+
+        def subject=(subject)
+          raise ArgumentError, 'subject is mandatory' if subject.nil?
+          @subject = subject
+        end
+
+        def is_queryable?
+          return @is_queryable
+        end
+
+        def is_modifiable?
+          return @is_modifiable
+        end
+
+        def parent=(parent)
+          unless parent.nil?
+            raise ArgumentError, 'parent should be nil'
+          end
+          @parent = parent
+        end
+      end
+
+      class VersionedComposition < VersionedObject
+        def is_persistent?
+          return @all_versions.first.data.is_persistent?
+        end
+      end
+    end # of EHR
+  end # of RM
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/integration.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/integration.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/integration.rb	(revision 367)
@@ -0,0 +1,27 @@
+# rm::integration
+# integration module
+# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_5_1_76d0249_1140530578205_529440_4046Report.html
+# refs #42
+include OpenEHR::RM::Composition::Content
+
+module OpenEHR
+  module RM
+    module Integration
+      class GenericEntry < ContentItem
+        attr_reader :data
+
+        def initialize(args = { })
+          super(args)
+          self.data = args[:data]
+        end
+
+        def data=(data)
+          if data.nil?
+            raise ArgumentError, 'data are mandatory'
+          end
+          @data = data
+        end
+      end
+    end # of Integration
+  end # of RM
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/security.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/security.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/security.rb	(revision 367)
@@ -0,0 +1,12 @@
+# This module is based on the UML,
+# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_5_1_76d0249_1155650882301_836618_5314Report.html
+# Ticket refs #41
+module OpenEHR
+  module RM
+    module Security
+      class AccessControlSettings
+        
+      end
+    end
+  end
+end
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/support/assumed_types.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/support/assumed_types.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/support/assumed_types.rb	(revision 367)
@@ -0,0 +1,81 @@
+# Because his module utilise common methods in both rm
+# and am, I will integrated to /lib/models/assumed_types.rb.
+# By Shinji KOBAYASHI, 2008-07-20
+module OpenEHR
+  module RM
+    module Support
+      module AssumedTypes
+        class Interval
+          attr_accessor :lower, :upper
+#          attr_accessor :lower_included, :lower_unbounded
+#          attr_accessor :upper_included, :upper_unbounded
+          def initialize(lower, upper,
+                         lower_included = nil, upper_included = nil)
+            if ((lower !=nil) && (upper !=nil)) && lower>upper
+              raise ArgumentError, "upper < lower"
+            end
+            @lower = lower
+            @upper = upper
+          end
+        end
+
+        class List
+          attr_reader :content
+
+          def initialize(arg)
+            @content = arg
+          end
+
+          def first
+            @content.first
+          end
+
+          def last
+            @content.last
+          end
+        end
+
+        class TIME_DEFINITIONS
+        end
+
+
+        class ISO8601_DATE < TIME_DEFINITIONS
+        end
+
+        class ISO8601_TIME < TIME_DEFINITIONS
+        end
+
+        class ISO8601_DURATION < TIME_DEFINITIONS
+        end
+
+        class ISO8601_DATE_TIME < TIME_DEFINITIONS
+        end
+
+        class ISO8601_TIMEZONE < TIME_DEFINITIONS
+        end
+
+        class String
+          attr_reader :content
+          def initialize(arg)
+            @content = arg
+          end
+
+          def as_integer
+            is_integer if is_integer
+          end
+
+          def is_empty
+          end
+
+          def is_integer
+            begin
+              Integer(@content)
+            rescue
+              false
+            end
+          end
+        end
+      end
+    end
+  end
+end
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/support/definition.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/support/definition.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/support/definition.rb	(revision 367)
@@ -0,0 +1,15 @@
+module OpenEHR
+  module RM
+    module Support
+      module Definition
+        module BasicDefinition
+          CR = "\015"
+          LF = "\012"
+        end
+        class OpenEHRDefinitions
+          include BasicDefinition
+        end
+      end
+    end
+  end
+end
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/support/identification.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/support/identification.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/support/identification.rb	(revision 367)
@@ -0,0 +1,407 @@
+# This module is an implementation of this UML:
+# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109331021343_528780_2066Report.html
+# Ticket refs #39
+module OpenEHR
+  module RM
+    module Support
+      module Identification
+        class ObjectID
+          attr_reader :value
+
+          def initialize(args = {})
+            self.value=args[:value]
+          end
+
+          def value=(value)
+            raise ArgumentError, "empty value" if value.nil? or value.empty?
+            @value = value            
+          end
+
+          def ==(object_id)
+            self.value == object_id.value
+          end
+        end # of ObjectID
+
+        class ObjectRef
+          attr_reader :namespace, :type, :id
+
+          def initialize(args = {})
+            self.namespace = args[:namespace]
+            self.type = args[:type]
+            self.id = args[:id]
+          end
+
+          def namespace=(namespace)
+            if namespace.nil? or namespace.empty? or 
+                !(/^[a-zA-Z][a-zA-Z0-9_\-\:\/\&\+\?]*$/ =~ namespace)
+              raise ArgumentError
+            end
+            @namespace = namespace
+          end
+
+          def type=(type)
+            raise ArgumentError if type.nil? or type.empty?
+            @type = type
+          end
+
+          def id=(id)
+            raise ArgumentError if id.nil?
+            @id = id
+          end
+        end
+
+        class ArchetypeID < ObjectID
+          attr_reader :rm_originator, :rm_name, :rm_entity,
+                      :concept_name, :specialisation, :version_id
+          
+          def initialize(args = {})
+            if args[:value].nil?
+              self.rm_originator = args[:rm_originator]
+              self.rm_name = args[:rm_name]
+              self.rm_entity = args[:rm_entity]
+              self.concept_name = args[:concept_name]
+              self.version_id = args[:version_id]
+              self.specialisation = args[:specialisation]
+            else
+              super(args)
+            end
+          end
+
+          def value=(value)
+            if /([a-zA-Z]\w+)-([a-zA-Z]\w+)-([a-zA-Z]\w+)\.([a-zA-Z]\w+)(-([a-zA-Z]\w+))?\.(v[1-9]\d*)/ =~ value
+              self.rm_originator = $1
+              self.rm_name = $2
+              self.rm_entity = $3
+              self.concept_name = $4
+              self.specialisation = $6
+              self.version_id = $7
+            else
+              raise ArgumentError, 'invalid archetype id form'
+            end
+          end
+
+          def qualified_rm_entity
+            return @rm_originator + '-' + @rm_name + '-' + @rm_entity
+          end
+
+          def domain_concept
+            if @specialisation.nil?
+              return @concept_name
+            else
+              return @concept_name + '-' + @specialisation
+            end
+          end
+
+          def value
+            return self.qualified_rm_entity + '.' +
+              self.domain_concept + '.' + @version_id
+          end
+
+          def concept_name=(concept_name)
+            if concept_name.nil? or concept_name.empty?
+              raise ArgumentError, 'concept_name is mandatory'
+            end
+            @concept_name = concept_name
+          end
+
+          def domain_concept=(domain_concept)
+            if domain_concept.nil? or domain_concept.empty?
+              raise ArgumentError, "domain concept not valid"
+            end
+            if /([a-zA-Z]\w+)(-([a-zA-Z]\w))?/ =~ domain_concept
+              self.concept_name = $1
+              self.specialisation = $3
+            else
+              raise ArgumentError, 'invalid domain concept form'
+            end
+          end
+
+          def rm_name=(rm_name)
+            raise ArgumentError, "rm_name not valid" if rm_name.nil? or rm_name.empty?
+            @rm_name = rm_name
+          end
+
+          def rm_entity=(rm_entity)
+            if rm_entity.nil? or rm_entity.empty?
+              raise ArgumentError, "rm_entity is mandatory"
+            end
+            @rm_entity = rm_entity
+          end
+
+          def rm_originator=(rm_originator)
+            if rm_originator.nil? or rm_originator.empty?
+              raise ArgumentError, "rm_originator not valid"
+            end
+            @rm_originator = rm_originator
+          end
+
+          def specialisation=(specialisation)
+            if !specialisation.nil? and specialisation.empty?
+              raise ArgumentError, "rm_specialisation not valid" 
+            end
+            @specialisation = specialisation
+          end
+
+          def version_id=(version_id)
+            raise ArgumentError, "version_id not valid" if version_id.nil? or version_id.empty?
+            @version_id = version_id
+          end
+        end
+
+        class TerminologyID < ObjectID
+          attr_reader :name, :version_id
+
+          def initialize(args = {})
+            if args[:value].nil?
+              self.name = args[:name]
+              self.version_id = args[:version_id]
+            else
+              super(args)
+            end
+          end
+
+          def value
+            if @version_id.empty?
+              @name
+            else
+              @name + '(' + @version_id + ')'
+            end 
+          end
+
+
+          def value=(value)
+            raise ArgumentError, "value not valid" if value.nil? or value.empty?
+            if /(.*)\((.*)\)/ =~ value
+              self.name = $1
+              self.version_id = $2
+            else
+              self.name = value
+              self.version_id = ''
+            end
+          end
+
+          def name=(name)
+            raise ArgumentError, "name not valid" if name.nil? or name.empty?
+            @name = name
+          end
+
+          def version_id=(version_id)
+            if version_id.nil?
+              @version_id = ''
+            else
+              @version_id = version_id
+            end
+          end
+        end # of Terminology_ID
+
+        class GenericID < ObjectID
+          attr_reader :scheme
+
+          def initialize(args)
+            super(args)
+            self.scheme = args[:scheme]
+          end
+
+          def scheme=(scheme)
+            if scheme.nil? or scheme.empty?
+              raise ArgumentError, "scheme not valid"
+            end
+            @scheme = scheme
+          end
+        end # of Generic_ID
+
+        class TemplateID < ObjectID
+
+        end
+
+        class UIDBasedID < ObjectID
+          attr_reader :root, :extension
+
+          def initialize(args = {})
+            super(args)
+          end
+
+          def value=(value)
+            super(value)
+            if /(\S+)::(\S+)/ =~ value
+              @root = UID.new(:value => $1)
+              @extension = $2
+            else
+              @root = UID.new(:value => value)
+              @extension = ''
+            end
+          end
+
+          def has_extension?
+            return !@extension.empty?
+          end
+        end
+
+        class ObjectVersionID < UIDBasedID
+          attr_reader :object_id, :creating_system_id, :version_tree_id
+
+          def initialize(args= {})
+            super(args)
+          end
+
+          def value=(value)
+            if /^(\S+)::(\S+)::((\d|\.)+)$/ =~ value
+              self.object_id = UID.new(:value => $1)
+              self.creating_system_id = UID.new(:value => $2)
+              self.version_tree_id = VersionTreeID.new(:value => $3)
+            else
+              raise ArgumentError, 'invalid format'
+            end
+          end
+
+          def value
+            return @object_id.value + '::' + 
+              @creating_system_id.value + '::' +
+              @version_tree_id.value
+          end
+
+          def object_id=(object_id)
+            raise ArgumentError, 'object_id is mandatory' if object_id.nil?
+            @object_id = object_id
+          end
+
+          def creating_system_id=(creating_system_id)
+            if creating_system_id.nil?
+              raise ArgumentError, 'creating_system_id is mandatory'
+            end
+            @creating_system_id = creating_system_id
+          end
+
+          def version_tree_id=(version_tree_id)
+            if version_tree_id.nil?
+              raise ArgumentError, 'version_tree_id is mandatory'
+            end
+            @version_tree_id = version_tree_id
+          end
+
+          def is_branch?
+            return @version_tree_id.is_branch?
+          end
+        end
+
+        class LocatableRef < ObjectRef
+          attr_reader :path
+
+          def initialize(args = {})
+            super(args)
+            self.path = args[:path]
+          end
+
+          def path=(path)
+            raise ArgumentError if path.nil? or path.empty?
+            @path = path
+          end
+
+          def as_uri
+            'ehr://' + @id.value + '/' + @path
+          end
+        end
+
+        class PartyRef < ObjectRef
+          def type=(type)
+            parties = %w[PERSON ORGANISATION GROUP AGENT ROLE PARTY ACTOR]
+            raise ArgumentError, 'type invalid' unless parties.include? type
+            @type = type
+          end
+        end
+
+        class AccessGroupRef < ObjectRef
+          def initialize(args = {})
+            super(args)
+            @type = 'ACCESS_GROUP'
+          end
+
+          def type=(type)
+          end
+        end
+
+        class HierObjectID < UIDBasedID
+
+        end
+
+        class VersionTreeID
+          attr_reader :trunk_version, :branch_number, :branch_version
+
+          def initialize(args = {})
+            self.value = args[:value]
+          end
+
+          def value=(value)
+            raise ArgumentError, 'value invalid' if value.nil? or value.empty?
+            (trunk_version, branch_number, branch_version) = value.split '.'
+            self.trunk_version = trunk_version
+            self.branch_number = branch_number
+            self.branch_version = branch_version
+          end
+
+          def value
+            @value = trunk_version
+            @value = @value + '.' + @branch_number unless @branch_number.nil?
+            @value = @value + '.' + @branch_version unless @branch_version.nil?
+            return @value
+          end
+
+          def trunk_version=(trunk_version)
+            if trunk_version.nil? || (trunk_version.to_i < 1)
+              raise ArgumentError, 'trunk_version invalid'
+            end
+            @trunk_version = trunk_version
+          end
+
+          def branch_number=(branch_number)
+            unless branch_number.nil? or branch_number.to_i >= 1
+              raise ArgumentError, 'branch number invalid'
+            end
+            @branch_number = branch_number
+          end
+
+          def branch_version=(branch_version)
+            if (!branch_version.nil? and !(branch_version.to_i >= 1)) or
+                (!branch_version.nil? and @branch_number.nil?)
+              raise ArgumentError, 'branch version invalid'
+            end
+            @branch_version = branch_version
+          end
+
+          def is_branch?
+            !@branch_version.nil? and !@branch_number.nil?
+          end
+
+          def is_first?
+            trunk_version == '1'
+          end
+        end
+
+        class UID
+          attr_reader :value
+
+          def initialize(args = {})
+            self.value = args[:value]
+          end
+
+          def value=(value)
+            raise ArgumentError if value.nil? or value.empty?
+            @value = value
+          end
+        end
+
+        class UUID < UID
+
+        end
+
+        class InternetID <UID
+          
+        end
+
+        class IsoOID <UID
+
+        end        
+      end # of Identification
+    end # of Support
+  end # of RM
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/support/measurement.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/support/measurement.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/support/measurement.rb	(revision 367)
@@ -0,0 +1,17 @@
+module OpenEHR
+  module RM
+    module Support
+      module Measurement
+        class MeasurementService
+        end
+        module ExternalEnvironmentAccess
+          def eea_terminology_svc
+          end
+          
+          def eea_measurement_svc
+          end
+        end
+      end # of Measurment
+    end # of Support
+  end # of RM
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/open_ehr/rm/support/terminology.rb
===================================================================
--- /ruby/tags/release-0.5.0/lib/open_ehr/rm/support/terminology.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/open_ehr/rm/support/terminology.rb	(revision 367)
@@ -0,0 +1,135 @@
+
+module OpenEHR
+  module RM
+    module Support
+      module Terminology
+        class CodeSetAccess
+          def all_codes
+            raise NotImplementedError, "all_codes must be implemented"
+          end
+
+          def has_code(a_code)
+            raise NotImplementedError, "has_code must be implemented"
+          end
+
+          def has_lang(a_lang)
+            raise NotImplementedError, "has_lang must be implemented"
+          end
+
+          def id
+            raise NotImplementedError, "id must be returned"
+          end
+        end
+
+        module OpenEHRCodeSetIdentifier
+          CODE_SET_ID_CHARACER_SETS = "character sets".freeze
+          CODE_SET_ID_COMPRESSION_ALGORITHMS = "compression algorithms".freeze
+          CODE_SET_ID_COUNTRIES = "countries".freeze
+          CODE_SET_ID_INTEGRITY_CHECK_ALGORITHMS = "integrity check algorithms".freeze
+          CODE_SET_ID_LANGUAGES = "languages".freeze
+          CODE_SET_ID_MEDIA_TYPES = "media types".freeze
+          def valid_code_set_id(an_id)
+            !@an_id.nil?
+          end
+        end
+
+        module OpenEHRTerminologyGroupIdentifiers
+          GROUP_ID_ATTESTATION_REASON = "attestation reason".freeze
+          GROUP_ID_AUDIT_CHANGE_TYPE = "audit change type".freeze
+          GROUP_ID_COMPOSITION_CATEGORY = "composition category".freeze
+          GROUP_ID_MATH_FUNCTION = "event math function".freeze
+          GROUP_ID_INSTRUCTION_STATES = "instruction states".freeze
+          GROUP_ID_INSTRUCTION_TRANSITIONS = "instruction transitions".freeze
+          GROUP_ID_NULL_FLAVOURS = "null flavours".freeze
+          GROUP_ID_PARTICIPATION_FUNCTION = "participation function".freeze
+          GROUP_ID_PARTICIPATION_MODE = "participation mode".freeze
+          GROUP_ID_PROPERTY = "property".freeze
+          GROUP_ID_SETTING = "setting".freeze.freeze
+          GROUP_ID_SUBJECT_RELATIONSHIP = "subject relationship".freeze
+          GROUP_ID_TERM_MAPPING_PURPOSE = "term mapping purpose".freeze
+          GROUP_ID_VERSION_LIFECYCLE_STATE = "version lifecycle state".freeze
+          TERMINOLOGY_ID = "openehr".freeze
+        end
+
+        class TerminologyAccess
+          attr_reader :id
+
+          def initialize(args = {})
+            self.id = args[:id]
+          end
+
+          def all_codes
+            raise NotImplementedError, "all_codes is not implemented"
+          end
+
+          def codes_for_group_id(group_id)
+            raise NotImplementedError, "codes_for_group_id is not implemented"
+          end
+
+          def codes_for_group_name(name, lang)
+            raise NotImplementedError, "codes_for_group_name is not implemented"
+          end
+
+          def has_code_for_group_id(group_id, a_code)
+            
+          end
+
+          def id=(id)
+            @terminology = Terminology.find_all_by_name(id)
+            @id = id
+          end
+
+          def rubric_for_code(code, lang)
+            return Terminology.find(:first, :conditions => {:code => code,
+                                      :lang => lang})
+          end
+
+          private
+          def id_exists
+            if id.nil?
+              raise ArgumentError, "id must not be nil"
+            elsif id.empty?
+              raise ArgumentError, "id must not be empty"
+            end
+          end
+        end
+
+        class TerminologyService
+          include OpenEHRCodeSetIdentifier, OpenEHRTerminologyGroupIdentifiers
+
+          def code_set(name)
+            raise NotImplementedError, "code_set is not implemented"
+          end
+
+          def code_set_for_id(id)
+            raise NotImplementedError, "code_set_for_id is not implemented"
+          end
+
+          def code_set_identifiers
+            raise NotImplementedError, "code_set_for_identifiers is not implemented"
+          end
+
+          def has_code_set(name)
+            raise NotImplementedError, "has_code_set is not implemented"
+          end
+
+          def has_terminology?(name)
+            raise NotImplementedError, "has_terminology is not implemented"
+          end
+
+          def openehr_code_sets
+            raise NotImplementedError, "openehr_code_set is not implemented"
+          end
+
+          def terminology(name)
+            return TerminologyAccess.new(:id => name)
+          end
+          
+          def terminology_identifiers
+            raise NotImplementedError, "terminology_identiferes is not implemented"
+          end
+        end 
+      end # of Terminology
+    end # of Support
+  end # of RM
+end # of OpenEHR
Index: /ruby/tags/release-0.5.0/lib/tasks/rspec.rake
===================================================================
--- /ruby/tags/release-0.5.0/lib/tasks/rspec.rake	(revision 367)
+++ /ruby/tags/release-0.5.0/lib/tasks/rspec.rake	(revision 367)
@@ -0,0 +1,182 @@
+gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9
+rspec_gem_dir = nil
+Dir["#{RAILS_ROOT}/vendor/gems/*"].each do |subdir|
+  rspec_gem_dir = subdir if subdir.gsub("#{RAILS_ROOT}/vendor/gems/","") =~ /^(\w+-)?rspec-(\d+)/ && File.exist?("#{subdir}/lib/spec/rake/spectask.rb")
+end
+rspec_plugin_dir = File.expand_path(File.dirname(__FILE__) + '/../../vendor/plugins/rspec')
+
+if rspec_gem_dir && (test ?d, rspec_plugin_dir)
+  raise "\n#{'*'*50}\nYou have rspec installed in both vendor/gems and vendor/plugins\nPlease pick one and dispose of the other.\n#{'*'*50}\n\n"
+end
+
+if rspec_gem_dir
+  $LOAD_PATH.unshift("#{rspec_gem_dir}/lib")
+elsif File.exist?(rspec_plugin_dir)
+  $LOAD_PATH.unshift("#{rspec_plugin_dir}/lib")
+end
+
+# Don't load rspec if running "rake gems:*"
+unless ARGV.any? {|a| a =~ /^gems/}
+
+begin
+  require 'spec/rake/spectask'
+rescue MissingSourceFile
+  module Spec
+    module Rake
+      class SpecTask
+        def initialize(name)
+          task name do
+            # if rspec-rails is a configured gem, this will output helpful material and exit ...
+            require File.expand_path(File.dirname(__FILE__) + "/../../config/environment")
+
+            # ... otherwise, do this:
+            raise <<-MSG
+
+#{"*" * 80}
+*  You are trying to run an rspec rake task defined in
+*  #{__FILE__},
+*  but rspec can not be found in vendor/gems, vendor/plugins or system gems.
+#{"*" * 80}
+MSG
+          end
+        end
+      end
+    end
+  end
+end
+
+Rake.application.instance_variable_get('@tasks').delete('default')
+
+spec_prereq = File.exist?(File.join(RAILS_ROOT, 'config', 'database.yml')) ? "db:test:prepare" : :noop
+task :noop do
+end
+
+task :default => :spec
+task :stats => "spec:statsetup"
+
+desc "Run all specs in spec directory (excluding plugin specs)"
+Spec::Rake::SpecTask.new(:spec => spec_prereq) do |t|
+  t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
+  t.spec_files = FileList['spec/**/*_spec.rb']
+end
+
+namespace :spec do
+  desc "Run all specs in spec directory with RCov (excluding plugin specs)"
+  Spec::Rake::SpecTask.new(:rcov) do |t|
+    t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
+    t.spec_files = FileList['spec/**/*_spec.rb']
+    t.rcov = true
+    t.rcov_opts = lambda do
+      IO.readlines("#{RAILS_ROOT}/spec/rcov.opts").map {|l| l.chomp.split " "}.flatten
+    end
+  end
+
+  desc "Print Specdoc for all specs (excluding plugin specs)"
+  Spec::Rake::SpecTask.new(:doc) do |t|
+    t.spec_opts = ["--format", "specdoc", "--dry-run"]
+    t.spec_files = FileList['spec/**/*_spec.rb']
+  end
+
+  desc "Print Specdoc for all plugin examples"
+  Spec::Rake::SpecTask.new(:plugin_doc) do |t|
+    t.spec_opts = ["--format", "specdoc", "--dry-run"]
+    t.spec_files = FileList['vendor/plugins/**/spec/**/*_spec.rb'].exclude('vendor/plugins/rspec/*')
+  end
+
+  [:models, :controllers, :views, :helpers, :lib, :integration].each do |sub|
+    desc "Run the code examples in spec/#{sub}"
+    Spec::Rake::SpecTask.new(sub => spec_prereq) do |t|
+      t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
+      t.spec_files = FileList["spec/#{sub}/**/*_spec.rb"]
+    end
+  end
+
+  desc "Run the code examples in vendor/plugins (except RSpec's own)"
+  Spec::Rake::SpecTask.new(:plugins => spec_prereq) do |t|
+    t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
+    t.spec_files = FileList['vendor/plugins/**/spec/**/*_spec.rb'].exclude('vendor/plugins/rspec/*').exclude("vendor/plugins/rspec-rails/*")
+  end
+
+  namespace :plugins do
+    desc "Runs the examples for rspec_on_rails"
+    Spec::Rake::SpecTask.new(:rspec_on_rails) do |t|
+      t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
+      t.spec_files = FileList['vendor/plugins/rspec-rails/spec/**/*_spec.rb']
+    end
+  end
+
+  # Setup specs for stats
+  task :statsetup do
+    require 'code_statistics'
+    ::STATS_DIRECTORIES << %w(Model\ specs spec/models) if File.exist?('spec/models')
+    ::STATS_DIRECTORIES << %w(View\ specs spec/views) if File.exist?('spec/views')
+    ::STATS_DIRECTORIES << %w(Controller\ specs spec/controllers) if File.exist?('spec/controllers')
+    ::STATS_DIRECTORIES << %w(Helper\ specs spec/helpers) if File.exist?('spec/helpers')
+    ::STATS_DIRECTORIES << %w(Library\ specs spec/lib) if File.exist?('spec/lib')
+    ::STATS_DIRECTORIES << %w(Routing\ specs spec/routing) if File.exist?('spec/routing')
+    ::STATS_DIRECTORIES << %w(Integration\ specs spec/integration) if File.exist?('spec/integration')
+    ::CodeStatistics::TEST_TYPES << "Model specs" if File.exist?('spec/models')
+    ::CodeStatistics::TEST_TYPES << "View specs" if File.exist?('spec/views')
+    ::CodeStatistics::TEST_TYPES << "Controller specs" if File.exist?('spec/controllers')
+    ::CodeStatistics::TEST_TYPES << "Helper specs" if File.exist?('spec/helpers')
+    ::CodeStatistics::TEST_TYPES << "Library specs" if File.exist?('spec/lib')
+    ::CodeStatistics::TEST_TYPES << "Routing specs" if File.exist?('spec/routing')
+    ::CodeStatistics::TEST_TYPES << "Integration specs" if File.exist?('spec/integration')
+  end
+
+  namespace :db do
+    namespace :fixtures do
+      desc "Load fixtures (from spec/fixtures) into the current environment's database.  Load specific fixtures using FIXTURES=x,y. Load from subdirectory in test/fixtures using FIXTURES_DIR=z."
+      task :load => :environment do
+        ActiveRecord::Base.establish_connection(Rails.env)
+        base_dir = File.join(Rails.root, 'spec', 'fixtures')
+        fixtures_dir = ENV['FIXTURES_DIR'] ? File.join(base_dir, ENV['FIXTURES_DIR']) : base_dir
+
+        require 'active_record/fixtures'
+        (ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/).map {|f| File.join(fixtures_dir, f) } : Dir.glob(File.join(fixtures_dir, '*.{yml,csv}'))).each do |fixture_file|
+          Fixtures.create_fixtures(File.dirname(fixture_file), File.basename(fixture_file, '.*'))
+        end
+      end
+    end
+  end
+
+  namespace :server do
+    daemonized_server_pid = File.expand_path("#{RAILS_ROOT}/tmp/pids/spec_server.pid")
+
+    desc "start spec_server."
+    task :start do
+      if File.exist?(daemonized_server_pid)
+        $stderr.puts "spec_server is already running."
+      else
+        $stderr.puts %Q{Starting up spec_server ...}
+        FileUtils.mkdir_p('tmp/pids') unless test ?d, 'tmp/pids'
+        system("ruby", "script/spec_server", "--daemon", "--pid", daemonized_server_pid)
+      end
+    end
+
+    desc "stop spec_server."
+    task :stop do
+      unless File.exist?(daemonized_server_pid)
+        $stderr.puts "No server running."
+      else
+        $stderr.puts "Shutting down spec_server ..."
+        system("kill", "-s", "TERM", File.read(daemonized_server_pid).strip) &&
+        File.delete(daemonized_server_pid)
+      end
+    end
+
+    desc "restart spec_server."
+    task :restart => [:stop, :start]
+
+    desc "check if spec server is running"
+    task :status do
+      if File.exist?(daemonized_server_pid)
+        $stderr.puts %Q{spec_server is running (PID: #{File.read(daemonized_server_pid).gsub("\n","")})}
+      else
+        $stderr.puts "No server running."
+      end
+    end
+  end
+end
+
+end
Index: /ruby/tags/release-0.5.0/public/404.html
===================================================================
--- /ruby/tags/release-0.5.0/public/404.html	(revision 367)
+++ /ruby/tags/release-0.5.0/public/404.html	(revision 367)
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+  <title>The page you were looking for doesn't exist (404)</title>
+	<style type="text/css">
+		body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
+		div.dialog {
+			width: 25em;
+			padding: 0 4em;
+			margin: 4em auto 0 auto;
+			border: 1px solid #ccc;
+			border-right-color: #999;
+			border-bottom-color: #999;
+		}
+		h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
+	</style>
+</head>
+
+<body>
+  <!-- This file lives in public/404.html -->
+  <div class="dialog">
+    <h1>The page you were looking for doesn't exist.</h1>
+    <p>You may have mistyped the address or the page may have moved.</p>
+  </div>
+</body>
+</html>
Index: /ruby/tags/release-0.5.0/public/422.html
===================================================================
--- /ruby/tags/release-0.5.0/public/422.html	(revision 367)
+++ /ruby/tags/release-0.5.0/public/422.html	(revision 367)
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+  <title>The change you wanted was rejected (422)</title>
+	<style type="text/css">
+		body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
+		div.dialog {
+			width: 25em;
+			padding: 0 4em;
+			margin: 4em auto 0 auto;
+			border: 1px solid #ccc;
+			border-right-color: #999;
+			border-bottom-color: #999;
+		}
+		h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
+	</style>
+</head>
+
+<body>
+  <!-- This file lives in public/422.html -->
+  <div class="dialog">
+    <h1>The change you wanted was rejected.</h1>
+    <p>Maybe you tried to change something you didn't have access to.</p>
+  </div>
+</body>
+</html>
Index: /ruby/tags/release-0.5.0/public/500.html
===================================================================
--- /ruby/tags/release-0.5.0/public/500.html	(revision 367)
+++ /ruby/tags/release-0.5.0/public/500.html	(revision 367)
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+  <title>We're sorry, but something went wrong (500)</title>
+	<style type="text/css">
+		body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
+		div.dialog {
+			width: 25em;
+			padding: 0 4em;
+			margin: 4em auto 0 auto;
+			border: 1px solid #ccc;
+			border-right-color: #999;
+			border-bottom-color: #999;
+		}
+		h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
+	</style>
+</head>
+
+<body>
+  <!-- This file lives in public/500.html -->
+  <div class="dialog">
+    <h1>We're sorry, but something went wrong.</h1>
+    <p>We've been notified about this issue and we'll take a look at it shortly.</p>
+  </div>
+</body>
+</html>
Index: /ruby/tags/release-0.5.0/public/dispatch.cgi
===================================================================
--- /ruby/tags/release-0.5.0/public/dispatch.cgi	(revision 367)
+++ /ruby/tags/release-0.5.0/public/dispatch.cgi	(revision 367)
@@ -0,0 +1,12 @@
+#!/usr/bin/ruby1.8
+
+#!/usr/local/bin/ruby
+
+require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
+
+# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
+# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
+require "dispatcher"
+
+ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun)
+Dispatcher.dispatch
Index: /ruby/tags/release-0.5.0/public/dispatch.fcgi
===================================================================
--- /ruby/tags/release-0.5.0/public/dispatch.fcgi	(revision 367)
+++ /ruby/tags/release-0.5.0/public/dispatch.fcgi	(revision 367)
@@ -0,0 +1,26 @@
+#!/usr/bin/ruby1.8
+
+#!/usr/local/bin/ruby
+#
+# You may specify the path to the FastCGI crash log (a log of unhandled
+# exceptions which forced the FastCGI instance to exit, great for debugging)
+# and the number of requests to process before running garbage collection.
+#
+# By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log
+# and the GC period is nil (turned off).  A reasonable number of requests
+# could range from 10-100 depending on the memory footprint of your app.
+#
+# Example:
+#   # Default log path, normal GC behavior.
+#   RailsFCGIHandler.process!
+#
+#   # Default log path, 50 requests between GC.
+#   RailsFCGIHandler.process! nil, 50
+#
+#   # Custom log path, normal GC behavior.
+#   RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log'
+#
+require File.dirname(__FILE__) + "/../config/environment"
+require 'fcgi_handler'
+
+RailsFCGIHandler.process!
Index: /ruby/tags/release-0.5.0/public/dispatch.rb
===================================================================
--- /ruby/tags/release-0.5.0/public/dispatch.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/public/dispatch.rb	(revision 367)
@@ -0,0 +1,12 @@
+#!/usr/bin/ruby1.8
+
+#!/usr/local/bin/ruby
+
+require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
+
+# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
+# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
+require "dispatcher"
+
+ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun)
+Dispatcher.dispatch
Index: /ruby/tags/release-0.5.0/public/index.html
===================================================================
--- /ruby/tags/release-0.5.0/public/index.html	(revision 367)
+++ /ruby/tags/release-0.5.0/public/index.html	(revision 367)
@@ -0,0 +1,274 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+  <head>
+    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+    <title>Ruby on Rails: Welcome aboard</title>
+    <style type="text/css" media="screen">
+      body {
+        margin: 0;
+        margin-bottom: 25px;
+        padding: 0;
+        background-color: #f0f0f0;
+        font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
+        font-size: 13px;
+        color: #333;
+      }
+      
+      h1 {
+        font-size: 28px;
+        color: #000;
+      }
+      
+      a  {color: #03c}
+      a:hover {
+        background-color: #03c;
+        color: white;
+        text-decoration: none;
+      }
+      
+      
+      #page {
+        background-color: #f0f0f0;
+        width: 750px;
+        margin: 0;
+        margin-left: auto;
+        margin-right: auto;
+      }
+      
+      #content {
+        float: left;
+        background-color: white;
+        border: 3px solid #aaa;
+        border-top: none;
+        padding: 25px;
+        width: 500px;
+      }
+      
+      #sidebar {
+        float: right;
+        width: 175px;
+      }
+
+      #footer {
+        clear: both;
+      }
+      
+
+      #header, #about, #getting-started {
+        padding-left: 75px;
+        padding-right: 30px;
+      }
+
+
+      #header {
+        background-image: url("images/rails.png");
+        background-repeat: no-repeat;
+        background-position: top left;
+        height: 64px;
+      }
+      #header h1, #header h2 {margin: 0}
+      #header h2 {
+        color: #888;
+        font-weight: normal;
+        font-size: 16px;
+      }
+      
+      
+      #about h3 {
+        margin: 0;
+        margin-bottom: 10px;
+        font-size: 14px;
+      }
+      
+      #about-content {
+        background-color: #ffd;
+        border: 1px solid #fc0;
+        margin-left: -11px;
+      }
+      #about-content table {
+        margin-top: 10px;
+        margin-bottom: 10px;
+        font-size: 11px;
+        border-collapse: collapse;
+      }
+      #about-content td {
+        padding: 10px;
+        padding-top: 3px;
+        padding-bottom: 3px;
+      }
+      #about-content td.name  {color: #555}
+      #about-content td.value {color: #000}
+      
+      #about-content.failure {
+        background-color: #fcc;
+        border: 1px solid #f00;
+      }
+      #about-content.failure p {
+        margin: 0;
+        padding: 10px;
+      }
+      
+      
+      #getting-started {
+        border-top: 1px solid #ccc;
+        margin-top: 25px;
+        padding-top: 15px;
+      }
+      #getting-started h1 {
+        margin: 0;
+        font-size: 20px;
+      }
+      #getting-started h2 {
+        margin: 0;
+        font-size: 14px;
+        font-weight: normal;
+        color: #333;
+        margin-bottom: 25px;
+      }
+      #getting-started ol {
+        margin-left: 0;
+        padding-left: 0;
+      }
+      #getting-started li {
+        font-size: 18px;
+        color: #888;
+        margin-bottom: 25px;
+      }
+      #getting-started li h2 {
+        margin: 0;
+        font-weight: normal;
+        font-size: 18px;
+        color: #333;
+      }
+      #getting-started li p {
+        color: #555;
+        font-size: 13px;
+      }
+      
+      
+      #search {
+        margin: 0;
+        padding-top: 10px;
+        padding-bottom: 10px;
+        font-size: 11px;
+      }
+      #search input {
+        font-size: 11px;
+        margin: 2px;
+      }
+      #search-text {width: 170px}
+      
+      
+      #sidebar ul {
+        margin-left: 0;
+        padding-left: 0;
+      }
+      #sidebar ul h3 {
+        margin-top: 25px;
+        font-size: 16px;
+        padding-bottom: 10px;
+        border-bottom: 1px solid #ccc;
+      }
+      #sidebar li {
+        list-style-type: none;
+      }
+      #sidebar ul.links li {
+        margin-bottom: 5px;
+      }
+      
+    </style>
+    <script type="text/javascript" src="javascripts/prototype.js"></script>
+    <script type="text/javascript" src="javascripts/effects.js"></script>
+    <script type="text/javascript">
+      function about() {
+        if (Element.empty('about-content')) {
+          new Ajax.Updater('about-content', 'rails/info/properties', {
+            method:     'get',
+            onFailure:  function() {Element.classNames('about-content').add('failure')},
+            onComplete: function() {new Effect.BlindDown('about-content', {duration: 0.25})}
+          });
+        } else {
+          new Effect[Element.visible('about-content') ? 
+            'BlindUp' : 'BlindDown']('about-content', {duration: 0.25});
+        }
+      }
+      
+      window.onload = function() {
+        $('search-text').value = '';
+        $('search').onsubmit = function() {
+          $('search-text').value = 'site:rubyonrails.org ' + $F('search-text');
+        }
+      }
+    </script>
+  </head>
+  <body>
+    <div id="page">
+      <div id="sidebar">
+        <ul id="sidebar-items">
+          <li>
+            <form id="search" action="http://www.google.com/search" method="get">
+              <input type="hidden" name="hl" value="en" />
+              <input type="text" id="search-text" name="q" value="site:rubyonrails.org " />
+              <input type="submit" value="Search" /> the Rails site
+            </form>
+          </li>
+        
+          <li>
+            <h3>Join the community</h3>
+            <ul class="links">
+              <li><a href="http://www.rubyonrails.org/">Ruby on Rails</a></li>
+              <li><a href="http://weblog.rubyonrails.org/">Official weblog</a></li>
+              <li><a href="http://wiki.rubyonrails.org/">Wiki</a></li>
+            </ul>
+          </li>
+          
+          <li>
+            <h3>Browse the documentation</h3>
+            <ul class="links">
+              <li><a href="http://api.rubyonrails.org/">Rails API</a></li>
+              <li><a href="http://stdlib.rubyonrails.org/">Ruby standard library</a></li>
+              <li><a href="http://corelib.rubyonrails.org/">Ruby core</a></li>
+            </ul>
+          </li>
+        </ul>
+      </div>
+
+      <div id="content">
+        <div id="header">
+          <h1>Welcome aboard</h1>
+          <h2>You&rsquo;re riding Ruby on Rails!</h2>
+        </div>
+
+        <div id="about">
+          <h3><a href="rails/info/properties" onclick="about(); return false">About your application&rsquo;s environment</a></h3>
+          <div id="about-content" style="display: none"></div>
+        </div>
+        
+        <div id="getting-started">
+          <h1>Getting started</h1>
+          <h2>Here&rsquo;s how to get rolling:</h2>
+          
+          <ol>          
+            <li>
+              <h2>Use <tt>script/generate</tt> to create your models and controllers</h2>
+              <p>To see all available options, run it without parameters.</p>
+            </li>
+            
+            <li>
+              <h2>Set up a default route and remove or rename this file</h2>
+              <p>Routes are set up in config/routes.rb.</p>
+            </li>
+
+            <li>
+              <h2>Create your database</h2>
+              <p>Run <tt>rake db:migrate</tt> to create your database. If you're not using SQLite (the default), edit <tt>config/database.yml</tt> with your username and password.</p>
+            </li>
+          </ol>
+        </div>
+      </div>
+      
+      <div id="footer">&nbsp;</div>
+    </div>
+  </body>
+</html>
Index: /ruby/tags/release-0.5.0/public/javascripts/application.js
===================================================================
--- /ruby/tags/release-0.5.0/public/javascripts/application.js	(revision 367)
+++ /ruby/tags/release-0.5.0/public/javascripts/application.js	(revision 367)
@@ -0,0 +1,2 @@
+// Place your application-specific JavaScript functions and classes here
+// This file is automatically included by javascript_include_tag :defaults
Index: /ruby/tags/release-0.5.0/public/javascripts/controls.js
===================================================================
--- /ruby/tags/release-0.5.0/public/javascripts/controls.js	(revision 367)
+++ /ruby/tags/release-0.5.0/public/javascripts/controls.js	(revision 367)
@@ -0,0 +1,963 @@
+// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+//           (c) 2005-2008 Ivan Krstic (http://blogs.law.harvard.edu/ivan)
+//           (c) 2005-2008 Jon Tirsen (http://www.tirsen.com)
+// Contributors:
+//  Richard Livsey
+//  Rahul Bhargava
+//  Rob Wills
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+// Autocompleter.Base handles all the autocompletion functionality
+// that's independent of the data source for autocompletion. This
+// includes drawing the autocompletion menu, observing keyboard
+// and mouse events, and similar.
+//
+// Specific autocompleters need to provide, at the very least,
+// a getUpdatedChoices function that will be invoked every time
+// the text inside the monitored textbox changes. This method
+// should get the text for which to provide autocompletion by
+// invoking this.getToken(), NOT by directly accessing
+// this.element.value. This is to allow incremental tokenized
+// autocompletion. Specific auto-completion logic (AJAX, etc)
+// belongs in getUpdatedChoices.
+//
+// Tokenized incremental autocompletion is enabled automatically
+// when an autocompleter is instantiated with the 'tokens' option
+// in the options parameter, e.g.:
+// new Ajax.Autocompleter('id','upd', '/url/', { tokens: ',' });
+// will incrementally autocomplete with a comma as the token.
+// Additionally, ',' in the above example can be replaced with
+// a token array, e.g. { tokens: [',', '\n'] } which
+// enables autocompletion on multiple tokens. This is most
+// useful when one of the tokens is \n (a newline), as it
+// allows smart autocompletion after linebreaks.
+
+if(typeof Effect == 'undefined')
+  throw("controls.js requires including script.aculo.us' effects.js library");
+
+var Autocompleter = { };
+Autocompleter.Base = Class.create({
+  baseInitialize: function(element, update, options) {
+    element          = $(element);
+    this.element     = element;
+    this.update      = $(update);
+    this.hasFocus    = false;
+    this.changed     = false;
+    this.active      = false;
+    this.index       = 0;
+    this.entryCount  = 0;
+    this.oldElementValue = this.element.value;
+
+    if(this.setOptions)
+      this.setOptions(options);
+    else
+      this.options = options || { };
+
+    this.options.paramName    = this.options.paramName || this.element.name;
+    this.options.tokens       = this.options.tokens || [];
+    this.options.frequency    = this.options.frequency || 0.4;
+    this.options.minChars     = this.options.minChars || 1;
+    this.options.onShow       = this.options.onShow ||
+      function(element, update){
+        if(!update.style.position || update.style.position=='absolute') {
+          update.style.position = 'absolute';
+          Position.clone(element, update, {
+            setHeight: false,
+            offsetTop: element.offsetHeight
+          });
+        }
+        Effect.Appear(update,{duration:0.15});
+      };
+    this.options.onHide = this.options.onHide ||
+      function(element, update){ new Effect.Fade(update,{duration:0.15}) };
+
+    if(typeof(this.options.tokens) == 'string')
+      this.options.tokens = new Array(this.options.tokens);
+    // Force carriage returns as token delimiters anyway
+    if (!this.options.tokens.include('\n'))
+      this.options.tokens.push('\n');
+
+    this.observer = null;
+
+    this.element.setAttribute('autocomplete','off');
+
+    Element.hide(this.update);
+
+    Event.observe(this.element, 'blur', this.onBlur.bindAsEventListener(this));
+    Event.observe(this.element, 'keydown', this.onKeyPress.bindAsEventListener(this));
+  },
+
+  show: function() {
+    if(Element.getStyle(this.update, 'display')=='none') this.options.onShow(this.element, this.update);
+    if(!this.iefix &&
+      (Prototype.Browser.IE) &&
+      (Element.getStyle(this.update, 'position')=='absolute')) {
+      new Insertion.After(this.update,
+       '<iframe id="' + this.update.id + '_iefix" '+
+       'style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" ' +
+       'src="javascript:false;" frameborder="0" scrolling="no"></iframe>');
+      this.iefix = $(this.update.id+'_iefix');
+    }
+    if(this.iefix) setTimeout(this.fixIEOverlapping.bind(this), 50);
+  },
+
+  fixIEOverlapping: function() {
+    Position.clone(this.update, this.iefix, {setTop:(!this.update.style.height)});
+    this.iefix.style.zIndex = 1;
+    this.update.style.zIndex = 2;
+    Element.show(this.iefix);
+  },
+
+  hide: function() {
+    this.stopIndicator();
+    if(Element.getStyle(this.update, 'display')!='none') this.options.onHide(this.element, this.update);
+    if(this.iefix) Element.hide(this.iefix);
+  },
+
+  startIndicator: function() {
+    if(this.options.indicator) Element.show(this.options.indicator);
+  },
+
+  stopIndicator: function() {
+    if(this.options.indicator) Element.hide(this.options.indicator);
+  },
+
+  onKeyPress: function(event) {
+    if(this.active)
+      switch(event.keyCode) {
+       case Event.KEY_TAB:
+       case Event.KEY_RETURN:
+         this.selectEntry();
+         Event.stop(event);
+       case Event.KEY_ESC:
+         this.hide();
+         this.active = false;
+         Event.stop(event);
+         return;
+       case Event.KEY_LEFT:
+       case Event.KEY_RIGHT:
+         return;
+       case Event.KEY_UP:
+         this.markPrevious();
+         this.render();
+         Event.stop(event);
+         return;
+       case Event.KEY_DOWN:
+         this.markNext();
+         this.render();
+         Event.stop(event);
+         return;
+      }
+     else
+       if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN ||
+         (Prototype.Browser.WebKit > 0 && event.keyCode == 0)) return;
+
+    this.changed = true;
+    this.hasFocus = true;
+
+    if(this.observer) clearTimeout(this.observer);
+      this.observer =
+        setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000);
+  },
+
+  activate: function() {
+    this.changed = false;
+    this.hasFocus = true;
+    this.getUpdatedChoices();
+  },
+
+  onHover: function(event) {
+    var element = Event.findElement(event, 'LI');
+    if(this.index != element.autocompleteIndex)
+    {
+        this.index = element.autocompleteIndex;
+        this.render();
+    }
+    Event.stop(event);
+  },
+
+  onClick: function(event) {
+    var element = Event.findElement(event, 'LI');
+    this.index = element.autocompleteIndex;
+    this.selectEntry();
+    this.hide();
+  },
+
+  onBlur: function(event) {
+    // needed to make click events working
+    setTimeout(this.hide.bind(this), 250);
+    this.hasFocus = false;
+    this.active = false;
+  },
+
+  render: function() {
+    if(this.entryCount > 0) {
+      for (var i = 0; i < this.entryCount; i++)
+        this.index==i ?
+          Element.addClassName(this.getEntry(i),"selected") :
+          Element.removeClassName(this.getEntry(i),"selected");
+      if(this.hasFocus) {
+        this.show();
+        this.active = true;
+      }
+    } else {
+      this.active = false;
+      this.hide();
+    }
+  },
+
+  markPrevious: function() {
+    if(this.index > 0) this.index--;
+      else this.index = this.entryCount-1;
+    this.getEntry(this.index).scrollIntoView(true);
+  },
+
+  markNext: function() {
+    if(this.index < this.entryCount-1) this.index++;
+      else this.index = 0;
+    this.getEntry(this.index).scrollIntoView(false);
+  },
+
+  getEntry: function(index) {
+    return this.update.firstChild.childNodes[index];
+  },
+
+  getCurrentEntry: function() {
+    return this.getEntry(this.index);
+  },
+
+  selectEntry: function() {
+    this.active = false;
+    this.updateElement(this.getCurrentEntry());
+  },
+
+  updateElement: function(selectedElement) {
+    if (this.options.updateElement) {
+      this.options.updateElement(selectedElement);
+      return;
+    }
+    var value = '';
+    if (this.options.select) {
+      var nodes = $(selectedElement).select('.' + this.options.select) || [];
+      if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select);
+    } else
+      value = Element.collectTextNodesIgnoreClass(selectedElement, 'informal');
+
+    var bounds = this.getTokenBounds();
+    if (bounds[0] != -1) {
+      var newValue = this.element.value.substr(0, bounds[0]);
+      var whitespace = this.element.value.substr(bounds[0]).match(/^\s+/);
+      if (whitespace)
+        newValue += whitespace[0];
+      this.element.value = newValue + value + this.element.value.substr(bounds[1]);
+    } else {
+      this.element.value = value;
+    }
+    this.oldElementValue = this.element.value;
+    this.element.focus();
+
+    if (this.options.afterUpdateElement)
+      this.options.afterUpdateElement(this.element, selectedElement);
+  },
+
+  updateChoices: function(choices) {
+    if(!this.changed && this.hasFocus) {
+      this.update.innerHTML = choices;
+      Element.cleanWhitespace(this.update);
+      Element.cleanWhitespace(this.update.down());
+
+      if(this.update.firstChild && this.update.down().childNodes) {
+        this.entryCount =
+          this.update.down().childNodes.length;
+        for (var i = 0; i < this.entryCount; i++) {
+          var entry = this.getEntry(i);
+          entry.autocompleteIndex = i;
+          this.addObservers(entry);
+        }
+      } else {
+        this.entryCount = 0;
+      }
+
+      this.stopIndicator();
+      this.index = 0;
+
+      if(this.entryCount==1 && this.options.autoSelect) {
+        this.selectEntry();
+        this.hide();
+      } else {
+        this.render();
+      }
+    }
+  },
+
+  addObservers: function(element) {
+    Event.observe(element, "mouseover", this.onHover.bindAsEventListener(this));
+    Event.observe(element, "click", this.onClick.bindAsEventListener(this));
+  },
+
+  onObserverEvent: function() {
+    this.changed = false;
+    this.tokenBounds = null;
+    if(this.getToken().length>=this.options.minChars) {
+      this.getUpdatedChoices();
+    } else {
+      this.active = false;
+      this.hide();
+    }
+    this.oldElementValue = this.element.value;
+  },
+
+  getToken: function() {
+    var bounds = this.getTokenBounds();
+    return this.element.value.substring(bounds[0], bounds[1]).strip();
+  },
+
+  getTokenBounds: function() {
+    if (null != this.tokenBounds) return this.tokenBounds;
+    var value = this.element.value;
+    if (value.strip().empty()) return [-1, 0];
+    var diff = arguments.callee.getFirstDifferencePos(value, this.oldElementValue);
+    var offset = (diff == this.oldElementValue.length ? 1 : 0);
+    var prevTokenPos = -1, nextTokenPos = value.length;
+    var tp;
+    for (var index = 0, l = this.options.tokens.length; index < l; ++index) {
+      tp = value.lastIndexOf(this.options.tokens[index], diff + offset - 1);
+      if (tp > prevTokenPos) prevTokenPos = tp;
+      tp = value.indexOf(this.options.tokens[index], diff + offset);
+      if (-1 != tp && tp < nextTokenPos) nextTokenPos = tp;
+    }
+    return (this.tokenBounds = [prevTokenPos + 1, nextTokenPos]);
+  }
+});
+
+Autocompleter.Base.prototype.getTokenBounds.getFirstDifferencePos = function(newS, oldS) {
+  var boundary = Math.min(newS.length, oldS.length);
+  for (var index = 0; index < boundary; ++index)
+    if (newS[index] != oldS[index])
+      return index;
+  return boundary;
+};
+
+Ajax.Autocompleter = Class.create(Autocompleter.Base, {
+  initialize: function(element, update, url, options) {
+    this.baseInitialize(element, update, options);
+    this.options.asynchronous  = true;
+    this.options.onComplete    = this.onComplete.bind(this);
+    this.options.defaultParams = this.options.parameters || null;
+    this.url                   = url;
+  },
+
+  getUpdatedChoices: function() {
+    this.startIndicator();
+
+    var entry = encodeURIComponent(this.options.paramName) + '=' +
+      encodeURIComponent(this.getToken());
+
+    this.options.parameters = this.options.callback ?
+      this.options.callback(this.element, entry) : entry;
+
+    if(this.options.defaultParams)
+      this.options.parameters += '&' + this.options.defaultParams;
+
+    new Ajax.Request(this.url, this.options);
+  },
+
+  onComplete: function(request) {
+    this.updateChoices(request.responseText);
+  }
+});
+
+// The local array autocompleter. Used when you'd prefer to
+// inject an array of autocompletion options into the page, rather
+// than sending out Ajax queries, which can be quite slow sometimes.
+//
+// The constructor takes four parameters. The first two are, as usual,
+// the id of the monitored textbox, and id of the autocompletion menu.
+// The third is the array you want to autocomplete from, and the fourth
+// is the options block.
+//
+// Extra local autocompletion options:
+// - choices - How many autocompletion choices to offer
+//
+// - partialSearch - If false, the autocompleter will match entered
+//                    text only at the beginning of strings in the
+//                    autocomplete array. Defaults to true, which will
+//                    match text at the beginning of any *word* in the
+//                    strings in the autocomplete array. If you want to
+//                    search anywhere in the string, additionally set
+//                    the option fullSearch to true (default: off).
+//
+// - fullSsearch - Search anywhere in autocomplete array strings.
+//
+// - partialChars - How many characters to enter before triggering
+//                   a partial match (unlike minChars, which defines
+//                   how many characters are required to do any match
+//                   at all). Defaults to 2.
+//
+// - ignoreCase - Whether to ignore case when autocompleting.
+//                 Defaults to true.
+//
+// It's possible to pass in a custom function as the 'selector'
+// option, if you prefer to write your own autocompletion logic.
+// In that case, the other options above will not apply unless
+// you support them.
+
+Autocompleter.Local = Class.create(Autocompleter.Base, {
+  initialize: function(element, update, array, options) {
+    this.baseInitialize(element, update, options);
+    this.options.array = array;
+  },
+
+  getUpdatedChoices: function() {
+    this.updateChoices(this.options.selector(this));
+  },
+
+  setOptions: function(options) {
+    this.options = Object.extend({
+      choices: 10,
+      partialSearch: true,
+      partialChars: 2,
+      ignoreCase: true,
+      fullSearch: false,
+      selector: function(instance) {
+        var ret       = []; // Beginning matches
+        var partial   = []; // Inside matches
+        var entry     = instance.getToken();
+        var count     = 0;
+
+        for (var i = 0; i < instance.options.array.length &&
+          ret.length < instance.options.choices ; i++) {
+
+          var elem = instance.options.array[i];
+          var foundPos = instance.options.ignoreCase ?
+            elem.toLowerCase().indexOf(entry.toLowerCase()) :
+            elem.indexOf(entry);
+
+          while (foundPos != -1) {
+            if (foundPos == 0 && elem.length != entry.length) {
+              ret.push("<li><strong>" + elem.substr(0, entry.length) + "</strong>" +
+                elem.substr(entry.length) + "</li>");
+              break;
+            } else if (entry.length >= instance.options.partialChars &&
+              instance.options.partialSearch && foundPos != -1) {
+              if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) {
+                partial.push("<li>" + elem.substr(0, foundPos) + "<strong>" +
+                  elem.substr(foundPos, entry.length) + "</strong>" + elem.substr(
+                  foundPos + entry.length) + "</li>");
+                break;
+              }
+            }
+
+            foundPos = instance.options.ignoreCase ?
+              elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) :
+              elem.indexOf(entry, foundPos + 1);
+
+          }
+        }
+        if (partial.length)
+          ret = ret.concat(partial.slice(0, instance.options.choices - ret.length));
+        return "<ul>" + ret.join('') + "</ul>";
+      }
+    }, options || { });
+  }
+});
+
+// AJAX in-place editor and collection editor
+// Full rewrite by Christophe Porteneuve <tdd@tddsworld.com> (April 2007).
+
+// Use this if you notice weird scrolling problems on some browsers,
+// the DOM might be a bit confused when this gets called so do this
+// waits 1 ms (with setTimeout) until it does the activation
+Field.scrollFreeActivate = function(field) {
+  setTimeout(function() {
+    Field.activate(field);
+  }, 1);
+};
+
+Ajax.InPlaceEditor = Class.create({
+  initialize: function(element, url, options) {
+    this.url = url;
+    this.element = element = $(element);
+    this.prepareOptions();
+    this._controls = { };
+    arguments.callee.dealWithDeprecatedOptions(options); // DEPRECATION LAYER!!!
+    Object.extend(this.options, options || { });
+    if (!this.options.formId && this.element.id) {
+      this.options.formId = this.element.id + '-inplaceeditor';
+      if ($(this.options.formId))
+        this.options.formId = '';
+    }
+    if (this.options.externalControl)
+      this.options.externalControl = $(this.options.externalControl);
+    if (!this.options.externalControl)
+      this.options.externalControlOnly = false;
+    this._originalBackground = this.element.getStyle('background-color') || 'transparent';
+    this.element.title = this.options.clickToEditText;
+    this._boundCancelHandler = this.handleFormCancellation.bind(this);
+    this._boundComplete = (this.options.onComplete || Prototype.emptyFunction).bind(this);
+    this._boundFailureHandler = this.handleAJAXFailure.bind(this);
+    this._boundSubmitHandler = this.handleFormSubmission.bind(this);
+    this._boundWrapperHandler = this.wrapUp.bind(this);
+    this.registerListeners();
+  },
+  checkForEscapeOrReturn: function(e) {
+    if (!this._editing || e.ctrlKey || e.altKey || e.shiftKey) return;
+    if (Event.KEY_ESC == e.keyCode)
+      this.handleFormCancellation(e);
+    else if (Event.KEY_RETURN == e.keyCode)
+      this.handleFormSubmission(e);
+  },
+  createControl: function(mode, handler, extraClasses) {
+    var control = this.options[mode + 'Control'];
+    var text = this.options[mode + 'Text'];
+    if ('button' == control) {
+      var btn = document.createElement('input');
+      btn.type = 'submit';
+      btn.value = text;
+      btn.className = 'editor_' + mode + '_button';
+      if ('cancel' == mode)
+        btn.onclick = this._boundCancelHandler;
+      this._form.appendChild(btn);
+      this._controls[mode] = btn;
+    } else if ('link' == control) {
+      var link = document.createElement('a');
+      link.href = '#';
+      link.appendChild(document.createTextNode(text));
+      link.onclick = 'cancel' == mode ? this._boundCancelHandler : this._boundSubmitHandler;
+      link.className = 'editor_' + mode + '_link';
+      if (extraClasses)
+        link.className += ' ' + extraClasses;
+      this._form.appendChild(link);
+      this._controls[mode] = link;
+    }
+  },
+  createEditField: function() {
+    var text = (this.options.loadTextURL ? this.options.loadingText : this.getText());
+    var fld;
+    if (1 >= this.options.rows && !/\r|\n/.test(this.getText())) {
+      fld = document.createElement('input');
+      fld.type = 'text';
+      var size = this.options.size || this.options.cols || 0;
+      if (0 < size) fld.size = size;
+    } else {
+      fld = document.createElement('textarea');
+      fld.rows = (1 >= this.options.rows ? this.options.autoRows : this.options.rows);
+      fld.cols = this.options.cols || 40;
+    }
+    fld.name = this.options.paramName;
+    fld.value = text; // No HTML breaks conversion anymore
+    fld.className = 'editor_field';
+    if (this.options.submitOnBlur)
+      fld.onblur = this._boundSubmitHandler;
+    this._controls.editor = fld;
+    if (this.options.loadTextURL)
+      this.loadExternalText();
+    this._form.appendChild(this._controls.editor);
+  },
+  createForm: function() {
+    var ipe = this;
+    function addText(mode, condition) {
+      var text = ipe.options['text' + mode + 'Controls'];
+      if (!text || condition === false) return;
+      ipe._form.appendChild(document.createTextNode(text));
+    };
+    this._form = $(document.createElement('form'));
+    this._form.id = this.options.formId;
+    this._form.addClassName(this.options.formClassName);
+    this._form.onsubmit = this._boundSubmitHandler;
+    this.createEditField();
+    if ('textarea' == this._controls.editor.tagName.toLowerCase())
+      this._form.appendChild(document.createElement('br'));
+    if (this.options.onFormCustomization)
+      this.options.onFormCustomization(this, this._form);
+    addText('Before', this.options.okControl || this.options.cancelControl);
+    this.createControl('ok', this._boundSubmitHandler);
+    addText('Between', this.options.okControl && this.options.cancelControl);
+    this.createControl('cancel', this._boundCancelHandler, 'editor_cancel');
+    addText('After', this.options.okControl || this.options.cancelControl);
+  },
+  destroy: function() {
+    if (this._oldInnerHTML)
+      this.element.innerHTML = this._oldInnerHTML;
+    this.leaveEditMode();
+    this.unregisterListeners();
+  },
+  enterEditMode: function(e) {
+    if (this._saving || this._editing) return;
+    this._editing = true;
+    this.triggerCallback('onEnterEditMode');
+    if (this.options.externalControl)
+      this.options.externalControl.hide();
+    this.element.hide();
+    this.createForm();
+    this.element.parentNode.insertBefore(this._form, this.element);
+    if (!this.options.loadTextURL)
+      this.postProcessEditField();
+    if (e) Event.stop(e);
+  },
+  enterHover: function(e) {
+    if (this.options.hoverClassName)
+      this.element.addClassName(this.options.hoverClassName);
+    if (this._saving) return;
+    this.triggerCallback('onEnterHover');
+  },
+  getText: function() {
+    return this.element.innerHTML.unescapeHTML();
+  },
+  handleAJAXFailure: function(transport) {
+    this.triggerCallback('onFailure', transport);
+    if (this._oldInnerHTML) {
+      this.element.innerHTML = this._oldInnerHTML;
+      this._oldInnerHTML = null;
+    }
+  },
+  handleFormCancellation: function(e) {
+    this.wrapUp();
+    if (e) Event.stop(e);
+  },
+  handleFormSubmission: function(e) {
+    var form = this._form;
+    var value = $F(this._controls.editor);
+    this.prepareSubmission();
+    var params = this.options.callback(form, value) || '';
+    if (Object.isString(params))
+      params = params.toQueryParams();
+    params.editorId = this.element.id;
+    if (this.options.htmlResponse) {
+      var options = Object.extend({ evalScripts: true }, this.options.ajaxOptions);
+      Object.extend(options, {
+        parameters: params,
+        onComplete: this._boundWrapperHandler,
+        onFailure: this._boundFailureHandler
+      });
+      new Ajax.Updater({ success: this.element }, this.url, options);
+    } else {
+      var options = Object.extend({ method: 'get' }, this.options.ajaxOptions);
+      Object.extend(options, {
+        parameters: params,
+        onComplete: this._boundWrapperHandler,
+        onFailure: this._boundFailureHandler
+      });
+      new Ajax.Request(this.url, options);
+    }
+    if (e) Event.stop(e);
+  },
+  leaveEditMode: function() {
+    this.element.removeClassName(this.options.savingClassName);
+    this.removeForm();
+    this.leaveHover();
+    this.element.style.backgroundColor = this._originalBackground;
+    this.element.show();
+    if (this.options.externalControl)
+      this.options.externalControl.show();
+    this._saving = false;
+    this._editing = false;
+    this._oldInnerHTML = null;
+    this.triggerCallback('onLeaveEditMode');
+  },
+  leaveHover: function(e) {
+    if (this.options.hoverClassName)
+      this.element.removeClassName(this.options.hoverClassName);
+    if (this._saving) return;
+    this.triggerCallback('onLeaveHover');
+  },
+  loadExternalText: function() {
+    this._form.addClassName(this.options.loadingClassName);
+    this._controls.editor.disabled = true;
+    var options = Object.extend({ method: 'get' }, this.options.ajaxOptions);
+    Object.extend(options, {
+      parameters: 'editorId=' + encodeURIComponent(this.element.id),
+      onComplete: Prototype.emptyFunction,
+      onSuccess: function(transport) {
+        this._form.removeClassName(this.options.loadingClassName);
+        var text = transport.responseText;
+        if (this.options.stripLoadedTextTags)
+          text = text.stripTags();
+        this._controls.editor.value = text;
+        this._controls.editor.disabled = false;
+        this.postProcessEditField();
+      }.bind(this),
+      onFailure: this._boundFailureHandler
+    });
+    new Ajax.Request(this.options.loadTextURL, options);
+  },
+  postProcessEditField: function() {
+    var fpc = this.options.fieldPostCreation;
+    if (fpc)
+      $(this._controls.editor)['focus' == fpc ? 'focus' : 'activate']();
+  },
+  prepareOptions: function() {
+    this.options = Object.clone(Ajax.InPlaceEditor.DefaultOptions);
+    Object.extend(this.options, Ajax.InPlaceEditor.DefaultCallbacks);
+    [this._extraDefaultOptions].flatten().compact().each(function(defs) {
+      Object.extend(this.options, defs);
+    }.bind(this));
+  },
+  prepareSubmission: function() {
+    this._saving = true;
+    this.removeForm();
+    this.leaveHover();
+    this.showSaving();
+  },
+  registerListeners: function() {
+    this._listeners = { };
+    var listener;
+    $H(Ajax.InPlaceEditor.Listeners).each(function(pair) {
+      listener = this[pair.value].bind(this);
+      this._listeners[pair.key] = listener;
+      if (!this.options.externalControlOnly)
+        this.element.observe(pair.key, listener);
+      if (this.options.externalControl)
+        this.options.externalControl.observe(pair.key, listener);
+    }.bind(this));
+  },
+  removeForm: function() {
+    if (!this._form) return;
+    this._form.remove();
+    this._form = null;
+    this._controls = { };
+  },
+  showSaving: function() {
+    this._oldInnerHTML = this.element.innerHTML;
+    this.element.innerHTML = this.options.savingText;
+    this.element.addClassName(this.options.savingClassName);
+    this.element.style.backgroundColor = this._originalBackground;
+    this.element.show();
+  },
+  triggerCallback: function(cbName, arg) {
+    if ('function' == typeof this.options[cbName]) {
+      this.options[cbName](this, arg);
+    }
+  },
+  unregisterListeners: function() {
+    $H(this._listeners).each(function(pair) {
+      if (!this.options.externalControlOnly)
+        this.element.stopObserving(pair.key, pair.value);
+      if (this.options.externalControl)
+        this.options.externalControl.stopObserving(pair.key, pair.value);
+    }.bind(this));
+  },
+  wrapUp: function(transport) {
+    this.leaveEditMode();
+    // Can't use triggerCallback due to backward compatibility: requires
+    // binding + direct element
+    this._boundComplete(transport, this.element);
+  }
+});
+
+Object.extend(Ajax.InPlaceEditor.prototype, {
+  dispose: Ajax.InPlaceEditor.prototype.destroy
+});
+
+Ajax.InPlaceCollectionEditor = Class.create(Ajax.InPlaceEditor, {
+  initialize: function($super, element, url, options) {
+    this._extraDefaultOptions = Ajax.InPlaceCollectionEditor.DefaultOptions;
+    $super(element, url, options);
+  },
+
+  createEditField: function() {
+    var list = document.createElement('select');
+    list.name = this.options.paramName;
+    list.size = 1;
+    this._controls.editor = list;
+    this._collection = this.options.collection || [];
+    if (this.options.loadCollectionURL)
+      this.loadCollection();
+    else
+      this.checkForExternalText();
+    this._form.appendChild(this._controls.editor);
+  },
+
+  loadCollection: function() {
+    this._form.addClassName(this.options.loadingClassName);
+    this.showLoadingText(this.options.loadingCollectionText);
+    var options = Object.extend({ method: 'get' }, this.options.ajaxOptions);
+    Object.extend(options, {
+      parameters: 'editorId=' + encodeURIComponent(this.element.id),
+      onComplete: Prototype.emptyFunction,
+      onSuccess: function(transport) {
+        var js = transport.responseText.strip();
+        if (!/^\[.*\]$/.test(js)) // TODO: improve sanity check
+          throw('Server returned an invalid collection representation.');
+        this._collection = eval(js);
+        this.checkForExternalText();
+      }.bind(this),
+      onFailure: this.onFailure
+    });
+    new Ajax.Request(this.options.loadCollectionURL, options);
+  },
+
+  showLoadingText: function(text) {
+    this._controls.editor.disabled = true;
+    var tempOption = this._controls.editor.firstChild;
+    if (!tempOption) {
+      tempOption = document.createElement('option');
+      tempOption.value = '';
+      this._controls.editor.appendChild(tempOption);
+      tempOption.selected = true;
+    }
+    tempOption.update((text || '').stripScripts().stripTags());
+  },
+
+  checkForExternalText: function() {
+    this._text = this.getText();
+    if (this.options.loadTextURL)
+      this.loadExternalText();
+    else
+      this.buildOptionList();
+  },
+
+  loadExternalText: function() {
+    this.showLoadingText(this.options.loadingText);
+    var options = Object.extend({ method: 'get' }, this.options.ajaxOptions);
+    Object.extend(options, {
+      parameters: 'editorId=' + encodeURIComponent(this.element.id),
+      onComplete: Prototype.emptyFunction,
+      onSuccess: function(transport) {
+        this._text = transport.responseText.strip();
+        this.buildOptionList();
+      }.bind(this),
+      onFailure: this.onFailure
+    });
+    new Ajax.Request(this.options.loadTextURL, options);
+  },
+
+  buildOptionList: function() {
+    this._form.removeClassName(this.options.loadingClassName);
+    this._collection = this._collection.map(function(entry) {
+      return 2 === entry.length ? entry : [entry, entry].flatten();
+    });
+    var marker = ('value' in this.options) ? this.options.value : this._text;
+    var textFound = this._collection.any(function(entry) {
+      return entry[0] == marker;
+    }.bind(this));
+    this._controls.editor.update('');
+    var option;
+    this._collection.each(function(entry, index) {
+      option = document.createElement('option');
+      option.value = entry[0];
+      option.selected = textFound ? entry[0] == marker : 0 == index;
+      option.appendChild(document.createTextNode(entry[1]));
+      this._controls.editor.appendChild(option);
+    }.bind(this));
+    this._controls.editor.disabled = false;
+    Field.scrollFreeActivate(this._controls.editor);
+  }
+});
+
+//**** DEPRECATION LAYER FOR InPlace[Collection]Editor! ****
+//**** This only  exists for a while,  in order to  let ****
+//**** users adapt to  the new API.  Read up on the new ****
+//**** API and convert your code to it ASAP!            ****
+
+Ajax.InPlaceEditor.prototype.initialize.dealWithDeprecatedOptions = function(options) {
+  if (!options) return;
+  function fallback(name, expr) {
+    if (name in options || expr === undefined) return;
+    options[name] = expr;
+  };
+  fallback('cancelControl', (options.cancelLink ? 'link' : (options.cancelButton ? 'button' :
+    options.cancelLink == options.cancelButton == false ? false : undefined)));
+  fallback('okControl', (options.okLink ? 'link' : (options.okButton ? 'button' :
+    options.okLink == options.okButton == false ? false : undefined)));
+  fallback('highlightColor', options.highlightcolor);
+  fallback('highlightEndColor', options.highlightendcolor);
+};
+
+Object.extend(Ajax.InPlaceEditor, {
+  DefaultOptions: {
+    ajaxOptions: { },
+    autoRows: 3,                                // Use when multi-line w/ rows == 1
+    cancelControl: 'link',                      // 'link'|'button'|false
+    cancelText: 'cancel',
+    clickToEditText: 'Click to edit',
+    externalControl: null,                      // id|elt
+    externalControlOnly: false,
+    fieldPostCreation: 'activate',              // 'activate'|'focus'|false
+    formClassName: 'inplaceeditor-form',
+    formId: null,                               // id|elt
+    highlightColor: '#ffff99',
+    highlightEndColor: '#ffffff',
+    hoverClassName: '',
+    htmlResponse: true,
+    loadingClassName: 'inplaceeditor-loading',
+    loadingText: 'Loading...',
+    okControl: 'button',                        // 'link'|'button'|false
+    okText: 'ok',
+    paramName: 'value',
+    rows: 1,                                    // If 1 and multi-line, uses autoRows
+    savingClassName: 'inplaceeditor-saving',
+    savingText: 'Saving...',
+    size: 0,
+    stripLoadedTextTags: false,
+    submitOnBlur: false,
+    textAfterControls: '',
+    textBeforeControls: '',
+    textBetweenControls: ''
+  },
+  DefaultCallbacks: {
+    callback: function(form) {
+      return Form.serialize(form);
+    },
+    onComplete: function(transport, element) {
+      // For backward compatibility, this one is bound to the IPE, and passes
+      // the element directly.  It was too often customized, so we don't break it.
+      new Effect.Highlight(element, {
+        startcolor: this.options.highlightColor, keepBackgroundImage: true });
+    },
+    onEnterEditMode: null,
+    onEnterHover: function(ipe) {
+      ipe.element.style.backgroundColor = ipe.options.highlightColor;
+      if (ipe._effect)
+        ipe._effect.cancel();
+    },
+    onFailure: function(transport, ipe) {
+      alert('Error communication with the server: ' + transport.responseText.stripTags());
+    },
+    onFormCustomization: null, // Takes the IPE and its generated form, after editor, before controls.
+    onLeaveEditMode: null,
+    onLeaveHover: function(ipe) {
+      ipe._effect = new Effect.Highlight(ipe.element, {
+        startcolor: ipe.options.highlightColor, endcolor: ipe.options.highlightEndColor,
+        restorecolor: ipe._originalBackground, keepBackgroundImage: true
+      });
+    }
+  },
+  Listeners: {
+    click: 'enterEditMode',
+    keydown: 'checkForEscapeOrReturn',
+    mouseover: 'enterHover',
+    mouseout: 'leaveHover'
+  }
+});
+
+Ajax.InPlaceCollectionEditor.DefaultOptions = {
+  loadingCollectionText: 'Loading options...'
+};
+
+// Delayed observer, like Form.Element.Observer,
+// but waits for delay after last key input
+// Ideal for live-search fields
+
+Form.Element.DelayedObserver = Class.create({
+  initialize: function(element, delay, callback) {
+    this.delay     = delay || 0.5;
+    this.element   = $(element);
+    this.callback  = callback;
+    this.timer     = null;
+    this.lastValue = $F(this.element);
+    Event.observe(this.element,'keyup',this.delayedListener.bindAsEventListener(this));
+  },
+  delayedListener: function(event) {
+    if(this.lastValue == $F(this.element)) return;
+    if(this.timer) clearTimeout(this.timer);
+    this.timer = setTimeout(this.onTimerEvent.bind(this), this.delay * 1000);
+    this.lastValue = $F(this.element);
+  },
+  onTimerEvent: function() {
+    this.timer = null;
+    this.callback(this.element, $F(this.element));
+  }
+});
Index: /ruby/tags/release-0.5.0/public/javascripts/dragdrop.js
===================================================================
--- /ruby/tags/release-0.5.0/public/javascripts/dragdrop.js	(revision 367)
+++ /ruby/tags/release-0.5.0/public/javascripts/dragdrop.js	(revision 367)
@@ -0,0 +1,973 @@
+// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+//           (c) 2005-2008 Sammi Williams (http://www.oriontransfer.co.nz, sammi@oriontransfer.co.nz)
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+if(Object.isUndefined(Effect))
+  throw("dragdrop.js requires including script.aculo.us' effects.js library");
+
+var Droppables = {
+  drops: [],
+
+  remove: function(element) {
+    this.drops = this.drops.reject(function(d) { return d.element==$(element) });
+  },
+
+  add: function(element) {
+    element = $(element);
+    var options = Object.extend({
+      greedy:     true,
+      hoverclass: null,
+      tree:       false
+    }, arguments[1] || { });
+
+    // cache containers
+    if(options.containment) {
+      options._containers = [];
+      var containment = options.containment;
+      if(Object.isArray(containment)) {
+        containment.each( function(c) { options._containers.push($(c)) });
+      } else {
+        options._containers.push($(containment));
+      }
+    }
+
+    if(options.accept) options.accept = [options.accept].flatten();
+
+    Element.makePositioned(element); // fix IE
+    options.element = element;
+
+    this.drops.push(options);
+  },
+
+  findDeepestChild: function(drops) {
+    deepest = drops[0];
+
+    for (i = 1; i < drops.length; ++i)
+      if (Element.isParent(drops[i].element, deepest.element))
+        deepest = drops[i];
+
+    return deepest;
+  },
+
+  isContained: function(element, drop) {
+    var containmentNode;
+    if(drop.tree) {
+      containmentNode = element.treeNode;
+    } else {
+      containmentNode = element.parentNode;
+    }
+    return drop._containers.detect(function(c) { return containmentNode == c });
+  },
+
+  isAffected: function(point, element, drop) {
+    return (
+      (drop.element!=element) &&
+      ((!drop._containers) ||
+        this.isContained(element, drop)) &&
+      ((!drop.accept) ||
+        (Element.classNames(element).detect(
+          function(v) { return drop.accept.include(v) } ) )) &&
+      Position.within(drop.element, point[0], point[1]) );
+  },
+
+  deactivate: function(drop) {
+    if(drop.hoverclass)
+      Element.removeClassName(drop.element, drop.hoverclass);
+    this.last_active = null;
+  },
+
+  activate: function(drop) {
+    if(drop.hoverclass)
+      Element.addClassName(drop.element, drop.hoverclass);
+    this.last_active = drop;
+  },
+
+  show: function(point, element) {
+    if(!this.drops.length) return;
+    var drop, affected = [];
+
+    this.drops.each( function(drop) {
+      if(Droppables.isAffected(point, element, drop))
+        affected.push(drop);
+    });
+
+    if(affected.length>0)
+      drop = Droppables.findDeepestChild(affected);
+
+    if(this.last_active && this.last_active != drop) this.deactivate(this.last_active);
+    if (drop) {
+      Position.within(drop.element, point[0], point[1]);
+      if(drop.onHover)
+        drop.onHover(element, drop.element, Position.overlap(drop.overlap, drop.element));
+
+      if (drop != this.last_active) Droppables.activate(drop);
+    }
+  },
+
+  fire: function(event, element) {
+    if(!this.last_active) return;
+    Position.prepare();
+
+    if (this.isAffected([Event.pointerX(event), Event.pointerY(event)], element, this.last_active))
+      if (this.last_active.onDrop) {
+        this.last_active.onDrop(element, this.last_active.element, event);
+        return true;
+      }
+  },
+
+  reset: function() {
+    if(this.last_active)
+      this.deactivate(this.last_active);
+  }
+};
+
+var Draggables = {
+  drags: [],
+  observers: [],
+
+  register: function(draggable) {
+    if(this.drags.length == 0) {
+      this.eventMouseUp   = this.endDrag.bindAsEventListener(this);
+      this.eventMouseMove = this.updateDrag.bindAsEventListener(this);
+      this.eventKeypress  = this.keyPress.bindAsEventListener(this);
+
+      Event.observe(document, "mouseup", this.eventMouseUp);
+      Event.observe(document, "mousemove", this.eventMouseMove);
+      Event.observe(document, "keypress", this.eventKeypress);
+    }
+    this.drags.push(draggable);
+  },
+
+  unregister: function(draggable) {
+    this.drags = this.drags.reject(function(d) { return d==draggable });
+    if(this.drags.length == 0) {
+      Event.stopObserving(document, "mouseup", this.eventMouseUp);
+      Event.stopObserving(document, "mousemove", this.eventMouseMove);
+      Event.stopObserving(document, "keypress", this.eventKeypress);
+    }
+  },
+
+  activate: function(draggable) {
+    if(draggable.options.delay) {
+      this._timeout = setTimeout(function() {
+        Draggables._timeout = null;
+        window.focus();
+        Draggables.activeDraggable = draggable;
+      }.bind(this), draggable.options.delay);
+    } else {
+      window.focus(); // allows keypress events if window isn't currently focused, fails for Safari
+      this.activeDraggable = draggable;
+    }
+  },
+
+  deactivate: function() {
+    this.activeDraggable = null;
+  },
+
+  updateDrag: function(event) {
+    if(!this.activeDraggable) return;
+    var pointer = [Event.pointerX(event), Event.pointerY(event)];
+    // Mozilla-based browsers fire successive mousemove events with
+    // the same coordinates, prevent needless redrawing (moz bug?)
+    if(this._lastPointer && (this._lastPointer.inspect() == pointer.inspect())) return;
+    this._lastPointer = pointer;
+
+    this.activeDraggable.updateDrag(event, pointer);
+  },
+
+  endDrag: function(event) {
+    if(this._timeout) {
+      clearTimeout(this._timeout);
+      this._timeout = null;
+    }
+    if(!this.activeDraggable) return;
+    this._lastPointer = null;
+    this.activeDraggable.endDrag(event);
+    this.activeDraggable = null;
+  },
+
+  keyPress: function(event) {
+    if(this.activeDraggable)
+      this.activeDraggable.keyPress(event);
+  },
+
+  addObserver: function(observer) {
+    this.observers.push(observer);
+    this._cacheObserverCallbacks();
+  },
+
+  removeObserver: function(element) {  // element instead of observer fixes mem leaks
+    this.observers = this.observers.reject( function(o) { return o.element==element });
+    this._cacheObserverCallbacks();
+  },
+
+  notify: function(eventName, draggable, event) {  // 'onStart', 'onEnd', 'onDrag'
+    if(this[eventName+'Count'] > 0)
+      this.observers.each( function(o) {
+        if(o[eventName]) o[eventName](eventName, draggable, event);
+      });
+    if(draggable.options[eventName]) draggable.options[eventName](draggable, event);
+  },
+
+  _cacheObserverCallbacks: function() {
+    ['onStart','onEnd','onDrag'].each( function(eventName) {
+      Draggables[eventName+'Count'] = Draggables.observers.select(
+        function(o) { return o[eventName]; }
+      ).length;
+    });
+  }
+};
+
+/*--------------------------------------------------------------------------*/
+
+var Draggable = Class.create({
+  initialize: function(element) {
+    var defaults = {
+      handle: false,
+      reverteffect: function(element, top_offset, left_offset) {
+        var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02;
+        new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur,
+          queue: {scope:'_draggable', position:'end'}
+        });
+      },
+      endeffect: function(element) {
+        var toOpacity = Object.isNumber(element._opacity) ? element._opacity : 1.0;
+        new Effect.Opacity(element, {duration:0.2, from:0.7, to:toOpacity,
+          queue: {scope:'_draggable', position:'end'},
+          afterFinish: function(){
+            Draggable._dragging[element] = false
+          }
+        });
+      },
+      zindex: 1000,
+      revert: false,
+      quiet: false,
+      scroll: false,
+      scrollSensitivity: 20,
+      scrollSpeed: 15,
+      snap: false,  // false, or xy or [x,y] or function(x,y){ return [x,y] }
+      delay: 0
+    };
+
+    if(!arguments[1] || Object.isUndefined(arguments[1].endeffect))
+      Object.extend(defaults, {
+        starteffect: function(element) {
+          element._opacity = Element.getOpacity(element);
+          Draggable._dragging[element] = true;
+          new Effect.Opacity(element, {duration:0.2, from:element._opacity, to:0.7});
+        }
+      });
+
+    var options = Object.extend(defaults, arguments[1] || { });
+
+    this.element = $(element);
+
+    if(options.handle && Object.isString(options.handle))
+      this.handle = this.element.down('.'+options.handle, 0);
+
+    if(!this.handle) this.handle = $(options.handle);
+    if(!this.handle) this.handle = this.element;
+
+    if(options.scroll && !options.scroll.scrollTo && !options.scroll.outerHTML) {
+      options.scroll = $(options.scroll);
+      this._isScrollChild = Element.childOf(this.element, options.scroll);
+    }
+
+    Element.makePositioned(this.element); // fix IE
+
+    this.options  = options;
+    this.dragging = false;
+
+    this.eventMouseDown = this.initDrag.bindAsEventListener(this);
+    Event.observe(this.handle, "mousedown", this.eventMouseDown);
+
+    Draggables.register(this);
+  },
+
+  destroy: function() {
+    Event.stopObserving(this.handle, "mousedown", this.eventMouseDown);
+    Draggables.unregister(this);
+  },
+
+  currentDelta: function() {
+    return([
+      parseInt(Element.getStyle(this.element,'left') || '0'),
+      parseInt(Element.getStyle(this.element,'top') || '0')]);
+  },
+
+  initDrag: function(event) {
+    if(!Object.isUndefined(Draggable._dragging[this.element]) &&
+      Draggable._dragging[this.element]) return;
+    if(Event.isLeftClick(event)) {
+      // abort on form elements, fixes a Firefox issue
+      var src = Event.element(event);
+      if((tag_name = src.tagName.toUpperCase()) && (
+        tag_name=='INPUT' ||
+        tag_name=='SELECT' ||
+        tag_name=='OPTION' ||
+        tag_name=='BUTTON' ||
+        tag_name=='TEXTAREA')) return;
+
+      var pointer = [Event.pointerX(event), Event.pointerY(event)];
+      var pos     = Position.cumulativeOffset(this.element);
+      this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) });
+
+      Draggables.activate(this);
+      Event.stop(event);
+    }
+  },
+
+  startDrag: function(event) {
+    this.dragging = true;
+    if(!this.delta)
+      this.delta = this.currentDelta();
+
+    if(this.options.zindex) {
+      this.originalZ = parseInt(Element.getStyle(this.element,'z-index') || 0);
+      this.element.style.zIndex = this.options.zindex;
+    }
+
+    if(this.options.ghosting) {
+      this._clone = this.element.cloneNode(true);
+      this._originallyAbsolute = (this.element.getStyle('position') == 'absolute');
+      if (!this._originallyAbsolute)
+        Position.absolutize(this.element);
+      this.element.parentNode.insertBefore(this._clone, this.element);
+    }
+
+    if(this.options.scroll) {
+      if (this.options.scroll == window) {
+        var where = this._getWindowScroll(this.options.scroll);
+        this.originalScrollLeft = where.left;
+        this.originalScrollTop = where.top;
+      } else {
+        this.originalScrollLeft = this.options.scroll.scrollLeft;
+        this.originalScrollTop = this.options.scroll.scrollTop;
+      }
+    }
+
+    Draggables.notify('onStart', this, event);
+
+    if(this.options.starteffect) this.options.starteffect(this.element);
+  },
+
+  updateDrag: function(event, pointer) {
+    if(!this.dragging) this.startDrag(event);
+
+    if(!this.options.quiet){
+      Position.prepare();
+      Droppables.show(pointer, this.element);
+    }
+
+    Draggables.notify('onDrag', this, event);
+
+    this.draw(pointer);
+    if(this.options.change) this.options.change(this);
+
+    if(this.options.scroll) {
+      this.stopScrolling();
+
+      var p;
+      if (this.options.scroll == window) {
+        with(this._getWindowScroll(this.options.scroll)) { p = [ left, top, left+width, top+height ]; }
+      } else {
+        p = Position.page(this.options.scroll);
+        p[0] += this.options.scroll.scrollLeft + Position.deltaX;
+        p[1] += this.options.scroll.scrollTop + Position.deltaY;
+        p.push(p[0]+this.options.scroll.offsetWidth);
+        p.push(p[1]+this.options.scroll.offsetHeight);
+      }
+      var speed = [0,0];
+      if(pointer[0] < (p[0]+this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[0]+this.options.scrollSensitivity);
+      if(pointer[1] < (p[1]+this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[1]+this.options.scrollSensitivity);
+      if(pointer[0] > (p[2]-this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[2]-this.options.scrollSensitivity);
+      if(pointer[1] > (p[3]-this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[3]-this.options.scrollSensitivity);
+      this.startScrolling(speed);
+    }
+
+    // fix AppleWebKit rendering
+    if(Prototype.Browser.WebKit) window.scrollBy(0,0);
+
+    Event.stop(event);
+  },
+
+  finishDrag: function(event, success) {
+    this.dragging = false;
+
+    if(this.options.quiet){
+      Position.prepare();
+      var pointer = [Event.pointerX(event), Event.pointerY(event)];
+      Droppables.show(pointer, this.element);
+    }
+
+    if(this.options.ghosting) {
+      if (!this._originallyAbsolute)
+        Position.relativize(this.element);
+      delete this._originallyAbsolute;
+      Element.remove(this._clone);
+      this._clone = null;
+    }
+
+    var dropped = false;
+    if(success) {
+      dropped = Droppables.fire(event, this.element);
+      if (!dropped) dropped = false;
+    }
+    if(dropped && this.options.onDropped) this.options.onDropped(this.element);
+    Draggables.notify('onEnd', this, event);
+
+    var revert = this.options.revert;
+    if(revert && Object.isFunction(revert)) revert = revert(this.element);
+
+    var d = this.currentDelta();
+    if(revert && this.options.reverteffect) {
+      if (dropped == 0 || revert != 'failure')
+        this.options.reverteffect(this.element,
+          d[1]-this.delta[1], d[0]-this.delta[0]);
+    } else {
+      this.delta = d;
+    }
+
+    if(this.options.zindex)
+      this.element.style.zIndex = this.originalZ;
+
+    if(this.options.endeffect)
+      this.options.endeffect(this.element);
+
+    Draggables.deactivate(this);
+    Droppables.reset();
+  },
+
+  keyPress: function(event) {
+    if(event.keyCode!=Event.KEY_ESC) return;
+    this.finishDrag(event, false);
+    Event.stop(event);
+  },
+
+  endDrag: function(event) {
+    if(!this.dragging) return;
+    this.stopScrolling();
+    this.finishDrag(event, true);
+    Event.stop(event);
+  },
+
+  draw: function(point) {
+    var pos = Position.cumulativeOffset(this.element);
+    if(this.options.ghosting) {
+      var r   = Position.realOffset(this.element);
+      pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY;
+    }
+
+    var d = this.currentDelta();
+    pos[0] -= d[0]; pos[1] -= d[1];
+
+    if(this.options.scroll && (this.options.scroll != window && this._isScrollChild)) {
+      pos[0] -= this.options.scroll.scrollLeft-this.originalScrollLeft;
+      pos[1] -= this.options.scroll.scrollTop-this.originalScrollTop;
+    }
+
+    var p = [0,1].map(function(i){
+      return (point[i]-pos[i]-this.offset[i])
+    }.bind(this));
+
+    if(this.options.snap) {
+      if(Object.isFunction(this.options.snap)) {
+        p = this.options.snap(p[0],p[1],this);
+      } else {
+      if(Object.isArray(this.options.snap)) {
+        p = p.map( function(v, i) {
+          return (v/this.options.snap[i]).round()*this.options.snap[i] }.bind(this));
+      } else {
+        p = p.map( function(v) {
+          return (v/this.options.snap).round()*this.options.snap }.bind(this));
+      }
+    }}
+
+    var style = this.element.style;
+    if((!this.options.constraint) || (this.options.constraint=='horizontal'))
+      style.left = p[0] + "px";
+    if((!this.options.constraint) || (this.options.constraint=='vertical'))
+      style.top  = p[1] + "px";
+
+    if(style.visibility=="hidden") style.visibility = ""; // fix gecko rendering
+  },
+
+  stopScrolling: function() {
+    if(this.scrollInterval) {
+      clearInterval(this.scrollInterval);
+      this.scrollInterval = null;
+      Draggables._lastScrollPointer = null;
+    }
+  },
+
+  startScrolling: function(speed) {
+    if(!(speed[0] || speed[1])) return;
+    this.scrollSpeed = [speed[0]*this.options.scrollSpeed,speed[1]*this.options.scrollSpeed];
+    this.lastScrolled = new Date();
+    this.scrollInterval = setInterval(this.scroll.bind(this), 10);
+  },
+
+  scroll: function() {
+    var current = new Date();
+    var delta = current - this.lastScrolled;
+    this.lastScrolled = current;
+    if(this.options.scroll == window) {
+      with (this._getWindowScroll(this.options.scroll)) {
+        if (this.scrollSpeed[0] || this.scrollSpeed[1]) {
+          var d = delta / 1000;
+          this.options.scroll.scrollTo( left + d*this.scrollSpeed[0], top + d*this.scrollSpeed[1] );
+        }
+      }
+    } else {
+      this.options.scroll.scrollLeft += this.scrollSpeed[0] * delta / 1000;
+      this.options.scroll.scrollTop  += this.scrollSpeed[1] * delta / 1000;
+    }
+
+    Position.prepare();
+    Droppables.show(Draggables._lastPointer, this.element);
+    Draggables.notify('onDrag', this);
+    if (this._isScrollChild) {
+      Draggables._lastScrollPointer = Draggables._lastScrollPointer || $A(Draggables._lastPointer);
+      Draggables._lastScrollPointer[0] += this.scrollSpeed[0] * delta / 1000;
+      Draggables._lastScrollPointer[1] += this.scrollSpeed[1] * delta / 1000;
+      if (Draggables._lastScrollPointer[0] < 0)
+        Draggables._lastScrollPointer[0] = 0;
+      if (Draggables._lastScrollPointer[1] < 0)
+        Draggables._lastScrollPointer[1] = 0;
+      this.draw(Draggables._lastScrollPointer);
+    }
+
+    if(this.options.change) this.options.change(this);
+  },
+
+  _getWindowScroll: function(w) {
+    var T, L, W, H;
+    with (w.document) {
+      if (w.document.documentElement && documentElement.scrollTop) {
+        T = documentElement.scrollTop;
+        L = documentElement.scrollLeft;
+      } else if (w.document.body) {
+        T = body.scrollTop;
+        L = body.scrollLeft;
+      }
+      if (w.innerWidth) {
+        W = w.innerWidth;
+        H = w.innerHeight;
+      } else if (w.document.documentElement && documentElement.clientWidth) {
+        W = documentElement.clientWidth;
+        H = documentElement.clientHeight;
+      } else {
+        W = body.offsetWidth;
+        H = body.offsetHeight;
+      }
+    }
+    return { top: T, left: L, width: W, height: H };
+  }
+});
+
+Draggable._dragging = { };
+
+/*--------------------------------------------------------------------------*/
+
+var SortableObserver = Class.create({
+  initialize: function(element, observer) {
+    this.element   = $(element);
+    this.observer  = observer;
+    this.lastValue = Sortable.serialize(this.element);
+  },
+
+  onStart: function() {
+    this.lastValue = Sortable.serialize(this.element);
+  },
+
+  onEnd: function() {
+    Sortable.unmark();
+    if(this.lastValue != Sortable.serialize(this.element))
+      this.observer(this.element)
+  }
+});
+
+var Sortable = {
+  SERIALIZE_RULE: /^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/,
+
+  sortables: { },
+
+  _findRootElement: function(element) {
+    while (element.tagName.toUpperCase() != "BODY") {
+      if(element.id && Sortable.sortables[element.id]) return element;
+      element = element.parentNode;
+    }
+  },
+
+  options: function(element) {
+    element = Sortable._findRootElement($(element));
+    if(!element) return;
+    return Sortable.sortables[element.id];
+  },
+
+  destroy: function(element){
+    element = $(element);
+    var s = Sortable.sortables[element.id];
+
+    if(s) {
+      Draggables.removeObserver(s.element);
+      s.droppables.each(function(d){ Droppables.remove(d) });
+      s.draggables.invoke('destroy');
+
+      delete Sortable.sortables[s.element.id];
+    }
+  },
+
+  create: function(element) {
+    element = $(element);
+    var options = Object.extend({
+      element:     element,
+      tag:         'li',       // assumes li children, override with tag: 'tagname'
+      dropOnEmpty: false,
+      tree:        false,
+      treeTag:     'ul',
+      overlap:     'vertical', // one of 'vertical', 'horizontal'
+      constraint:  'vertical', // one of 'vertical', 'horizontal', false
+      containment: element,    // also takes array of elements (or id's); or false
+      handle:      false,      // or a CSS class
+      only:        false,
+      delay:       0,
+      hoverclass:  null,
+      ghosting:    false,
+      quiet:       false,
+      scroll:      false,
+      scrollSensitivity: 20,
+      scrollSpeed: 15,
+      format:      this.SERIALIZE_RULE,
+
+      // these take arrays of elements or ids and can be
+      // used for better initialization performance
+      elements:    false,
+      handles:     false,
+
+      onChange:    Prototype.emptyFunction,
+      onUpdate:    Prototype.emptyFunction
+    }, arguments[1] || { });
+
+    // clear any old sortable with same element
+    this.destroy(element);
+
+    // build options for the draggables
+    var options_for_draggable = {
+      revert:      true,
+      quiet:       options.quiet,
+      scroll:      options.scroll,
+      scrollSpeed: options.scrollSpeed,
+      scrollSensitivity: options.scrollSensitivity,
+      delay:       options.delay,
+      ghosting:    options.ghosting,
+      constraint:  options.constraint,
+      handle:      options.handle };
+
+    if(options.starteffect)
+      options_for_draggable.starteffect = options.starteffect;
+
+    if(options.reverteffect)
+      options_for_draggable.reverteffect = options.reverteffect;
+    else
+      if(options.ghosting) options_for_draggable.reverteffect = function(element) {
+        element.style.top  = 0;
+        element.style.left = 0;
+      };
+
+    if(options.endeffect)
+      options_for_draggable.endeffect = options.endeffect;
+
+    if(options.zindex)
+      options_for_draggable.zindex = options.zindex;
+
+    // build options for the droppables
+    var options_for_droppable = {
+      overlap:     options.overlap,
+      containment: options.containment,
+      tree:        options.tree,
+      hoverclass:  options.hoverclass,
+      onHover:     Sortable.onHover
+    };
+
+    var options_for_tree = {
+      onHover:      Sortable.onEmptyHover,
+      overlap:      options.overlap,
+      containment:  options.containment,
+      hoverclass:   options.hoverclass
+    };
+
+    // fix for gecko engine
+    Element.cleanWhitespace(element);
+
+    options.draggables = [];
+    options.droppables = [];
+
+    // drop on empty handling
+    if(options.dropOnEmpty || options.tree) {
+      Droppables.add(element, options_for_tree);
+      options.droppables.push(element);
+    }
+
+    (options.elements || this.findElements(element, options) || []).each( function(e,i) {
+      var handle = options.handles ? $(options.handles[i]) :
+        (options.handle ? $(e).select('.' + options.handle)[0] : e);
+      options.draggables.push(
+        new Draggable(e, Object.extend(options_for_draggable, { handle: handle })));
+      Droppables.add(e, options_for_droppable);
+      if(options.tree) e.treeNode = element;
+      options.droppables.push(e);
+    });
+
+    if(options.tree) {
+      (Sortable.findTreeElements(element, options) || []).each( function(e) {
+        Droppables.add(e, options_for_tree);
+        e.treeNode = element;
+        options.droppables.push(e);
+      });
+    }
+
+    // keep reference
+    this.sortables[element.id] = options;
+
+    // for onupdate
+    Draggables.addObserver(new SortableObserver(element, options.onUpdate));
+
+  },
+
+  // return all suitable-for-sortable elements in a guaranteed order
+  findElements: function(element, options) {
+    return Element.findChildren(
+      element, options.only, options.tree ? true : false, options.tag);
+  },
+
+  findTreeElements: function(element, options) {
+    return Element.findChildren(
+      element, options.only, options.tree ? true : false, options.treeTag);
+  },
+
+  onHover: function(element, dropon, overlap) {
+    if(Element.isParent(dropon, element)) return;
+
+    if(overlap > .33 && overlap < .66 && Sortable.options(dropon).tree) {
+      return;
+    } else if(overlap>0.5) {
+      Sortable.mark(dropon, 'before');
+      if(dropon.previousSibling != element) {
+        var oldParentNode = element.parentNode;
+        element.style.visibility = "hidden"; // fix gecko rendering
+        dropon.parentNode.insertBefore(element, dropon);
+        if(dropon.parentNode!=oldParentNode)
+          Sortable.options(oldParentNode).onChange(element);
+        Sortable.options(dropon.parentNode).onChange(element);
+      }
+    } else {
+      Sortable.mark(dropon, 'after');
+      var nextElement = dropon.nextSibling || null;
+      if(nextElement != element) {
+        var oldParentNode = element.parentNode;
+        element.style.visibility = "hidden"; // fix gecko rendering
+        dropon.parentNode.insertBefore(element, nextElement);
+        if(dropon.parentNode!=oldParentNode)
+          Sortable.options(oldParentNode).onChange(element);
+        Sortable.options(dropon.parentNode).onChange(element);
+      }
+    }
+  },
+
+  onEmptyHover: function(element, dropon, overlap) {
+    var oldParentNode = element.parentNode;
+    var droponOptions = Sortable.options(dropon);
+
+    if(!Element.isParent(dropon, element)) {
+      var index;
+
+      var children = Sortable.findElements(dropon, {tag: droponOptions.tag, only: droponOptions.only});
+      var child = null;
+
+      if(children) {
+        var offset = Element.offsetSize(dropon, droponOptions.overlap) * (1.0 - overlap);
+
+        for (index = 0; index < children.length; index += 1) {
+          if (offset - Element.offsetSize (children[index], droponOptions.overlap) >= 0) {
+            offset -= Element.offsetSize (children[index], droponOptions.overlap);
+          } else if (offset - (Element.offsetSize (children[index], droponOptions.overlap) / 2) >= 0) {
+            child = index + 1 < children.length ? children[index + 1] : null;
+            break;
+          } else {
+            child = children[index];
+            break;
+          }
+        }
+      }
+
+      dropon.insertBefore(element, child);
+
+      Sortable.options(oldParentNode).onChange(element);
+      droponOptions.onChange(element);
+    }
+  },
+
+  unmark: function() {
+    if(Sortable._marker) Sortable._marker.hide();
+  },
+
+  mark: function(dropon, position) {
+    // mark on ghosting only
+    var sortable = Sortable.options(dropon.parentNode);
+    if(sortable && !sortable.ghosting) return;
+
+    if(!Sortable._marker) {
+      Sortable._marker =
+        ($('dropmarker') || Element.extend(document.createElement('DIV'))).
+          hide().addClassName('dropmarker').setStyle({position:'absolute'});
+      document.getElementsByTagName("body").item(0).appendChild(Sortable._marker);
+    }
+    var offsets = Position.cumulativeOffset(dropon);
+    Sortable._marker.setStyle({left: offsets[0]+'px', top: offsets[1] + 'px'});
+
+    if(position=='after')
+      if(sortable.overlap == 'horizontal')
+        Sortable._marker.setStyle({left: (offsets[0]+dropon.clientWidth) + 'px'});
+      else
+        Sortable._marker.setStyle({top: (offsets[1]+dropon.clientHeight) + 'px'});
+
+    Sortable._marker.show();
+  },
+
+  _tree: function(element, options, parent) {
+    var children = Sortable.findElements(element, options) || [];
+
+    for (var i = 0; i < children.length; ++i) {
+      var match = children[i].id.match(options.format);
+
+      if (!match) continue;
+
+      var child = {
+        id: encodeURIComponent(match ? match[1] : null),
+        element: element,
+        parent: parent,
+        children: [],
+        position: parent.children.length,
+        container: $(children[i]).down(options.treeTag)
+      };
+
+      /* Get the element containing the children and recurse over it */
+      if (child.container)
+        this._tree(child.container, options, child);
+
+      parent.children.push (child);
+    }
+
+    return parent;
+  },
+
+  tree: function(element) {
+    element = $(element);
+    var sortableOptions = this.options(element);
+    var options = Object.extend({
+      tag: sortableOptions.tag,
+      treeTag: sortableOptions.treeTag,
+      only: sortableOptions.only,
+      name: element.id,
+      format: sortableOptions.format
+    }, arguments[1] || { });
+
+    var root = {
+      id: null,
+      parent: null,
+      children: [],
+      container: element,
+      position: 0
+    };
+
+    return Sortable._tree(element, options, root);
+  },
+
+  /* Construct a [i] index for a particular node */
+  _constructIndex: function(node) {
+    var index = '';
+    do {
+      if (node.id) index = '[' + node.position + ']' + index;
+    } while ((node = node.parent) != null);
+    return index;
+  },
+
+  sequence: function(element) {
+    element = $(element);
+    var options = Object.extend(this.options(element), arguments[1] || { });
+
+    return $(this.findElements(element, options) || []).map( function(item) {
+      return item.id.match(options.format) ? item.id.match(options.format)[1] : '';
+    });
+  },
+
+  setSequence: function(element, new_sequence) {
+    element = $(element);
+    var options = Object.extend(this.options(element), arguments[2] || { });
+
+    var nodeMap = { };
+    this.findElements(element, options).each( function(n) {
+        if (n.id.match(options.format))
+            nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode];
+        n.parentNode.removeChild(n);
+    });
+
+    new_sequence.each(function(ident) {
+      var n = nodeMap[ident];
+      if (n) {
+        n[1].appendChild(n[0]);
+        delete nodeMap[ident];
+      }
+    });
+  },
+
+  serialize: function(element) {
+    element = $(element);
+    var options = Object.extend(Sortable.options(element), arguments[1] || { });
+    var name = encodeURIComponent(
+      (arguments[1] && arguments[1].name) ? arguments[1].name : element.id);
+
+    if (options.tree) {
+      return Sortable.tree(element, arguments[1]).children.map( function (item) {
+        return [name + Sortable._constructIndex(item) + "[id]=" +
+                encodeURIComponent(item.id)].concat(item.children.map(arguments.callee));
+      }).flatten().join('&');
+    } else {
+      return Sortable.sequence(element, arguments[1]).map( function(item) {
+        return name + "[]=" + encodeURIComponent(item);
+      }).join('&');
+    }
+  }
+};
+
+// Returns true if child is contained within element
+Element.isParent = function(child, element) {
+  if (!child.parentNode || child == element) return false;
+  if (child.parentNode == element) return true;
+  return Element.isParent(child.parentNode, element);
+};
+
+Element.findChildren = function(element, only, recursive, tagName) {
+  if(!element.hasChildNodes()) return null;
+  tagName = tagName.toUpperCase();
+  if(only) only = [only].flatten();
+  var elements = [];
+  $A(element.childNodes).each( function(e) {
+    if(e.tagName && e.tagName.toUpperCase()==tagName &&
+      (!only || (Element.classNames(e).detect(function(v) { return only.include(v) }))))
+        elements.push(e);
+    if(recursive) {
+      var grandchildren = Element.findChildren(e, only, recursive, tagName);
+      if(grandchildren) elements.push(grandchildren);
+    }
+  });
+
+  return (elements.length>0 ? elements.flatten() : []);
+};
+
+Element.offsetSize = function (element, type) {
+  return element['offset' + ((type=='vertical' || type=='height') ? 'Height' : 'Width')];
+};
Index: /ruby/tags/release-0.5.0/public/javascripts/effects.js
===================================================================
--- /ruby/tags/release-0.5.0/public/javascripts/effects.js	(revision 367)
+++ /ruby/tags/release-0.5.0/public/javascripts/effects.js	(revision 367)
@@ -0,0 +1,1128 @@
+// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+// Contributors:
+//  Justin Palmer (http://encytemedia.com/)
+//  Mark Pilgrim (http://diveintomark.org/)
+//  Martin Bialasinki
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+// converts rgb() and #xxx to #xxxxxx format,
+// returns self (or first argument) if not convertable
+String.prototype.parseColor = function() {
+  var color = '#';
+  if (this.slice(0,4) == 'rgb(') {
+    var cols = this.slice(4,this.length-1).split(',');
+    var i=0; do { color += parseInt(cols[i]).toColorPart() } while (++i<3);
+  } else {
+    if (this.slice(0,1) == '#') {
+      if (this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase();
+      if (this.length==7) color = this.toLowerCase();
+    }
+  }
+  return (color.length==7 ? color : (arguments[0] || this));
+};
+
+/*--------------------------------------------------------------------------*/
+
+Element.collectTextNodes = function(element) {
+  return $A($(element).childNodes).collect( function(node) {
+    return (node.nodeType==3 ? node.nodeValue :
+      (node.hasChildNodes() ? Element.collectTextNodes(node) : ''));
+  }).flatten().join('');
+};
+
+Element.collectTextNodesIgnoreClass = function(element, className) {
+  return $A($(element).childNodes).collect( function(node) {
+    return (node.nodeType==3 ? node.nodeValue :
+      ((node.hasChildNodes() && !Element.hasClassName(node,className)) ?
+        Element.collectTextNodesIgnoreClass(node, className) : ''));
+  }).flatten().join('');
+};
+
+Element.setContentZoom = function(element, percent) {
+  element = $(element);
+  element.setStyle({fontSize: (percent/100) + 'em'});
+  if (Prototype.Browser.WebKit) window.scrollBy(0,0);
+  return element;
+};
+
+Element.getInlineOpacity = function(element){
+  return $(element).style.opacity || '';
+};
+
+Element.forceRerendering = function(element) {
+  try {
+    element = $(element);
+    var n = document.createTextNode(' ');
+    element.appendChild(n);
+    element.removeChild(n);
+  } catch(e) { }
+};
+
+/*--------------------------------------------------------------------------*/
+
+var Effect = {
+  _elementDoesNotExistError: {
+    name: 'ElementDoesNotExistError',
+    message: 'The specified DOM element does not exist, but is required for this effect to operate'
+  },
+  Transitions: {
+    linear: Prototype.K,
+    sinoidal: function(pos) {
+      return (-Math.cos(pos*Math.PI)/2) + .5;
+    },
+    reverse: function(pos) {
+      return 1-pos;
+    },
+    flicker: function(pos) {
+      var pos = ((-Math.cos(pos*Math.PI)/4) + .75) + Math.random()/4;
+      return pos > 1 ? 1 : pos;
+    },
+    wobble: function(pos) {
+      return (-Math.cos(pos*Math.PI*(9*pos))/2) + .5;
+    },
+    pulse: function(pos, pulses) {
+      return (-Math.cos((pos*((pulses||5)-.5)*2)*Math.PI)/2) + .5;
+    },
+    spring: function(pos) {
+      return 1 - (Math.cos(pos * 4.5 * Math.PI) * Math.exp(-pos * 6));
+    },
+    none: function(pos) {
+      return 0;
+    },
+    full: function(pos) {
+      return 1;
+    }
+  },
+  DefaultOptions: {
+    duration:   1.0,   // seconds
+    fps:        100,   // 100= assume 66fps max.
+    sync:       false, // true for combining
+    from:       0.0,
+    to:         1.0,
+    delay:      0.0,
+    queue:      'parallel'
+  },
+  tagifyText: function(element) {
+    var tagifyStyle = 'position:relative';
+    if (Prototype.Browser.IE) tagifyStyle += ';zoom:1';
+
+    element = $(element);
+    $A(element.childNodes).each( function(child) {
+      if (child.nodeType==3) {
+        child.nodeValue.toArray().each( function(character) {
+          element.insertBefore(
+            new Element('span', {style: tagifyStyle}).update(
+              character == ' ' ? String.fromCharCode(160) : character),
+              child);
+        });
+        Element.remove(child);
+      }
+    });
+  },
+  multiple: function(element, effect) {
+    var elements;
+    if (((typeof element == 'object') ||
+        Object.isFunction(element)) &&
+       (element.length))
+      elements = element;
+    else
+      elements = $(element).childNodes;
+
+    var options = Object.extend({
+      speed: 0.1,
+      delay: 0.0
+    }, arguments[2] || { });
+    var masterDelay = options.delay;
+
+    $A(elements).each( function(element, index) {
+      new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay }));
+    });
+  },
+  PAIRS: {
+    'slide':  ['SlideDown','SlideUp'],
+    'blind':  ['BlindDown','BlindUp'],
+    'appear': ['Appear','Fade']
+  },
+  toggle: function(element, effect) {
+    element = $(element);
+    effect = (effect || 'appear').toLowerCase();
+    var options = Object.extend({
+      queue: { position:'end', scope:(element.id || 'global'), limit: 1 }
+    }, arguments[2] || { });
+    Effect[element.visible() ?
+      Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options);
+  }
+};
+
+Effect.DefaultOptions.transition = Effect.Transitions.sinoidal;
+
+/* ------------- core effects ------------- */
+
+Effect.ScopedQueue = Class.create(Enumerable, {
+  initialize: function() {
+    this.effects  = [];
+    this.interval = null;
+  },
+  _each: function(iterator) {
+    this.effects._each(iterator);
+  },
+  add: function(effect) {
+    var timestamp = new Date().getTime();
+
+    var position = Object.isString(effect.options.queue) ?
+      effect.options.queue : effect.options.queue.position;
+
+    switch(position) {
+      case 'front':
+        // move unstarted effects after this effect
+        this.effects.findAll(function(e){ return e.state=='idle' }).each( function(e) {
+            e.startOn  += effect.finishOn;
+            e.finishOn += effect.finishOn;
+          });
+        break;
+      case 'with-last':
+        timestamp = this.effects.pluck('startOn').max() || timestamp;
+        break;
+      case 'end':
+        // start effect after last queued effect has finished
+        timestamp = this.effects.pluck('finishOn').max() || timestamp;
+        break;
+    }
+
+    effect.startOn  += timestamp;
+    effect.finishOn += timestamp;
+
+    if (!effect.options.queue.limit || (this.effects.length < effect.options.queue.limit))
+      this.effects.push(effect);
+
+    if (!this.interval)
+      this.interval = setInterval(this.loop.bind(this), 15);
+  },
+  remove: function(effect) {
+    this.effects = this.effects.reject(function(e) { return e==effect });
+    if (this.effects.length == 0) {
+      clearInterval(this.interval);
+      this.interval = null;
+    }
+  },
+  loop: function() {
+    var timePos = new Date().getTime();
+    for(var i=0, len=this.effects.length;i<len;i++)
+      this.effects[i] && this.effects[i].loop(timePos);
+  }
+});
+
+Effect.Queues = {
+  instances: $H(),
+  get: function(queueName) {
+    if (!Object.isString(queueName)) return queueName;
+
+    return this.instances.get(queueName) ||
+      this.instances.set(queueName, new Effect.ScopedQueue());
+  }
+};
+Effect.Queue = Effect.Queues.get('global');
+
+Effect.Base = Class.create({
+  position: null,
+  start: function(options) {
+    function codeForEvent(options,eventName){
+      return (
+        (options[eventName+'Internal'] ? 'this.options.'+eventName+'Internal(this);' : '') +
+        (options[eventName] ? 'this.options.'+eventName+'(this);' : '')
+      );
+    }
+    if (options && options.transition === false) options.transition = Effect.Transitions.linear;
+    this.options      = Object.extend(Object.extend({ },Effect.DefaultOptions), options || { });
+    this.currentFrame = 0;
+    this.state        = 'idle';
+    this.startOn      = this.options.delay*1000;
+    this.finishOn     = this.startOn+(this.options.duration*1000);
+    this.fromToDelta  = this.options.to-this.options.from;
+    this.totalTime    = this.finishOn-this.startOn;
+    this.totalFrames  = this.options.fps*this.options.duration;
+
+    this.render = (function() {
+      function dispatch(effect, eventName) {
+        if (effect.options[eventName + 'Internal'])
+          effect.options[eventName + 'Internal'](effect);
+        if (effect.options[eventName])
+          effect.options[eventName](effect);
+      }
+
+      return function(pos) {
+        if (this.state === "idle") {
+          this.state = "running";
+          dispatch(this, 'beforeSetup');
+          if (this.setup) this.setup();
+          dispatch(this, 'afterSetup');
+        }
+        if (this.state === "running") {
+          pos = (this.options.transition(pos) * this.fromToDelta) + this.options.from;
+          this.position = pos;
+          dispatch(this, 'beforeUpdate');
+          if (this.update) this.update(pos);
+          dispatch(this, 'afterUpdate');
+        }
+      };
+    })();
+
+    this.event('beforeStart');
+    if (!this.options.sync)
+      Effect.Queues.get(Object.isString(this.options.queue) ?
+        'global' : this.options.queue.scope).add(this);
+  },
+  loop: function(timePos) {
+    if (timePos >= this.startOn) {
+      if (timePos >= this.finishOn) {
+        this.render(1.0);
+        this.cancel();
+        this.event('beforeFinish');
+        if (this.finish) this.finish();
+        this.event('afterFinish');
+        return;
+      }
+      var pos   = (timePos - this.startOn) / this.totalTime,
+          frame = (pos * this.totalFrames).round();
+      if (frame > this.currentFrame) {
+        this.render(pos);
+        this.currentFrame = frame;
+      }
+    }
+  },
+  cancel: function() {
+    if (!this.options.sync)
+      Effect.Queues.get(Object.isString(this.options.queue) ?
+        'global' : this.options.queue.scope).remove(this);
+    this.state = 'finished';
+  },
+  event: function(eventName) {
+    if (this.options[eventName + 'Internal']) this.options[eventName + 'Internal'](this);
+    if (this.options[eventName]) this.options[eventName](this);
+  },
+  inspect: function() {
+    var data = $H();
+    for(property in this)
+      if (!Object.isFunction(this[property])) data.set(property, this[property]);
+    return '#<Effect:' + data.inspect() + ',options:' + $H(this.options).inspect() + '>';
+  }
+});
+
+Effect.Parallel = Class.create(Effect.Base, {
+  initialize: function(effects) {
+    this.effects = effects || [];
+    this.start(arguments[1]);
+  },
+  update: function(position) {
+    this.effects.invoke('render', position);
+  },
+  finish: function(position) {
+    this.effects.each( function(effect) {
+      effect.render(1.0);
+      effect.cancel();
+      effect.event('beforeFinish');
+      if (effect.finish) effect.finish(position);
+      effect.event('afterFinish');
+    });
+  }
+});
+
+Effect.Tween = Class.create(Effect.Base, {
+  initialize: function(object, from, to) {
+    object = Object.isString(object) ? $(object) : object;
+    var args = $A(arguments), method = args.last(),
+      options = args.length == 5 ? args[3] : null;
+    this.method = Object.isFunction(method) ? method.bind(object) :
+      Object.isFunction(object[method]) ? object[method].bind(object) :
+      function(value) { object[method] = value };
+    this.start(Object.extend({ from: from, to: to }, options || { }));
+  },
+  update: function(position) {
+    this.method(position);
+  }
+});
+
+Effect.Event = Class.create(Effect.Base, {
+  initialize: function() {
+    this.start(Object.extend({ duration: 0 }, arguments[0] || { }));
+  },
+  update: Prototype.emptyFunction
+});
+
+Effect.Opacity = Class.create(Effect.Base, {
+  initialize: function(element) {
+    this.element = $(element);
+    if (!this.element) throw(Effect._elementDoesNotExistError);
+    // make this work on IE on elements without 'layout'
+    if (Prototype.Browser.IE && (!this.element.currentStyle.hasLayout))
+      this.element.setStyle({zoom: 1});
+    var options = Object.extend({
+      from: this.element.getOpacity() || 0.0,
+      to:   1.0
+    }, arguments[1] || { });
+    this.start(options);
+  },
+  update: function(position) {
+    this.element.setOpacity(position);
+  }
+});
+
+Effect.Move = Class.create(Effect.Base, {
+  initialize: function(element) {
+    this.element = $(element);
+    if (!this.element) throw(Effect._elementDoesNotExistError);
+    var options = Object.extend({
+      x:    0,
+      y:    0,
+      mode: 'relative'
+    }, arguments[1] || { });
+    this.start(options);
+  },
+  setup: function() {
+    this.element.makePositioned();
+    this.originalLeft = parseFloat(this.element.getStyle('left') || '0');
+    this.originalTop  = parseFloat(this.element.getStyle('top')  || '0');
+    if (this.options.mode == 'absolute') {
+      this.options.x = this.options.x - this.originalLeft;
+      this.options.y = this.options.y - this.originalTop;
+    }
+  },
+  update: function(position) {
+    this.element.setStyle({
+      left: (this.options.x  * position + this.originalLeft).round() + 'px',
+      top:  (this.options.y  * position + this.originalTop).round()  + 'px'
+    });
+  }
+});
+
+// for backwards compatibility
+Effect.MoveBy = function(element, toTop, toLeft) {
+  return new Effect.Move(element,
+    Object.extend({ x: toLeft, y: toTop }, arguments[3] || { }));
+};
+
+Effect.Scale = Class.create(Effect.Base, {
+  initialize: function(element, percent) {
+    this.element = $(element);
+    if (!this.element) throw(Effect._elementDoesNotExistError);
+    var options = Object.extend({
+      scaleX: true,
+      scaleY: true,
+      scaleContent: true,
+      scaleFromCenter: false,
+      scaleMode: 'box',        // 'box' or 'contents' or { } with provided values
+      scaleFrom: 100.0,
+      scaleTo:   percent
+    }, arguments[2] || { });
+    this.start(options);
+  },
+  setup: function() {
+    this.restoreAfterFinish = this.options.restoreAfterFinish || false;
+    this.elementPositioning = this.element.getStyle('position');
+
+    this.originalStyle = { };
+    ['top','left','width','height','fontSize'].each( function(k) {
+      this.originalStyle[k] = this.element.style[k];
+    }.bind(this));
+
+    this.originalTop  = this.element.offsetTop;
+    this.originalLeft = this.element.offsetLeft;
+
+    var fontSize = this.element.getStyle('font-size') || '100%';
+    ['em','px','%','pt'].each( function(fontSizeType) {
+      if (fontSize.indexOf(fontSizeType)>0) {
+        this.fontSize     = parseFloat(fontSize);
+        this.fontSizeType = fontSizeType;
+      }
+    }.bind(this));
+
+    this.factor = (this.options.scaleTo - this.options.scaleFrom)/100;
+
+    this.dims = null;
+    if (this.options.scaleMode=='box')
+      this.dims = [this.element.offsetHeight, this.element.offsetWidth];
+    if (/^content/.test(this.options.scaleMode))
+      this.dims = [this.element.scrollHeight, this.element.scrollWidth];
+    if (!this.dims)
+      this.dims = [this.options.scaleMode.originalHeight,
+                   this.options.scaleMode.originalWidth];
+  },
+  update: function(position) {
+    var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position);
+    if (this.options.scaleContent && this.fontSize)
+      this.element.setStyle({fontSize: this.fontSize * currentScale + this.fontSizeType });
+    this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale);
+  },
+  finish: function(position) {
+    if (this.restoreAfterFinish) this.element.setStyle(this.originalStyle);
+  },
+  setDimensions: function(height, width) {
+    var d = { };
+    if (this.options.scaleX) d.width = width.round() + 'px';
+    if (this.options.scaleY) d.height = height.round() + 'px';
+    if (this.options.scaleFromCenter) {
+      var topd  = (height - this.dims[0])/2;
+      var leftd = (width  - this.dims[1])/2;
+      if (this.elementPositioning == 'absolute') {
+        if (this.options.scaleY) d.top = this.originalTop-topd + 'px';
+        if (this.options.scaleX) d.left = this.originalLeft-leftd + 'px';
+      } else {
+        if (this.options.scaleY) d.top = -topd + 'px';
+        if (this.options.scaleX) d.left = -leftd + 'px';
+      }
+    }
+    this.element.setStyle(d);
+  }
+});
+
+Effect.Highlight = Class.create(Effect.Base, {
+  initialize: function(element) {
+    this.element = $(element);
+    if (!this.element) throw(Effect._elementDoesNotExistError);
+    var options = Object.extend({ startcolor: '#ffff99' }, arguments[1] || { });
+    this.start(options);
+  },
+  setup: function() {
+    // Prevent executing on elements not in the layout flow
+    if (this.element.getStyle('display')=='none') { this.cancel(); return; }
+    // Disable background image during the effect
+    this.oldStyle = { };
+    if (!this.options.keepBackgroundImage) {
+      this.oldStyle.backgroundImage = this.element.getStyle('background-image');
+      this.element.setStyle({backgroundImage: 'none'});
+    }
+    if (!this.options.endcolor)
+      this.options.endcolor = this.element.getStyle('background-color').parseColor('#ffffff');
+    if (!this.options.restorecolor)
+      this.options.restorecolor = this.element.getStyle('background-color');
+    // init color calculations
+    this._base  = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this));
+    this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this));
+  },
+  update: function(position) {
+    this.element.setStyle({backgroundColor: $R(0,2).inject('#',function(m,v,i){
+      return m+((this._base[i]+(this._delta[i]*position)).round().toColorPart()); }.bind(this)) });
+  },
+  finish: function() {
+    this.element.setStyle(Object.extend(this.oldStyle, {
+      backgroundColor: this.options.restorecolor
+    }));
+  }
+});
+
+Effect.ScrollTo = function(element) {
+  var options = arguments[1] || { },
+  scrollOffsets = document.viewport.getScrollOffsets(),
+  elementOffsets = $(element).cumulativeOffset();
+
+  if (options.offset) elementOffsets[1] += options.offset;
+
+  return new Effect.Tween(null,
+    scrollOffsets.top,
+    elementOffsets[1],
+    options,
+    function(p){ scrollTo(scrollOffsets.left, p.round()); }
+  );
+};
+
+/* ------------- combination effects ------------- */
+
+Effect.Fade = function(element) {
+  element = $(element);
+  var oldOpacity = element.getInlineOpacity();
+  var options = Object.extend({
+    from: element.getOpacity() || 1.0,
+    to:   0.0,
+    afterFinishInternal: function(effect) {
+      if (effect.options.to!=0) return;
+      effect.element.hide().setStyle({opacity: oldOpacity});
+    }
+  }, arguments[1] || { });
+  return new Effect.Opacity(element,options);
+};
+
+Effect.Appear = function(element) {
+  element = $(element);
+  var options = Object.extend({
+  from: (element.getStyle('display') == 'none' ? 0.0 : element.getOpacity() || 0.0),
+  to:   1.0,
+  // force Safari to render floated elements properly
+  afterFinishInternal: function(effect) {
+    effect.element.forceRerendering();
+  },
+  beforeSetup: function(effect) {
+    effect.element.setOpacity(effect.options.from).show();
+  }}, arguments[1] || { });
+  return new Effect.Opacity(element,options);
+};
+
+Effect.Puff = function(element) {
+  element = $(element);
+  var oldStyle = {
+    opacity: element.getInlineOpacity(),
+    position: element.getStyle('position'),
+    top:  element.style.top,
+    left: element.style.left,
+    width: element.style.width,
+    height: element.style.height
+  };
+  return new Effect.Parallel(
+   [ new Effect.Scale(element, 200,
+      { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }),
+     new Effect.Opacity(element, { sync: true, to: 0.0 } ) ],
+     Object.extend({ duration: 1.0,
+      beforeSetupInternal: function(effect) {
+        Position.absolutize(effect.effects[0].element);
+      },
+      afterFinishInternal: function(effect) {
+         effect.effects[0].element.hide().setStyle(oldStyle); }
+     }, arguments[1] || { })
+   );
+};
+
+Effect.BlindUp = function(element) {
+  element = $(element);
+  element.makeClipping();
+  return new Effect.Scale(element, 0,
+    Object.extend({ scaleContent: false,
+      scaleX: false,
+      restoreAfterFinish: true,
+      afterFinishInternal: function(effect) {
+        effect.element.hide().undoClipping();
+      }
+    }, arguments[1] || { })
+  );
+};
+
+Effect.BlindDown = function(element) {
+  element = $(element);
+  var elementDimensions = element.getDimensions();
+  return new Effect.Scale(element, 100, Object.extend({
+    scaleContent: false,
+    scaleX: false,
+    scaleFrom: 0,
+    scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
+    restoreAfterFinish: true,
+    afterSetup: function(effect) {
+      effect.element.makeClipping().setStyle({height: '0px'}).show();
+    },
+    afterFinishInternal: function(effect) {
+      effect.element.undoClipping();
+    }
+  }, arguments[1] || { }));
+};
+
+Effect.SwitchOff = function(element) {
+  element = $(element);
+  var oldOpacity = element.getInlineOpacity();
+  return new Effect.Appear(element, Object.extend({
+    duration: 0.4,
+    from: 0,
+    transition: Effect.Transitions.flicker,
+    afterFinishInternal: function(effect) {
+      new Effect.Scale(effect.element, 1, {
+        duration: 0.3, scaleFromCenter: true,
+        scaleX: false, scaleContent: false, restoreAfterFinish: true,
+        beforeSetup: function(effect) {
+          effect.element.makePositioned().makeClipping();
+        },
+        afterFinishInternal: function(effect) {
+          effect.element.hide().undoClipping().undoPositioned().setStyle({opacity: oldOpacity});
+        }
+      });
+    }
+  }, arguments[1] || { }));
+};
+
+Effect.DropOut = function(element) {
+  element = $(element);
+  var oldStyle = {
+    top: element.getStyle('top'),
+    left: element.getStyle('left'),
+    opacity: element.getInlineOpacity() };
+  return new Effect.Parallel(
+    [ new Effect.Move(element, {x: 0, y: 100, sync: true }),
+      new Effect.Opacity(element, { sync: true, to: 0.0 }) ],
+    Object.extend(
+      { duration: 0.5,
+        beforeSetup: function(effect) {
+          effect.effects[0].element.makePositioned();
+        },
+        afterFinishInternal: function(effect) {
+          effect.effects[0].element.hide().undoPositioned().setStyle(oldStyle);
+        }
+      }, arguments[1] || { }));
+};
+
+Effect.Shake = function(element) {
+  element = $(element);
+  var options = Object.extend({
+    distance: 20,
+    duration: 0.5
+  }, arguments[1] || {});
+  var distance = parseFloat(options.distance);
+  var split = parseFloat(options.duration) / 10.0;
+  var oldStyle = {
+    top: element.getStyle('top'),
+    left: element.getStyle('left') };
+    return new Effect.Move(element,
+      { x:  distance, y: 0, duration: split, afterFinishInternal: function(effect) {
+    new Effect.Move(effect.element,
+      { x: -distance*2, y: 0, duration: split*2,  afterFinishInternal: function(effect) {
+    new Effect.Move(effect.element,
+      { x:  distance*2, y: 0, duration: split*2,  afterFinishInternal: function(effect) {
+    new Effect.Move(effect.element,
+      { x: -distance*2, y: 0, duration: split*2,  afterFinishInternal: function(effect) {
+    new Effect.Move(effect.element,
+      { x:  distance*2, y: 0, duration: split*2,  afterFinishInternal: function(effect) {
+    new Effect.Move(effect.element,
+      { x: -distance, y: 0, duration: split, afterFinishInternal: function(effect) {
+        effect.element.undoPositioned().setStyle(oldStyle);
+  }}); }}); }}); }}); }}); }});
+};
+
+Effect.SlideDown = function(element) {
+  element = $(element).cleanWhitespace();
+  // SlideDown need to have the content of the element wrapped in a container element with fixed height!
+  var oldInnerBottom = element.down().getStyle('bottom');
+  var elementDimensions = element.getDimensions();
+  return new Effect.Scale(element, 100, Object.extend({
+    scaleContent: false,
+    scaleX: false,
+    scaleFrom: window.opera ? 0 : 1,
+    scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
+    restoreAfterFinish: true,
+    afterSetup: function(effect) {
+      effect.element.makePositioned();
+      effect.element.down().makePositioned();
+      if (window.opera) effect.element.setStyle({top: ''});
+      effect.element.makeClipping().setStyle({height: '0px'}).show();
+    },
+    afterUpdateInternal: function(effect) {
+      effect.element.down().setStyle({bottom:
+        (effect.dims[0] - effect.element.clientHeight) + 'px' });
+    },
+    afterFinishInternal: function(effect) {
+      effect.element.undoClipping().undoPositioned();
+      effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); }
+    }, arguments[1] || { })
+  );
+};
+
+Effect.SlideUp = function(element) {
+  element = $(element).cleanWhitespace();
+  var oldInnerBottom = element.down().getStyle('bottom');
+  var elementDimensions = element.getDimensions();
+  return new Effect.Scale(element, window.opera ? 0 : 1,
+   Object.extend({ scaleContent: false,
+    scaleX: false,
+    scaleMode: 'box',
+    scaleFrom: 100,
+    scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
+    restoreAfterFinish: true,
+    afterSetup: function(effect) {
+      effect.element.makePositioned();
+      effect.element.down().makePositioned();
+      if (window.opera) effect.element.setStyle({top: ''});
+      effect.element.makeClipping().show();
+    },
+    afterUpdateInternal: function(effect) {
+      effect.element.down().setStyle({bottom:
+        (effect.dims[0] - effect.element.clientHeight) + 'px' });
+    },
+    afterFinishInternal: function(effect) {
+      effect.element.hide().undoClipping().undoPositioned();
+      effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom});
+    }
+   }, arguments[1] || { })
+  );
+};
+
+// Bug in opera makes the TD containing this element expand for a instance after finish
+Effect.Squish = function(element) {
+  return new Effect.Scale(element, window.opera ? 1 : 0, {
+    restoreAfterFinish: true,
+    beforeSetup: function(effect) {
+      effect.element.makeClipping();
+    },
+    afterFinishInternal: function(effect) {
+      effect.element.hide().undoClipping();
+    }
+  });
+};
+
+Effect.Grow = function(element) {
+  element = $(element);
+  var options = Object.extend({
+    direction: 'center',
+    moveTransition: Effect.Transitions.sinoidal,
+    scaleTransition: Effect.Transitions.sinoidal,
+    opacityTransition: Effect.Transitions.full
+  }, arguments[1] || { });
+  var oldStyle = {
+    top: element.style.top,
+    left: element.style.left,
+    height: element.style.height,
+    width: element.style.width,
+    opacity: element.getInlineOpacity() };
+
+  var dims = element.getDimensions();
+  var initialMoveX, initialMoveY;
+  var moveX, moveY;
+
+  switch (options.direction) {
+    case 'top-left':
+      initialMoveX = initialMoveY = moveX = moveY = 0;
+      break;
+    case 'top-right':
+      initialMoveX = dims.width;
+      initialMoveY = moveY = 0;
+      moveX = -dims.width;
+      break;
+    case 'bottom-left':
+      initialMoveX = moveX = 0;
+      initialMoveY = dims.height;
+      moveY = -dims.height;
+      break;
+    case 'bottom-right':
+      initialMoveX = dims.width;
+      initialMoveY = dims.height;
+      moveX = -dims.width;
+      moveY = -dims.height;
+      break;
+    case 'center':
+      initialMoveX = dims.width / 2;
+      initialMoveY = dims.height / 2;
+      moveX = -dims.width / 2;
+      moveY = -dims.height / 2;
+      break;
+  }
+
+  return new Effect.Move(element, {
+    x: initialMoveX,
+    y: initialMoveY,
+    duration: 0.01,
+    beforeSetup: function(effect) {
+      effect.element.hide().makeClipping().makePositioned();
+    },
+    afterFinishInternal: function(effect) {
+      new Effect.Parallel(
+        [ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }),
+          new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }),
+          new Effect.Scale(effect.element, 100, {
+            scaleMode: { originalHeight: dims.height, originalWidth: dims.width },
+            sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true})
+        ], Object.extend({
+             beforeSetup: function(effect) {
+               effect.effects[0].element.setStyle({height: '0px'}).show();
+             },
+             afterFinishInternal: function(effect) {
+               effect.effects[0].element.undoClipping().undoPositioned().setStyle(oldStyle);
+             }
+           }, options)
+      );
+    }
+  });
+};
+
+Effect.Shrink = function(element) {
+  element = $(element);
+  var options = Object.extend({
+    direction: 'center',
+    moveTransition: Effect.Transitions.sinoidal,
+    scaleTransition: Effect.Transitions.sinoidal,
+    opacityTransition: Effect.Transitions.none
+  }, arguments[1] || { });
+  var oldStyle = {
+    top: element.style.top,
+    left: element.style.left,
+    height: element.style.height,
+    width: element.style.width,
+    opacity: element.getInlineOpacity() };
+
+  var dims = element.getDimensions();
+  var moveX, moveY;
+
+  switch (options.direction) {
+    case 'top-left':
+      moveX = moveY = 0;
+      break;
+    case 'top-right':
+      moveX = dims.width;
+      moveY = 0;
+      break;
+    case 'bottom-left':
+      moveX = 0;
+      moveY = dims.height;
+      break;
+    case 'bottom-right':
+      moveX = dims.width;
+      moveY = dims.height;
+      break;
+    case 'center':
+      moveX = dims.width / 2;
+      moveY = dims.height / 2;
+      break;
+  }
+
+  return new Effect.Parallel(
+    [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }),
+      new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}),
+      new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition })
+    ], Object.extend({
+         beforeStartInternal: function(effect) {
+           effect.effects[0].element.makePositioned().makeClipping();
+         },
+         afterFinishInternal: function(effect) {
+           effect.effects[0].element.hide().undoClipping().undoPositioned().setStyle(oldStyle); }
+       }, options)
+  );
+};
+
+Effect.Pulsate = function(element) {
+  element = $(element);
+  var options    = arguments[1] || { },
+    oldOpacity = element.getInlineOpacity(),
+    transition = options.transition || Effect.Transitions.linear,
+    reverser   = function(pos){
+      return 1 - transition((-Math.cos((pos*(options.pulses||5)*2)*Math.PI)/2) + .5);
+    };
+
+  return new Effect.Opacity(element,
+    Object.extend(Object.extend({  duration: 2.0, from: 0,
+      afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); }
+    }, options), {transition: reverser}));
+};
+
+Effect.Fold = function(element) {
+  element = $(element);
+  var oldStyle = {
+    top: element.style.top,
+    left: element.style.left,
+    width: element.style.width,
+    height: element.style.height };
+  element.makeClipping();
+  return new Effect.Scale(element, 5, Object.extend({
+    scaleContent: false,
+    scaleX: false,
+    afterFinishInternal: function(effect) {
+    new Effect.Scale(element, 1, {
+      scaleContent: false,
+      scaleY: false,
+      afterFinishInternal: function(effect) {
+        effect.element.hide().undoClipping().setStyle(oldStyle);
+      } });
+  }}, arguments[1] || { }));
+};
+
+Effect.Morph = Class.create(Effect.Base, {
+  initialize: function(element) {
+    this.element = $(element);
+    if (!this.element) throw(Effect._elementDoesNotExistError);
+    var options = Object.extend({
+      style: { }
+    }, arguments[1] || { });
+
+    if (!Object.isString(options.style)) this.style = $H(options.style);
+    else {
+      if (options.style.include(':'))
+        this.style = options.style.parseStyle();
+      else {
+        this.element.addClassName(options.style);
+        this.style = $H(this.element.getStyles());
+        this.element.removeClassName(options.style);
+        var css = this.element.getStyles();
+        this.style = this.style.reject(function(style) {
+          return style.value == css[style.key];
+        });
+        options.afterFinishInternal = function(effect) {
+          effect.element.addClassName(effect.options.style);
+          effect.transforms.each(function(transform) {
+            effect.element.style[transform.style] = '';
+          });
+        };
+      }
+    }
+    this.start(options);
+  },
+
+  setup: function(){
+    function parseColor(color){
+      if (!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) color = '#ffffff';
+      color = color.parseColor();
+      return $R(0,2).map(function(i){
+        return parseInt( color.slice(i*2+1,i*2+3), 16 );
+      });
+    }
+    this.transforms = this.style.map(function(pair){
+      var property = pair[0], value = pair[1], unit = null;
+
+      if (value.parseColor('#zzzzzz') != '#zzzzzz') {
+        value = value.parseColor();
+        unit  = 'color';
+      } else if (property == 'opacity') {
+        value = parseFloat(value);
+        if (Prototype.Browser.IE && (!this.element.currentStyle.hasLayout))
+          this.element.setStyle({zoom: 1});
+      } else if (Element.CSS_LENGTH.test(value)) {
+          var components = value.match(/^([\+\-]?[0-9\.]+)(.*)$/);
+          value = parseFloat(components[1]);
+          unit = (components.length == 3) ? components[2] : null;
+      }
+
+      var originalValue = this.element.getStyle(property);
+      return {
+        style: property.camelize(),
+        originalValue: unit=='color' ? parseColor(originalValue) : parseFloat(originalValue || 0),
+        targetValue: unit=='color' ? parseColor(value) : value,
+        unit: unit
+      };
+    }.bind(this)).reject(function(transform){
+      return (
+        (transform.originalValue == transform.targetValue) ||
+        (
+          transform.unit != 'color' &&
+          (isNaN(transform.originalValue) || isNaN(transform.targetValue))
+        )
+      );
+    });
+  },
+  update: function(position) {
+    var style = { }, transform, i = this.transforms.length;
+    while(i--)
+      style[(transform = this.transforms[i]).style] =
+        transform.unit=='color' ? '#'+
+          (Math.round(transform.originalValue[0]+
+            (transform.targetValue[0]-transform.originalValue[0])*position)).toColorPart() +
+          (Math.round(transform.originalValue[1]+
+            (transform.targetValue[1]-transform.originalValue[1])*position)).toColorPart() +
+          (Math.round(transform.originalValue[2]+
+            (transform.targetValue[2]-transform.originalValue[2])*position)).toColorPart() :
+        (transform.originalValue +
+          (transform.targetValue - transform.originalValue) * position).toFixed(3) +
+            (transform.unit === null ? '' : transform.unit);
+    this.element.setStyle(style, true);
+  }
+});
+
+Effect.Transform = Class.create({
+  initialize: function(tracks){
+    this.tracks  = [];
+    this.options = arguments[1] || { };
+    this.addTracks(tracks);
+  },
+  addTracks: function(tracks){
+    tracks.each(function(track){
+      track = $H(track);
+      var data = track.values().first();
+      this.tracks.push($H({
+        ids:     track.keys().first(),
+        effect:  Effect.Morph,
+        options: { style: data }
+      }));
+    }.bind(this));
+    return this;
+  },
+  play: function(){
+    return new Effect.Parallel(
+      this.tracks.map(function(track){
+        var ids = track.get('ids'), effect = track.get('effect'), options = track.get('options');
+        var elements = [$(ids) || $$(ids)].flatten();
+        return elements.map(function(e){ return new effect(e, Object.extend({ sync:true }, options)) });
+      }).flatten(),
+      this.options
+    );
+  }
+});
+
+Element.CSS_PROPERTIES = $w(
+  'backgroundColor backgroundPosition borderBottomColor borderBottomStyle ' +
+  'borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth ' +
+  'borderRightColor borderRightStyle borderRightWidth borderSpacing ' +
+  'borderTopColor borderTopStyle borderTopWidth bottom clip color ' +
+  'fontSize fontWeight height left letterSpacing lineHeight ' +
+  'marginBottom marginLeft marginRight marginTop markerOffset maxHeight '+
+  'maxWidth minHeight minWidth opacity outlineColor outlineOffset ' +
+  'outlineWidth paddingBottom paddingLeft paddingRight paddingTop ' +
+  'right textIndent top width wordSpacing zIndex');
+
+Element.CSS_LENGTH = /^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/;
+
+String.__parseStyleElement = document.createElement('div');
+String.prototype.parseStyle = function(){
+  var style, styleRules = $H();
+  if (Prototype.Browser.WebKit)
+    style = new Element('div',{style:this}).style;
+  else {
+    String.__parseStyleElement.innerHTML = '<div style="' + this + '"></div>';
+    style = String.__parseStyleElement.childNodes[0].style;
+  }
+
+  Element.CSS_PROPERTIES.each(function(property){
+    if (style[property]) styleRules.set(property, style[property]);
+  });
+
+  if (Prototype.Browser.IE && this.include('opacity'))
+    styleRules.set('opacity', this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1]);
+
+  return styleRules;
+};
+
+if (document.defaultView && document.defaultView.getComputedStyle) {
+  Element.getStyles = function(element) {
+    var css = document.defaultView.getComputedStyle($(element), null);
+    return Element.CSS_PROPERTIES.inject({ }, function(styles, property) {
+      styles[property] = css[property];
+      return styles;
+    });
+  };
+} else {
+  Element.getStyles = function(element) {
+    element = $(element);
+    var css = element.currentStyle, styles;
+    styles = Element.CSS_PROPERTIES.inject({ }, function(results, property) {
+      results[property] = css[property];
+      return results;
+    });
+    if (!styles.opacity) styles.opacity = element.getOpacity();
+    return styles;
+  };
+}
+
+Effect.Methods = {
+  morph: function(element, style) {
+    element = $(element);
+    new Effect.Morph(element, Object.extend({ style: style }, arguments[2] || { }));
+    return element;
+  },
+  visualEffect: function(element, effect, options) {
+    element = $(element);
+    var s = effect.dasherize().camelize(), klass = s.charAt(0).toUpperCase() + s.substring(1);
+    new Effect[klass](element, options);
+    return element;
+  },
+  highlight: function(element, options) {
+    element = $(element);
+    new Effect.Highlight(element, options);
+    return element;
+  }
+};
+
+$w('fade appear grow shrink fold blindUp blindDown slideUp slideDown '+
+  'pulsate shake puff squish switchOff dropOut').each(
+  function(effect) {
+    Effect.Methods[effect] = function(element, options){
+      element = $(element);
+      Effect[effect.charAt(0).toUpperCase() + effect.substring(1)](element, options);
+      return element;
+    };
+  }
+);
+
+$w('getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles').each(
+  function(f) { Effect.Methods[f] = Element[f]; }
+);
+
+Element.addMethods(Effect.Methods);
Index: /ruby/tags/release-0.5.0/public/javascripts/prototype.js
===================================================================
--- /ruby/tags/release-0.5.0/public/javascripts/prototype.js	(revision 367)
+++ /ruby/tags/release-0.5.0/public/javascripts/prototype.js	(revision 367)
@@ -0,0 +1,4320 @@
+/*  Prototype JavaScript framework, version 1.6.0.3
+ *  (c) 2005-2008 Sam Stephenson
+ *
+ *  Prototype is freely distributable under the terms of an MIT-style license.
+ *  For details, see the Prototype web site: http://www.prototypejs.org/
+ *
+ *--------------------------------------------------------------------------*/
+
+var Prototype = {
+  Version: '1.6.0.3',
+
+  Browser: {
+    IE:     !!(window.attachEvent &&
+      navigator.userAgent.indexOf('Opera') === -1),
+    Opera:  navigator.userAgent.indexOf('Opera') > -1,
+    WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,
+    Gecko:  navigator.userAgent.indexOf('Gecko') > -1 &&
+      navigator.userAgent.indexOf('KHTML') === -1,
+    MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/)
+  },
+
+  BrowserFeatures: {
+    XPath: !!document.evaluate,
+    SelectorsAPI: !!document.querySelector,
+    ElementExtensions: !!window.HTMLElement,
+    SpecificElementExtensions:
+      document.createElement('div')['__proto__'] &&
+      document.createElement('div')['__proto__'] !==
+        document.createElement('form')['__proto__']
+  },
+
+  ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
+  JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/,
+
+  emptyFunction: function() { },
+  K: function(x) { return x }
+};
+
+if (Prototype.Browser.MobileSafari)
+  Prototype.BrowserFeatures.SpecificElementExtensions = false;
+
+
+/* Based on Alex Arnell's inheritance implementation. */
+var Class = {
+  create: function() {
+    var parent = null, properties = $A(arguments);
+    if (Object.isFunction(properties[0]))
+      parent = properties.shift();
+
+    function klass() {
+      this.initialize.apply(this, arguments);
+    }
+
+    Object.extend(klass, Class.Methods);
+    klass.superclass = parent;
+    klass.subclasses = [];
+
+    if (parent) {
+      var subclass = function() { };
+      subclass.prototype = parent.prototype;
+      klass.prototype = new subclass;
+      parent.subclasses.push(klass);
+    }
+
+    for (var i = 0; i < properties.length; i++)
+      klass.addMethods(properties[i]);
+
+    if (!klass.prototype.initialize)
+      klass.prototype.initialize = Prototype.emptyFunction;
+
+    klass.prototype.constructor = klass;
+
+    return klass;
+  }
+};
+
+Class.Methods = {
+  addMethods: function(source) {
+    var ancestor   = this.superclass && this.superclass.prototype;
+    var properties = Object.keys(source);
+
+    if (!Object.keys({ toString: true }).length)
+      properties.push("toString", "valueOf");
+
+    for (var i = 0, length = properties.length; i < length; i++) {
+      var property = properties[i], value = source[property];
+      if (ancestor && Object.isFunction(value) &&
+          value.argumentNames().first() == "$super") {
+        var method = value;
+        value = (function(m) {
+          return function() { return ancestor[m].apply(this, arguments) };
+        })(property).wrap(method);
+
+        value.valueOf = method.valueOf.bind(method);
+        value.toString = method.toString.bind(method);
+      }
+      this.prototype[property] = value;
+    }
+
+    return this;
+  }
+};
+
+var Abstract = { };
+
+Object.extend = function(destination, source) {
+  for (var property in source)
+    destination[property] = source[property];
+  return destination;
+};
+
+Object.extend(Object, {
+  inspect: function(object) {
+    try {
+      if (Object.isUndefined(object)) return 'undefined';
+      if (object === null) return 'null';
+      return object.inspect ? object.inspect() : String(object);
+    } catch (e) {
+      if (e instanceof RangeError) return '...';
+      throw e;
+    }
+  },
+
+  toJSON: function(object) {
+    var type = typeof object;
+    switch (type) {
+      case 'undefined':
+      case 'function':
+      case 'unknown': return;
+      case 'boolean': return object.toString();
+    }
+
+    if (object === null) return 'null';
+    if (object.toJSON) return object.toJSON();
+    if (Object.isElement(object)) return;
+
+    var results = [];
+    for (var property in object) {
+      var value = Object.toJSON(object[property]);
+      if (!Object.isUndefined(value))
+        results.push(property.toJSON() + ': ' + value);
+    }
+
+    return '{' + results.join(', ') + '}';
+  },
+
+  toQueryString: function(object) {
+    return $H(object).toQueryString();
+  },
+
+  toHTML: function(object) {
+    return object && object.toHTML ? object.toHTML() : String.interpret(object);
+  },
+
+  keys: function(object) {
+    var keys = [];
+    for (var property in object)
+      keys.push(property);
+    return keys;
+  },
+
+  values: function(object) {
+    var values = [];
+    for (var property in object)
+      values.push(object[property]);
+    return values;
+  },
+
+  clone: function(object) {
+    return Object.extend({ }, object);
+  },
+
+  isElement: function(object) {
+    return !!(object && object.nodeType == 1);
+  },
+
+  isArray: function(object) {
+    return object != null && typeof object == "object" &&
+      'splice' in object && 'join' in object;
+  },
+
+  isHash: function(object) {
+    return object instanceof Hash;
+  },
+
+  isFunction: function(object) {
+    return typeof object == "function";
+  },
+
+  isString: function(object) {
+    return typeof object == "string";
+  },
+
+  isNumber: function(object) {
+    return typeof object == "number";
+  },
+
+  isUndefined: function(object) {
+    return typeof object == "undefined";
+  }
+});
+
+Object.extend(Function.prototype, {
+  argumentNames: function() {
+    var names = this.toString().match(/^[\s\(]*function[^(]*\(([^\)]*)\)/)[1]
+      .replace(/\s+/g, '').split(',');
+    return names.length == 1 && !names[0] ? [] : names;
+  },
+
+  bind: function() {
+    if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this;
+    var __method = this, args = $A(arguments), object = args.shift();
+    return function() {
+      return __method.apply(object, args.concat($A(arguments)));
+    }
+  },
+
+  bindAsEventListener: function() {
+    var __method = this, args = $A(arguments), object = args.shift();
+    return function(event) {
+      return __method.apply(object, [event || window.event].concat(args));
+    }
+  },
+
+  curry: function() {
+    if (!arguments.length) return this;
+    var __method = this, args = $A(arguments);
+    return function() {
+      return __method.apply(this, args.concat($A(arguments)));
+    }
+  },
+
+  delay: function() {
+    var __method = this, args = $A(arguments), timeout = args.shift() * 1000;
+    return window.setTimeout(function() {
+      return __method.apply(__method, args);
+    }, timeout);
+  },
+
+  defer: function() {
+    var args = [0.01].concat($A(arguments));
+    return this.delay.apply(this, args);
+  },
+
+  wrap: function(wrapper) {
+    var __method = this;
+    return function() {
+      return wrapper.apply(this, [__method.bind(this)].concat($A(arguments)));
+    }
+  },
+
+  methodize: function() {
+    if (this._methodized) return this._methodized;
+    var __method = this;
+    return this._methodized = function() {
+      return __method.apply(null, [this].concat($A(arguments)));
+    };
+  }
+});
+
+Date.prototype.toJSON = function() {
+  return '"' + this.getUTCFullYear() + '-' +
+    (this.getUTCMonth() + 1).toPaddedString(2) + '-' +
+    this.getUTCDate().toPaddedString(2) + 'T' +
+    this.getUTCHours().toPaddedString(2) + ':' +
+    this.getUTCMinutes().toPaddedString(2) + ':' +
+    this.getUTCSeconds().toPaddedString(2) + 'Z"';
+};
+
+var Try = {
+  these: function() {
+    var returnValue;
+
+    for (var i = 0, length = arguments.length; i < length; i++) {
+      var lambda = arguments[i];
+      try {
+        returnValue = lambda();
+        break;
+      } catch (e) { }
+    }
+
+    return returnValue;
+  }
+};
+
+RegExp.prototype.match = RegExp.prototype.test;
+
+RegExp.escape = function(str) {
+  return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
+};
+
+/*--------------------------------------------------------------------------*/
+
+var PeriodicalExecuter = Class.create({
+  initialize: function(callback, frequency) {
+    this.callback = callback;
+    this.frequency = frequency;
+    this.currentlyExecuting = false;
+
+    this.registerCallback();
+  },
+
+  registerCallback: function() {
+    this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
+  },
+
+  execute: function() {
+    this.callback(this);
+  },
+
+  stop: function() {
+    if (!this.timer) return;
+    clearInterval(this.timer);
+    this.timer = null;
+  },
+
+  onTimerEvent: function() {
+    if (!this.currentlyExecuting) {
+      try {
+        this.currentlyExecuting = true;
+        this.execute();
+      } finally {
+        this.currentlyExecuting = false;
+      }
+    }
+  }
+});
+Object.extend(String, {
+  interpret: function(value) {
+    return value == null ? '' : String(value);
+  },
+  specialChar: {
+    '\b': '\\b',
+    '\t': '\\t',
+    '\n': '\\n',
+    '\f': '\\f',
+    '\r': '\\r',
+    '\\': '\\\\'
+  }
+});
+
+Object.extend(String.prototype, {
+  gsub: function(pattern, replacement) {
+    var result = '', source = this, match;
+    replacement = arguments.callee.prepareReplacement(replacement);
+
+    while (source.length > 0) {
+      if (match = source.match(pattern)) {
+        result += source.slice(0, match.index);
+        result += String.interpret(replacement(match));
+        source  = source.slice(match.index + match[0].length);
+      } else {
+        result += source, source = '';
+      }
+    }
+    return result;
+  },
+
+  sub: function(pattern, replacement, count) {
+    replacement = this.gsub.prepareReplacement(replacement);
+    count = Object.isUndefined(count) ? 1 : count;
+
+    return this.gsub(pattern, function(match) {
+      if (--count < 0) return match[0];
+      return replacement(match);
+    });
+  },
+
+  scan: function(pattern, iterator) {
+    this.gsub(pattern, iterator);
+    return String(this);
+  },
+
+  truncate: function(length, truncation) {
+    length = length || 30;
+    truncation = Object.isUndefined(truncation) ? '...' : truncation;
+    return this.length > length ?
+      this.slice(0, length - truncation.length) + truncation : String(this);
+  },
+
+  strip: function() {
+    return this.replace(/^\s+/, '').replace(/\s+$/, '');
+  },
+
+  stripTags: function() {
+    return this.replace(/<\/?[^>]+>/gi, '');
+  },
+
+  stripScripts: function() {
+    return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
+  },
+
+  extractScripts: function() {
+    var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
+    var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
+    return (this.match(matchAll) || []).map(function(scriptTag) {
+      return (scriptTag.match(matchOne) || ['', ''])[1];
+    });
+  },
+
+  evalScripts: function() {
+    return this.extractScripts().map(function(script) { return eval(script) });
+  },
+
+  escapeHTML: function() {
+    var self = arguments.callee;
+    self.text.data = this;
+    return self.div.innerHTML;
+  },
+
+  unescapeHTML: function() {
+    var div = new Element('div');
+    div.innerHTML = this.stripTags();
+    return div.childNodes[0] ? (div.childNodes.length > 1 ?
+      $A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) :
+      div.childNodes[0].nodeValue) : '';
+  },
+
+  toQueryParams: function(separator) {
+    var match = this.strip().match(/([^?#]*)(#.*)?$/);
+    if (!match) return { };
+
+    return match[1].split(separator || '&').inject({ }, function(hash, pair) {
+      if ((pair = pair.split('='))[0]) {
+        var key = decodeURIComponent(pair.shift());
+        var value = pair.length > 1 ? pair.join('=') : pair[0];
+        if (value != undefined) value = decodeURIComponent(value);
+
+        if (key in hash) {
+          if (!Object.isArray(hash[key])) hash[key] = [hash[key]];
+          hash[key].push(value);
+        }
+        else hash[key] = value;
+      }
+      return hash;
+    });
+  },
+
+  toArray: function() {
+    return this.split('');
+  },
+
+  succ: function() {
+    return this.slice(0, this.length - 1) +
+      String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
+  },
+
+  times: function(count) {
+    return count < 1 ? '' : new Array(count + 1).join(this);
+  },
+
+  camelize: function() {
+    var parts = this.split('-'), len = parts.length;
+    if (len == 1) return parts[0];
+
+    var camelized = this.charAt(0) == '-'
+      ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
+      : parts[0];
+
+    for (var i = 1; i < len; i++)
+      camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);
+
+    return camelized;
+  },
+
+  capitalize: function() {
+    return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
+  },
+
+  underscore: function() {
+    return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase();
+  },
+
+  dasherize: function() {
+    return this.gsub(/_/,'-');
+  },
+
+  inspect: function(useDoubleQuotes) {
+    var escapedString = this.gsub(/[\x00-\x1f\\]/, function(match) {
+      var character = String.specialChar[match[0]];
+      return character ? character : '\\u00' + match[0].charCodeAt().toPaddedString(2, 16);
+    });
+    if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"';
+    return "'" + escapedString.replace(/'/g, '\\\'') + "'";
+  },
+
+  toJSON: function() {
+    return this.inspect(true);
+  },
+
+  unfilterJSON: function(filter) {
+    return this.sub(filter || Prototype.JSONFilter, '#{1}');
+  },
+
+  isJSON: function() {
+    var str = this;
+    if (str.blank()) return false;
+    str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, '');
+    return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);
+  },
+
+  evalJSON: function(sanitize) {
+    var json = this.unfilterJSON();
+    try {
+      if (!sanitize || json.isJSON()) return eval('(' + json + ')');
+    } catch (e) { }
+    throw new SyntaxError('Badly formed JSON string: ' + this.inspect());
+  },
+
+  include: function(pattern) {
+    return this.indexOf(pattern) > -1;
+  },
+
+  startsWith: function(pattern) {
+    return this.indexOf(pattern) === 0;
+  },
+
+  endsWith: function(pattern) {
+    var d = this.length - pattern.length;
+    return d >= 0 && this.lastIndexOf(pattern) === d;
+  },
+
+  empty: function() {
+    return this == '';
+  },
+
+  blank: function() {
+    return /^\s*$/.test(this);
+  },
+
+  interpolate: function(object, pattern) {
+    return new Template(this, pattern).evaluate(object);
+  }
+});
+
+if (Prototype.Browser.WebKit || Prototype.Browser.IE) Object.extend(String.prototype, {
+  escapeHTML: function() {
+    return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
+  },
+  unescapeHTML: function() {
+    return this.stripTags().replace(/&amp;/g,'&').replace(/&lt;/g,'<').replace(/&gt;/g,'>');
+  }
+});
+
+String.prototype.gsub.prepareReplacement = function(replacement) {
+  if (Object.isFunction(replacement)) return replacement;
+  var template = new Template(replacement);
+  return function(match) { return template.evaluate(match) };
+};
+
+String.prototype.parseQuery = String.prototype.toQueryParams;
+
+Object.extend(String.prototype.escapeHTML, {
+  div:  document.createElement('div'),
+  text: document.createTextNode('')
+});
+
+String.prototype.escapeHTML.div.appendChild(String.prototype.escapeHTML.text);
+
+var Template = Class.create({
+  initialize: function(template, pattern) {
+    this.template = template.toString();
+    this.pattern = pattern || Template.Pattern;
+  },
+
+  evaluate: function(object) {
+    if (Object.isFunction(object.toTemplateReplacements))
+      object = object.toTemplateReplacements();
+
+    return this.template.gsub(this.pattern, function(match) {
+      if (object == null) return '';
+
+      var before = match[1] || '';
+      if (before == '\\') return match[2];
+
+      var ctx = object, expr = match[3];
+      var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;
+      match = pattern.exec(expr);
+      if (match == null) return before;
+
+      while (match != null) {
+        var comp = match[1].startsWith('[') ? match[2].gsub('\\\\]', ']') : match[1];
+        ctx = ctx[comp];
+        if (null == ctx || '' == match[3]) break;
+        expr = expr.substring('[' == match[3] ? match[1].length : match[0].length);
+        match = pattern.exec(expr);
+      }
+
+      return before + String.interpret(ctx);
+    });
+  }
+});
+Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
+
+var $break = { };
+
+var Enumerable = {
+  each: function(iterator, context) {
+    var index = 0;
+    try {
+      this._each(function(value) {
+        iterator.call(context, value, index++);
+      });
+    } catch (e) {
+      if (e != $break) throw e;
+    }
+    return this;
+  },
+
+  eachSlice: function(number, iterator, context) {
+    var index = -number, slices = [], array = this.toArray();
+    if (number < 1) return array;
+    while ((index += number) < array.length)
+      slices.push(array.slice(index, index+number));
+    return slices.collect(iterator, context);
+  },
+
+  all: function(iterator, context) {
+    iterator = iterator || Prototype.K;
+    var result = true;
+    this.each(function(value, index) {
+      result = result && !!iterator.call(context, value, index);
+      if (!result) throw $break;
+    });
+    return result;
+  },
+
+  any: function(iterator, context) {
+    iterator = iterator || Prototype.K;
+    var result = false;
+    this.each(function(value, index) {
+      if (result = !!iterator.call(context, value, index))
+        throw $break;
+    });
+    return result;
+  },
+
+  collect: function(iterator, context) {
+    iterator = iterator || Prototype.K;
+    var results = [];
+    this.each(function(value, index) {
+      results.push(iterator.call(context, value, index));
+    });
+    return results;
+  },
+
+  detect: function(iterator, context) {
+    var result;
+    this.each(function(value, index) {
+      if (iterator.call(context, value, index)) {
+        result = value;
+        throw $break;
+      }
+    });
+    return result;
+  },
+
+  findAll: function(iterator, context) {
+    var results = [];
+    this.each(function(value, index) {
+      if (iterator.call(context, value, index))
+        results.push(value);
+    });
+    return results;
+  },
+
+  grep: function(filter, iterator, context) {
+    iterator = iterator || Prototype.K;
+    var results = [];
+
+    if (Object.isString(filter))
+      filter = new RegExp(filter);
+
+    this.each(function(value, index) {
+      if (filter.match(value))
+        results.push(iterator.call(context, value, index));
+    });
+    return results;
+  },
+
+  include: function(object) {
+    if (Object.isFunction(this.indexOf))
+      if (this.indexOf(object) != -1) return true;
+
+    var found = false;
+    this.each(function(value) {
+      if (value == object) {
+        found = true;
+        throw $break;
+      }
+    });
+    return found;
+  },
+
+  inGroupsOf: function(number, fillWith) {
+    fillWith = Object.isUndefined(fillWith) ? null : fillWith;
+    return this.eachSlice(number, function(slice) {
+      while(slice.length < number) slice.push(fillWith);
+      return slice;
+    });
+  },
+
+  inject: function(memo, iterator, context) {
+    this.each(function(value, index) {
+      memo = iterator.call(context, memo, value, index);
+    });
+    return memo;
+  },
+
+  invoke: function(method) {
+    var args = $A(arguments).slice(1);
+    return this.map(function(value) {
+      return value[method].apply(value, args);
+    });
+  },
+
+  max: function(iterator, context) {
+    iterator = iterator || Prototype.K;
+    var result;
+    this.each(function(value, index) {
+      value = iterator.call(context, value, index);
+      if (result == null || value >= result)
+        result = value;
+    });
+    return result;
+  },
+
+  min: function(iterator, context) {
+    iterator = iterator || Prototype.K;
+    var result;
+    this.each(function(value, index) {
+      value = iterator.call(context, value, index);
+      if (result == null || value < result)
+        result = value;
+    });
+    return result;
+  },
+
+  partition: function(iterator, context) {
+    iterator = iterator || Prototype.K;
+    var trues = [], falses = [];
+    this.each(function(value, index) {
+      (iterator.call(context, value, index) ?
+        trues : falses).push(value);
+    });
+    return [trues, falses];
+  },
+
+  pluck: function(property) {
+    var results = [];
+    this.each(function(value) {
+      results.push(value[property]);
+    });
+    return results;
+  },
+
+  reject: function(iterator, context) {
+    var results = [];
+    this.each(function(value, index) {
+      if (!iterator.call(context, value, index))
+        results.push(value);
+    });
+    return results;
+  },
+
+  sortBy: function(iterator, context) {
+    return this.map(function(value, index) {
+      return {
+        value: value,
+        criteria: iterator.call(context, value, index)
+      };
+    }).sort(function(left, right) {
+      var a = left.criteria, b = right.criteria;
+      return a < b ? -1 : a > b ? 1 : 0;
+    }).pluck('value');
+  },
+
+  toArray: function() {
+    return this.map();
+  },
+
+  zip: function() {
+    var iterator = Prototype.K, args = $A(arguments);
+    if (Object.isFunction(args.last()))
+      iterator = args.pop();
+
+    var collections = [this].concat(args).map($A);
+    return this.map(function(value, index) {
+      return iterator(collections.pluck(index));
+    });
+  },
+
+  size: function() {
+    return this.toArray().length;
+  },
+
+  inspect: function() {
+    return '#<Enumerable:' + this.toArray().inspect() + '>';
+  }
+};
+
+Object.extend(Enumerable, {
+  map:     Enumerable.collect,
+  find:    Enumerable.detect,
+  select:  Enumerable.findAll,
+  filter:  Enumerable.findAll,
+  member:  Enumerable.include,
+  entries: Enumerable.toArray,
+  every:   Enumerable.all,
+  some:    Enumerable.any
+});
+function $A(iterable) {
+  if (!iterable) return [];
+  if (iterable.toArray) return iterable.toArray();
+  var length = iterable.length || 0, results = new Array(length);
+  while (length--) results[length] = iterable[length];
+  return results;
+}
+
+if (Prototype.Browser.WebKit) {
+  $A = function(iterable) {
+    if (!iterable) return [];
+    // In Safari, only use the `toArray` method if it's not a NodeList.
+    // A NodeList is a function, has an function `item` property, and a numeric
+    // `length` property. Adapted from Google Doctype.
+    if (!(typeof iterable === 'function' && typeof iterable.length ===
+        'number' && typeof iterable.item === 'function') && iterable.toArray)
+      return iterable.toArray();
+    var length = iterable.length || 0, results = new Array(length);
+    while (length--) results[length] = iterable[length];
+    return results;
+  };
+}
+
+Array.from = $A;
+
+Object.extend(Array.prototype, Enumerable);
+
+if (!Array.prototype._reverse) Array.prototype._reverse = Array.prototype.reverse;
+
+Object.extend(Array.prototype, {
+  _each: function(iterator) {
+    for (var i = 0, length = this.length; i < length; i++)
+      iterator(this[i]);
+  },
+
+  clear: function() {
+    this.length = 0;
+    return this;
+  },
+
+  first: function() {
+    return this[0];
+  },
+
+  last: function() {
+    return this[this.length - 1];
+  },
+
+  compact: function() {
+    return this.select(function(value) {
+      return value != null;
+    });
+  },
+
+  flatten: function() {
+    return this.inject([], function(array, value) {
+      return array.concat(Object.isArray(value) ?
+        value.flatten() : [value]);
+    });
+  },
+
+  without: function() {
+    var values = $A(arguments);
+    return this.select(function(value) {
+      return !values.include(value);
+    });
+  },
+
+  reverse: function(inline) {
+    return (inline !== false ? this : this.toArray())._reverse();
+  },
+
+  reduce: function() {
+    return this.length > 1 ? this : this[0];
+  },
+
+  uniq: function(sorted) {
+    return this.inject([], function(array, value, index) {
+      if (0 == index || (sorted ? array.last() != value : !array.include(value)))
+        array.push(value);
+      return array;
+    });
+  },
+
+  intersect: function(array) {
+    return this.uniq().findAll(function(item) {
+      return array.detect(function(value) { return item === value });
+    });
+  },
+
+  clone: function() {
+    return [].concat(this);
+  },
+
+  size: function() {
+    return this.length;
+  },
+
+  inspect: function() {
+    return '[' + this.map(Object.inspect).join(', ') + ']';
+  },
+
+  toJSON: function() {
+    var results = [];
+    this.each(function(object) {
+      var value = Object.toJSON(object);
+      if (!Object.isUndefined(value)) results.push(value);
+    });
+    return '[' + results.join(', ') + ']';
+  }
+});
+
+// use native browser JS 1.6 implementation if available
+if (Object.isFunction(Array.prototype.forEach))
+  Array.prototype._each = Array.prototype.forEach;
+
+if (!Array.prototype.indexOf) Array.prototype.indexOf = function(item, i) {
+  i || (i = 0);
+  var length = this.length;
+  if (i < 0) i = length + i;
+  for (; i < length; i++)
+    if (this[i] === item) return i;
+  return -1;
+};
+
+if (!Array.prototype.lastIndexOf) Array.prototype.lastIndexOf = function(item, i) {
+  i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1;
+  var n = this.slice(0, i).reverse().indexOf(item);
+  return (n < 0) ? n : i - n - 1;
+};
+
+Array.prototype.toArray = Array.prototype.clone;
+
+function $w(string) {
+  if (!Object.isString(string)) return [];
+  string = string.strip();
+  return string ? string.split(/\s+/) : [];
+}
+
+if (Prototype.Browser.Opera){
+  Array.prototype.concat = function() {
+    var array = [];
+    for (var i = 0, length = this.length; i < length; i++) array.push(this[i]);
+    for (var i = 0, length = arguments.length; i < length; i++) {
+      if (Object.isArray(arguments[i])) {
+        for (var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++)
+          array.push(arguments[i][j]);
+      } else {
+        array.push(arguments[i]);
+      }
+    }
+    return array;
+  };
+}
+Object.extend(Number.prototype, {
+  toColorPart: function() {
+    return this.toPaddedString(2, 16);
+  },
+
+  succ: function() {
+    return this + 1;
+  },
+
+  times: function(iterator, context) {
+    $R(0, this, true).each(iterator, context);
+    return this;
+  },
+
+  toPaddedString: function(length, radix) {
+    var string = this.toString(radix || 10);
+    return '0'.times(length - string.length) + string;
+  },
+
+  toJSON: function() {
+    return isFinite(this) ? this.toString() : 'null';
+  }
+});
+
+$w('abs round ceil floor').each(function(method){
+  Number.prototype[method] = Math[method].methodize();
+});
+function $H(object) {
+  return new Hash(object);
+};
+
+var Hash = Class.create(Enumerable, (function() {
+
+  function toQueryPair(key, value) {
+    if (Object.isUndefined(value)) return key;
+    return key + '=' + encodeURIComponent(String.interpret(value));
+  }
+
+  return {
+    initialize: function(object) {
+      this._object = Object.isHash(object) ? object.toObject() : Object.clone(object);
+    },
+
+    _each: function(iterator) {
+      for (var key in this._object) {
+        var value = this._object[key], pair = [key, value];
+        pair.key = key;
+        pair.value = value;
+        iterator(pair);
+      }
+    },
+
+    set: function(key, value) {
+      return this._object[key] = value;
+    },
+
+    get: function(key) {
+      // simulating poorly supported hasOwnProperty
+      if (this._object[key] !== Object.prototype[key])
+        return this._object[key];
+    },
+
+    unset: function(key) {
+      var value = this._object[key];
+      delete this._object[key];
+      return value;
+    },
+
+    toObject: function() {
+      return Object.clone(this._object);
+    },
+
+    keys: function() {
+      return this.pluck('key');
+    },
+
+    values: function() {
+      return this.pluck('value');
+    },
+
+    index: function(value) {
+      var match = this.detect(function(pair) {
+        return pair.value === value;
+      });
+      return match && match.key;
+    },
+
+    merge: function(object) {
+      return this.clone().update(object);
+    },
+
+    update: function(object) {
+      return new Hash(object).inject(this, function(result, pair) {
+        result.set(pair.key, pair.value);
+        return result;
+      });
+    },
+
+    toQueryString: function() {
+      return this.inject([], function(results, pair) {
+        var key = encodeURIComponent(pair.key), values = pair.value;
+
+        if (values && typeof values == 'object') {
+          if (Object.isArray(values))
+            return results.concat(values.map(toQueryPair.curry(key)));
+        } else results.push(toQueryPair(key, values));
+        return results;
+      }).join('&');
+    },
+
+    inspect: function() {
+      return '#<Hash:{' + this.map(function(pair) {
+        return pair.map(Object.inspect).join(': ');
+      }).join(', ') + '}>';
+    },
+
+    toJSON: function() {
+      return Object.toJSON(this.toObject());
+    },
+
+    clone: function() {
+      return new Hash(this);
+    }
+  }
+})());
+
+Hash.prototype.toTemplateReplacements = Hash.prototype.toObject;
+Hash.from = $H;
+var ObjectRange = Class.create(Enumerable, {
+  initialize: function(start, end, exclusive) {
+    this.start = start;
+    this.end = end;
+    this.exclusive = exclusive;
+  },
+
+  _each: function(iterator) {
+    var value = this.start;
+    while (this.include(value)) {
+      iterator(value);
+      value = value.succ();
+    }
+  },
+
+  include: function(value) {
+    if (value < this.start)
+      return false;
+    if (this.exclusive)
+      return value < this.end;
+    return value <= this.end;
+  }
+});
+
+var $R = function(start, end, exclusive) {
+  return new ObjectRange(start, end, exclusive);
+};
+
+var Ajax = {
+  getTransport: function() {
+    return Try.these(
+      function() {return new XMLHttpRequest()},
+      function() {return new ActiveXObject('Msxml2.XMLHTTP')},
+      function() {return new ActiveXObject('Microsoft.XMLHTTP')}
+    ) || false;
+  },
+
+  activeRequestCount: 0
+};
+
+Ajax.Responders = {
+  responders: [],
+
+  _each: function(iterator) {
+    this.responders._each(iterator);
+  },
+
+  register: function(responder) {
+    if (!this.include(responder))
+      this.responders.push(responder);
+  },
+
+  unregister: function(responder) {
+    this.responders = this.responders.without(responder);
+  },
+
+  dispatch: function(callback, request, transport, json) {
+    this.each(function(responder) {
+      if (Object.isFunction(responder[callback])) {
+        try {
+          responder[callback].apply(responder, [request, transport, json]);
+        } catch (e) { }
+      }
+    });
+  }
+};
+
+Object.extend(Ajax.Responders, Enumerable);
+
+Ajax.Responders.register({
+  onCreate:   function() { Ajax.activeRequestCount++ },
+  onComplete: function() { Ajax.activeRequestCount-- }
+});
+
+Ajax.Base = Class.create({
+  initialize: function(options) {
+    this.options = {
+      method:       'post',
+      asynchronous: true,
+      contentType:  'application/x-www-form-urlencoded',
+      encoding:     'UTF-8',
+      parameters:   '',
+      evalJSON:     true,
+      evalJS:       true
+    };
+    Object.extend(this.options, options || { });
+
+    this.options.method = this.options.method.toLowerCase();
+
+    if (Object.isString(this.options.parameters))
+      this.options.parameters = this.options.parameters.toQueryParams();
+    else if (Object.isHash(this.options.parameters))
+      this.options.parameters = this.options.parameters.toObject();
+  }
+});
+
+Ajax.Request = Class.create(Ajax.Base, {
+  _complete: false,
+
+  initialize: function($super, url, options) {
+    $super(options);
+    this.transport = Ajax.getTransport();
+    this.request(url);
+  },
+
+  request: function(url) {
+    this.url = url;
+    this.method = this.options.method;
+    var params = Object.clone(this.options.parameters);
+
+    if (!['get', 'post'].include(this.method)) {
+      // simulate other verbs over post
+      params['_method'] = this.method;
+      this.method = 'post';
+    }
+
+    this.parameters = params;
+
+    if (params = Object.toQueryString(params)) {
+      // when GET, append parameters to URL
+      if (this.method == 'get')
+        this.url += (this.url.include('?') ? '&' : '?') + params;
+      else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))
+        params += '&_=';
+    }
+
+    try {
+      var response = new Ajax.Response(this);
+      if (this.options.onCreate) this.options.onCreate(response);
+      Ajax.Responders.dispatch('onCreate', this, response);
+
+      this.transport.open(this.method.toUpperCase(), this.url,
+        this.options.asynchronous);
+
+      if (this.options.asynchronous) this.respondToReadyState.bind(this).defer(1);
+
+      this.transport.onreadystatechange = this.onStateChange.bind(this);
+      this.setRequestHeaders();
+
+      this.body = this.method == 'post' ? (this.options.postBody || params) : null;
+      this.transport.send(this.body);
+
+      /* Force Firefox to handle ready state 4 for synchronous requests */
+      if (!this.options.asynchronous && this.transport.overrideMimeType)
+        this.onStateChange();
+
+    }
+    catch (e) {
+      this.dispatchException(e);
+    }
+  },
+
+  onStateChange: function() {
+    var readyState = this.transport.readyState;
+    if (readyState > 1 && !((readyState == 4) && this._complete))
+      this.respondToReadyState(this.transport.readyState);
+  },
+
+  setRequestHeaders: function() {
+    var headers = {
+      'X-Requested-With': 'XMLHttpRequest',
+      'X-Prototype-Version': Prototype.Version,
+      'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
+    };
+
+    if (this.method == 'post') {
+      headers['Content-type'] = this.options.contentType +
+        (this.options.encoding ? '; charset=' + this.options.encoding : '');
+
+      /* Force "Connection: close" for older Mozilla browsers to work
+       * around a bug where XMLHttpRequest sends an incorrect
+       * Content-length header. See Mozilla Bugzilla #246651.
+       */
+      if (this.transport.overrideMimeType &&
+          (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
+            headers['Connection'] = 'close';
+    }
+
+    // user-defined headers
+    if (typeof this.options.requestHeaders == 'object') {
+      var extras = this.options.requestHeaders;
+
+      if (Object.isFunction(extras.push))
+        for (var i = 0, length = extras.length; i < length; i += 2)
+          headers[extras[i]] = extras[i+1];
+      else
+        $H(extras).each(function(pair) { headers[pair.key] = pair.value });
+    }
+
+    for (var name in headers)
+      this.transport.setRequestHeader(name, headers[name]);
+  },
+
+  success: function() {
+    var status = this.getStatus();
+    return !status || (status >= 200 && status < 300);
+  },
+
+  getStatus: function() {
+    try {
+      return this.transport.status || 0;
+    } catch (e) { return 0 }
+  },
+
+  respondToReadyState: function(readyState) {
+    var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this);
+
+    if (state == 'Complete') {
+      try {
+        this._complete = true;
+        (this.options['on' + response.status]
+         || this.options['on' + (this.success() ? 'Success' : 'Failure')]
+         || Prototype.emptyFunction)(response, response.headerJSON);
+      } catch (e) {
+        this.dispatchException(e);
+      }
+
+      var contentType = response.getHeader('Content-type');
+      if (this.options.evalJS == 'force'
+          || (this.options.evalJS && this.isSameOrigin() && contentType
+          && contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i)))
+        this.evalResponse();
+    }
+
+    try {
+      (this.options['on' + state] || Prototype.emptyFunction)(response, response.headerJSON);
+      Ajax.Responders.dispatch('on' + state, this, response, response.headerJSON);
+    } catch (e) {
+      this.dispatchException(e);
+    }
+
+    if (state == 'Complete') {
+      // avoid memory leak in MSIE: clean up
+      this.transport.onreadystatechange = Prototype.emptyFunction;
+    }
+  },
+
+  isSameOrigin: function() {
+    var m = this.url.match(/^\s*https?:\/\/[^\/]*/);
+    return !m || (m[0] == '#{protocol}//#{domain}#{port}'.interpolate({
+      protocol: location.protocol,
+      domain: document.domain,
+      port: location.port ? ':' + location.port : ''
+    }));
+  },
+
+  getHeader: function(name) {
+    try {
+      return this.transport.getResponseHeader(name) || null;
+    } catch (e) { return null }
+  },
+
+  evalResponse: function() {
+    try {
+      return eval((this.transport.responseText || '').unfilterJSON());
+    } catch (e) {
+      this.dispatchException(e);
+    }
+  },
+
+  dispatchException: function(exception) {
+    (this.options.onException || Prototype.emptyFunction)(this, exception);
+    Ajax.Responders.dispatch('onException', this, exception);
+  }
+});
+
+Ajax.Request.Events =
+  ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
+
+Ajax.Response = Class.create({
+  initialize: function(request){
+    this.request = request;
+    var transport  = this.transport  = request.transport,
+        readyState = this.readyState = transport.readyState;
+
+    if((readyState > 2 && !Prototype.Browser.IE) || readyState == 4) {
+      this.status       = this.getStatus();
+      this.statusText   = this.getStatusText();
+      this.responseText = String.interpret(transport.responseText);
+      this.headerJSON   = this._getHeaderJSON();
+    }
+
+    if(readyState == 4) {
+      var xml = transport.responseXML;
+      this.responseXML  = Object.isUndefined(xml) ? null : xml;
+      this.responseJSON = this._getResponseJSON();
+    }
+  },
+
+  status:      0,
+  statusText: '',
+
+  getStatus: Ajax.Request.prototype.getStatus,
+
+  getStatusText: function() {
+    try {
+      return this.transport.statusText || '';
+    } catch (e) { return '' }
+  },
+
+  getHeader: Ajax.Request.prototype.getHeader,
+
+  getAllHeaders: function() {
+    try {
+      return this.getAllResponseHeaders();
+    } catch (e) { return null }
+  },
+
+  getResponseHeader: function(name) {
+    return this.transport.getResponseHeader(name);
+  },
+
+  getAllResponseHeaders: function() {
+    return this.transport.getAllResponseHeaders();
+  },
+
+  _getHeaderJSON: function() {
+    var json = this.getHeader('X-JSON');
+    if (!json) return null;
+    json = decodeURIComponent(escape(json));
+    try {
+      return json.evalJSON(this.request.options.sanitizeJSON ||
+        !this.request.isSameOrigin());
+    } catch (e) {
+      this.request.dispatchException(e);
+    }
+  },
+
+  _getResponseJSON: function() {
+    var options = this.request.options;
+    if (!options.evalJSON || (options.evalJSON != 'force' &&
+      !(this.getHeader('Content-type') || '').include('application/json')) ||
+        this.responseText.blank())
+          return null;
+    try {
+      return this.responseText.evalJSON(options.sanitizeJSON ||
+        !this.request.isSameOrigin());
+    } catch (e) {
+      this.request.dispatchException(e);
+    }
+  }
+});
+
+Ajax.Updater = Class.create(Ajax.Request, {
+  initialize: function($super, container, url, options) {
+    this.container = {
+      success: (container.success || container),
+      failure: (container.failure || (container.success ? null : container))
+    };
+
+    options = Object.clone(options);
+    var onComplete = options.onComplete;
+    options.onComplete = (function(response, json) {
+      this.updateContent(response.responseText);
+      if (Object.isFunction(onComplete)) onComplete(response, json);
+    }).bind(this);
+
+    $super(url, options);
+  },
+
+  updateContent: function(responseText) {
+    var receiver = this.container[this.success() ? 'success' : 'failure'],
+        options = this.options;
+
+    if (!options.evalScripts) responseText = responseText.stripScripts();
+
+    if (receiver = $(receiver)) {
+      if (options.insertion) {
+        if (Object.isString(options.insertion)) {
+          var insertion = { }; insertion[options.insertion] = responseText;
+          receiver.insert(insertion);
+        }
+        else options.insertion(receiver, responseText);
+      }
+      else receiver.update(responseText);
+    }
+  }
+});
+
+Ajax.PeriodicalUpdater = Class.create(Ajax.Base, {
+  initialize: function($super, container, url, options) {
+    $super(options);
+    this.onComplete = this.options.onComplete;
+
+    this.frequency = (this.options.frequency || 2);
+    this.decay = (this.options.decay || 1);
+
+    this.updater = { };
+    this.container = container;
+    this.url = url;
+
+    this.start();
+  },
+
+  start: function() {
+    this.options.onComplete = this.updateComplete.bind(this);
+    this.onTimerEvent();
+  },
+
+  stop: function() {
+    this.updater.options.onComplete = undefined;
+    clearTimeout(this.timer);
+    (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
+  },
+
+  updateComplete: function(response) {
+    if (this.options.decay) {
+      this.decay = (response.responseText == this.lastText ?
+        this.decay * this.options.decay : 1);
+
+      this.lastText = response.responseText;
+    }
+    this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency);
+  },
+
+  onTimerEvent: function() {
+    this.updater = new Ajax.Updater(this.container, this.url, this.options);
+  }
+});
+function $(element) {
+  if (arguments.length > 1) {
+    for (var i = 0, elements = [], length = arguments.length; i < length; i++)
+      elements.push($(arguments[i]));
+    return elements;
+  }
+  if (Object.isString(element))
+    element = document.getElementById(element);
+  return Element.extend(element);
+}
+
+if (Prototype.BrowserFeatures.XPath) {
+  document._getElementsByXPath = function(expression, parentElement) {
+    var results = [];
+    var query = document.evaluate(expression, $(parentElement) || document,
+      null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    for (var i = 0, length = query.snapshotLength; i < length; i++)
+      results.push(Element.extend(query.snapshotItem(i)));
+    return results;
+  };
+}
+
+/*--------------------------------------------------------------------------*/
+
+if (!window.Node) var Node = { };
+
+if (!Node.ELEMENT_NODE) {
+  // DOM level 2 ECMAScript Language Binding
+  Object.extend(Node, {
+    ELEMENT_NODE: 1,
+    ATTRIBUTE_NODE: 2,
+    TEXT_NODE: 3,
+    CDATA_SECTION_NODE: 4,
+    ENTITY_REFERENCE_NODE: 5,
+    ENTITY_NODE: 6,
+    PROCESSING_INSTRUCTION_NODE: 7,
+    COMMENT_NODE: 8,
+    DOCUMENT_NODE: 9,
+    DOCUMENT_TYPE_NODE: 10,
+    DOCUMENT_FRAGMENT_NODE: 11,
+    NOTATION_NODE: 12
+  });
+}
+
+(function() {
+  var element = this.Element;
+  this.Element = function(tagName, attributes) {
+    attributes = attributes || { };
+    tagName = tagName.toLowerCase();
+    var cache = Element.cache;
+    if (Prototype.Browser.IE && attributes.name) {
+      tagName = '<' + tagName + ' name="' + attributes.name + '">';
+      delete attributes.name;
+      return Element.writeAttribute(document.createElement(tagName), attributes);
+    }
+    if (!cache[tagName]) cache[tagName] = Element.extend(document.createElement(tagName));
+    return Element.writeAttribute(cache[tagName].cloneNode(false), attributes);
+  };
+  Object.extend(this.Element, element || { });
+  if (element) this.Element.prototype = element.prototype;
+}).call(window);
+
+Element.cache = { };
+
+Element.Methods = {
+  visible: function(element) {
+    return $(element).style.display != 'none';
+  },
+
+  toggle: function(element) {
+    element = $(element);
+    Element[Element.visible(element) ? 'hide' : 'show'](element);
+    return element;
+  },
+
+  hide: function(element) {
+    element = $(element);
+    element.style.display = 'none';
+    return element;
+  },
+
+  show: function(element) {
+    element = $(element);
+    element.style.display = '';
+    return element;
+  },
+
+  remove: function(element) {
+    element = $(element);
+    element.parentNode.removeChild(element);
+    return element;
+  },
+
+  update: function(element, content) {
+    element = $(element);
+    if (content && content.toElement) content = content.toElement();
+    if (Object.isElement(content)) return element.update().insert(content);
+    content = Object.toHTML(content);
+    element.innerHTML = content.stripScripts();
+    content.evalScripts.bind(content).defer();
+    return element;
+  },
+
+  replace: function(element, content) {
+    element = $(element);
+    if (content && content.toElement) content = content.toElement();
+    else if (!Object.isElement(content)) {
+      content = Object.toHTML(content);
+      var range = element.ownerDocument.createRange();
+      range.selectNode(element);
+      content.evalScripts.bind(content).defer();
+      content = range.createContextualFragment(content.stripScripts());
+    }
+    element.parentNode.replaceChild(content, element);
+    return element;
+  },
+
+  insert: function(element, insertions) {
+    element = $(element);
+
+    if (Object.isString(insertions) || Object.isNumber(insertions) ||
+        Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
+          insertions = {bottom:insertions};
+
+    var content, insert, tagName, childNodes;
+
+    for (var position in insertions) {
+      content  = insertions[position];
+      position = position.toLowerCase();
+      insert = Element._insertionTranslations[position];
+
+      if (content && content.toElement) content = content.toElement();
+      if (Object.isElement(content)) {
+        insert(element, content);
+        continue;
+      }
+
+      content = Object.toHTML(content);
+
+      tagName = ((position == 'before' || position == 'after')
+        ? element.parentNode : element).tagName.toUpperCase();
+
+      childNodes = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
+
+      if (position == 'top' || position == 'after') childNodes.reverse();
+      childNodes.each(insert.curry(element));
+
+      content.evalScripts.bind(content).defer();
+    }
+
+    return element;
+  },
+
+  wrap: function(element, wrapper, attributes) {
+    element = $(element);
+    if (Object.isElement(wrapper))
+      $(wrapper).writeAttribute(attributes || { });
+    else if (Object.isString(wrapper)) wrapper = new Element(wrapper, attributes);
+    else wrapper = new Element('div', wrapper);
+    if (element.parentNode)
+      element.parentNode.replaceChild(wrapper, element);
+    wrapper.appendChild(element);
+    return wrapper;
+  },
+
+  inspect: function(element) {
+    element = $(element);
+    var result = '<' + element.tagName.toLowerCase();
+    $H({'id': 'id', 'className': 'class'}).each(function(pair) {
+      var property = pair.first(), attribute = pair.last();
+      var value = (element[property] || '').toString();
+      if (value) result += ' ' + attribute + '=' + value.inspect(true);
+    });
+    return result + '>';
+  },
+
+  recursivelyCollect: function(element, property) {
+    element = $(element);
+    var elements = [];
+    while (element = element[property])
+      if (element.nodeType == 1)
+        elements.push(Element.extend(element));
+    return elements;
+  },
+
+  ancestors: function(element) {
+    return $(element).recursivelyCollect('parentNode');
+  },
+
+  descendants: function(element) {
+    return $(element).select("*");
+  },
+
+  firstDescendant: function(element) {
+    element = $(element).firstChild;
+    while (element && element.nodeType != 1) element = element.nextSibling;
+    return $(element);
+  },
+
+  immediateDescendants: function(element) {
+    if (!(element = $(element).firstChild)) return [];
+    while (element && element.nodeType != 1) element = element.nextSibling;
+    if (element) return [element].concat($(element).nextSiblings());
+    return [];
+  },
+
+  previousSiblings: function(element) {
+    return $(element).recursivelyCollect('previousSibling');
+  },
+
+  nextSiblings: function(element) {
+    return $(element).recursivelyCollect('nextSibling');
+  },
+
+  siblings: function(element) {
+    element = $(element);
+    return element.previousSiblings().reverse().concat(element.nextSiblings());
+  },
+
+  match: function(element, selector) {
+    if (Object.isString(selector))
+      selector = new Selector(selector);
+    return selector.match($(element));
+  },
+
+  up: function(element, expression, index) {
+    element = $(element);
+    if (arguments.length == 1) return $(element.parentNode);
+    var ancestors = element.ancestors();
+    return Object.isNumber(expression) ? ancestors[expression] :
+      Selector.findElement(ancestors, expression, index);
+  },
+
+  down: function(element, expression, index) {
+    element = $(element);
+    if (arguments.length == 1) return element.firstDescendant();
+    return Object.isNumber(expression) ? element.descendants()[expression] :
+      Element.select(element, expression)[index || 0];
+  },
+
+  previous: function(element, expression, index) {
+    element = $(element);
+    if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element));
+    var previousSiblings = element.previousSiblings();
+    return Object.isNumber(expression) ? previousSiblings[expression] :
+      Selector.findElement(previousSiblings, expression, index);
+  },
+
+  next: function(element, expression, index) {
+    element = $(element);
+    if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element));
+    var nextSiblings = element.nextSiblings();
+    return Object.isNumber(expression) ? nextSiblings[expression] :
+      Selector.findElement(nextSiblings, expression, index);
+  },
+
+  select: function() {
+    var args = $A(arguments), element = $(args.shift());
+    return Selector.findChildElements(element, args);
+  },
+
+  adjacent: function() {
+    var args = $A(arguments), element = $(args.shift());
+    return Selector.findChildElements(element.parentNode, args).without(element);
+  },
+
+  identify: function(element) {
+    element = $(element);
+    var id = element.readAttribute('id'), self = arguments.callee;
+    if (id) return id;
+    do { id = 'anonymous_element_' + self.counter++ } while ($(id));
+    element.writeAttribute('id', id);
+    return id;
+  },
+
+  readAttribute: function(element, name) {
+    element = $(element);
+    if (Prototype.Browser.IE) {
+      var t = Element._attributeTranslations.read;
+      if (t.values[name]) return t.values[name](element, name);
+      if (t.names[name]) name = t.names[name];
+      if (name.include(':')) {
+        return (!element.attributes || !element.attributes[name]) ? null :
+         element.attributes[name].value;
+      }
+    }
+    return element.getAttribute(name);
+  },
+
+  writeAttribute: function(element, name, value) {
+    element = $(element);
+    var attributes = { }, t = Element._attributeTranslations.write;
+
+    if (typeof name == 'object') attributes = name;
+    else attributes[name] = Object.isUndefined(value) ? true : value;
+
+    for (var attr in attributes) {
+      name = t.names[attr] || attr;
+      value = attributes[attr];
+      if (t.values[attr]) name = t.values[attr](element, value);
+      if (value === false || value === null)
+        element.removeAttribute(name);
+      else if (value === true)
+        element.setAttribute(name, name);
+      else element.setAttribute(name, value);
+    }
+    return element;
+  },
+
+  getHeight: function(element) {
+    return $(element).getDimensions().height;
+  },
+
+  getWidth: function(element) {
+    return $(element).getDimensions().width;
+  },
+
+  classNames: function(element) {
+    return new Element.ClassNames(element);
+  },
+
+  hasClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    var elementClassName = element.className;
+    return (elementClassName.length > 0 && (elementClassName == className ||
+      new RegExp("(^|\\s)" + className + "(\\s|$)").test(elementClassName)));
+  },
+
+  addClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    if (!element.hasClassName(className))
+      element.className += (element.className ? ' ' : '') + className;
+    return element;
+  },
+
+  removeClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    element.className = element.className.replace(
+      new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip();
+    return element;
+  },
+
+  toggleClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    return element[element.hasClassName(className) ?
+      'removeClassName' : 'addClassName'](className);
+  },
+
+  // removes whitespace-only text node children
+  cleanWhitespace: function(element) {
+    element = $(element);
+    var node = element.firstChild;
+    while (node) {
+      var nextNode = node.nextSibling;
+      if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
+        element.removeChild(node);
+      node = nextNode;
+    }
+    return element;
+  },
+
+  empty: function(element) {
+    return $(element).innerHTML.blank();
+  },
+
+  descendantOf: function(element, ancestor) {
+    element = $(element), ancestor = $(ancestor);
+
+    if (element.compareDocumentPosition)
+      return (element.compareDocumentPosition(ancestor) & 8) === 8;
+
+    if (ancestor.contains)
+      return ancestor.contains(element) && ancestor !== element;
+
+    while (element = element.parentNode)
+      if (element == ancestor) return true;
+
+    return false;
+  },
+
+  scrollTo: function(element) {
+    element = $(element);
+    var pos = element.cumulativeOffset();
+    window.scrollTo(pos[0], pos[1]);
+    return element;
+  },
+
+  getStyle: function(element, style) {
+    element = $(element);
+    style = style == 'float' ? 'cssFloat' : style.camelize();
+    var value = element.style[style];
+    if (!value || value == 'auto') {
+      var css = document.defaultView.getComputedStyle(element, null);
+      value = css ? css[style] : null;
+    }
+    if (style == 'opacity') return value ? parseFloat(value) : 1.0;
+    return value == 'auto' ? null : value;
+  },
+
+  getOpacity: function(element) {
+    return $(element).getStyle('opacity');
+  },
+
+  setStyle: function(element, styles) {
+    element = $(element);
+    var elementStyle = element.style, match;
+    if (Object.isString(styles)) {
+      element.style.cssText += ';' + styles;
+      return styles.include('opacity') ?
+        element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element;
+    }
+    for (var property in styles)
+      if (property == 'opacity') element.setOpacity(styles[property]);
+      else
+        elementStyle[(property == 'float' || property == 'cssFloat') ?
+          (Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : 'styleFloat') :
+            property] = styles[property];
+
+    return element;
+  },
+
+  setOpacity: function(element, value) {
+    element = $(element);
+    element.style.opacity = (value == 1 || value === '') ? '' :
+      (value < 0.00001) ? 0 : value;
+    return element;
+  },
+
+  getDimensions: function(element) {
+    element = $(element);
+    var display = element.getStyle('display');
+    if (display != 'none' && display != null) // Safari bug
+      return {width: element.offsetWidth, height: element.offsetHeight};
+
+    // All *Width and *Height properties give 0 on elements with display none,
+    // so enable the element temporarily
+    var els = element.style;
+    var originalVisibility = els.visibility;
+    var originalPosition = els.position;
+    var originalDisplay = els.display;
+    els.visibility = 'hidden';
+    els.position = 'absolute';
+    els.display = 'block';
+    var originalWidth = element.clientWidth;
+    var originalHeight = element.clientHeight;
+    els.display = originalDisplay;
+    els.position = originalPosition;
+    els.visibility = originalVisibility;
+    return {width: originalWidth, height: originalHeight};
+  },
+
+  makePositioned: function(element) {
+    element = $(element);
+    var pos = Element.getStyle(element, 'position');
+    if (pos == 'static' || !pos) {
+      element._madePositioned = true;
+      element.style.position = 'relative';
+      // Opera returns the offset relative to the positioning context, when an
+      // element is position relative but top and left have not been defined
+      if (Prototype.Browser.Opera) {
+        element.style.top = 0;
+        element.style.left = 0;
+      }
+    }
+    return element;
+  },
+
+  undoPositioned: function(element) {
+    element = $(element);
+    if (element._madePositioned) {
+      element._madePositioned = undefined;
+      element.style.position =
+        element.style.top =
+        element.style.left =
+        element.style.bottom =
+        element.style.right = '';
+    }
+    return element;
+  },
+
+  makeClipping: function(element) {
+    element = $(element);
+    if (element._overflow) return element;
+    element._overflow = Element.getStyle(element, 'overflow') || 'auto';
+    if (element._overflow !== 'hidden')
+      element.style.overflow = 'hidden';
+    return element;
+  },
+
+  undoClipping: function(element) {
+    element = $(element);
+    if (!element._overflow) return element;
+    element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;
+    element._overflow = null;
+    return element;
+  },
+
+  cumulativeOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      element = element.offsetParent;
+    } while (element);
+    return Element._returnOffset(valueL, valueT);
+  },
+
+  positionedOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      element = element.offsetParent;
+      if (element) {
+        if (element.tagName.toUpperCase() == 'BODY') break;
+        var p = Element.getStyle(element, 'position');
+        if (p !== 'static') break;
+      }
+    } while (element);
+    return Element._returnOffset(valueL, valueT);
+  },
+
+  absolutize: function(element) {
+    element = $(element);
+    if (element.getStyle('position') == 'absolute') return element;
+    // Position.prepare(); // To be done manually by Scripty when it needs it.
+
+    var offsets = element.positionedOffset();
+    var top     = offsets[1];
+    var left    = offsets[0];
+    var width   = element.clientWidth;
+    var height  = element.clientHeight;
+
+    element._originalLeft   = left - parseFloat(element.style.left  || 0);
+    element._originalTop    = top  - parseFloat(element.style.top || 0);
+    element._originalWidth  = element.style.width;
+    element._originalHeight = element.style.height;
+
+    element.style.position = 'absolute';
+    element.style.top    = top + 'px';
+    element.style.left   = left + 'px';
+    element.style.width  = width + 'px';
+    element.style.height = height + 'px';
+    return element;
+  },
+
+  relativize: function(element) {
+    element = $(element);
+    if (element.getStyle('position') == 'relative') return element;
+    // Position.prepare(); // To be done manually by Scripty when it needs it.
+
+    element.style.position = 'relative';
+    var top  = parseFloat(element.style.top  || 0) - (element._originalTop || 0);
+    var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);
+
+    element.style.top    = top + 'px';
+    element.style.left   = left + 'px';
+    element.style.height = element._originalHeight;
+    element.style.width  = element._originalWidth;
+    return element;
+  },
+
+  cumulativeScrollOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.scrollTop  || 0;
+      valueL += element.scrollLeft || 0;
+      element = element.parentNode;
+    } while (element);
+    return Element._returnOffset(valueL, valueT);
+  },
+
+  getOffsetParent: function(element) {
+    if (element.offsetParent) return $(element.offsetParent);
+    if (element == document.body) return $(element);
+
+    while ((element = element.parentNode) && element != document.body)
+      if (Element.getStyle(element, 'position') != 'static')
+        return $(element);
+
+    return $(document.body);
+  },
+
+  viewportOffset: function(forElement) {
+    var valueT = 0, valueL = 0;
+
+    var element = forElement;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+
+      // Safari fix
+      if (element.offsetParent == document.body &&
+        Element.getStyle(element, 'position') == 'absolute') break;
+
+    } while (element = element.offsetParent);
+
+    element = forElement;
+    do {
+      if (!Prototype.Browser.Opera || (element.tagName && (element.tagName.toUpperCase() == 'BODY'))) {
+        valueT -= element.scrollTop  || 0;
+        valueL -= element.scrollLeft || 0;
+      }
+    } while (element = element.parentNode);
+
+    return Element._returnOffset(valueL, valueT);
+  },
+
+  clonePosition: function(element, source) {
+    var options = Object.extend({
+      setLeft:    true,
+      setTop:     true,
+      setWidth:   true,
+      setHeight:  true,
+      offsetTop:  0,
+      offsetLeft: 0
+    }, arguments[2] || { });
+
+    // find page position of source
+    source = $(source);
+    var p = source.viewportOffset();
+
+    // find coordinate system to use
+    element = $(element);
+    var delta = [0, 0];
+    var parent = null;
+    // delta [0,0] will do fine with position: fixed elements,
+    // position:absolute needs offsetParent deltas
+    if (Element.getStyle(element, 'position') == 'absolute') {
+      parent = element.getOffsetParent();
+      delta = parent.viewportOffset();
+    }
+
+    // correct by body offsets (fixes Safari)
+    if (parent == document.body) {
+      delta[0] -= document.body.offsetLeft;
+      delta[1] -= document.body.offsetTop;
+    }
+
+    // set position
+    if (options.setLeft)   element.style.left  = (p[0] - delta[0] + options.offsetLeft) + 'px';
+    if (options.setTop)    element.style.top   = (p[1] - delta[1] + options.offsetTop) + 'px';
+    if (options.setWidth)  element.style.width = source.offsetWidth + 'px';
+    if (options.setHeight) element.style.height = source.offsetHeight + 'px';
+    return element;
+  }
+};
+
+Element.Methods.identify.counter = 1;
+
+Object.extend(Element.Methods, {
+  getElementsBySelector: Element.Methods.select,
+  childElements: Element.Methods.immediateDescendants
+});
+
+Element._attributeTranslations = {
+  write: {
+    names: {
+      className: 'class',
+      htmlFor:   'for'
+    },
+    values: { }
+  }
+};
+
+if (Prototype.Browser.Opera) {
+  Element.Methods.getStyle = Element.Methods.getStyle.wrap(
+    function(proceed, element, style) {
+      switch (style) {
+        case 'left': case 'top': case 'right': case 'bottom':
+          if (proceed(element, 'position') === 'static') return null;
+        case 'height': case 'width':
+          // returns '0px' for hidden elements; we want it to return null
+          if (!Element.visible(element)) return null;
+
+          // returns the border-box dimensions rather than the content-box
+          // dimensions, so we subtract padding and borders from the value
+          var dim = parseInt(proceed(element, style), 10);
+
+          if (dim !== element['offset' + style.capitalize()])
+            return dim + 'px';
+
+          var properties;
+          if (style === 'height') {
+            properties = ['border-top-width', 'padding-top',
+             'padding-bottom', 'border-bottom-width'];
+          }
+          else {
+            properties = ['border-left-width', 'padding-left',
+             'padding-right', 'border-right-width'];
+          }
+          return properties.inject(dim, function(memo, property) {
+            var val = proceed(element, property);
+            return val === null ? memo : memo - parseInt(val, 10);
+          }) + 'px';
+        default: return proceed(element, style);
+      }
+    }
+  );
+
+  Element.Methods.readAttribute = Element.Methods.readAttribute.wrap(
+    function(proceed, element, attribute) {
+      if (attribute === 'title') return element.title;
+      return proceed(element, attribute);
+    }
+  );
+}
+
+else if (Prototype.Browser.IE) {
+  // IE doesn't report offsets correctly for static elements, so we change them
+  // to "relative" to get the values, then change them back.
+  Element.Methods.getOffsetParent = Element.Methods.getOffsetParent.wrap(
+    function(proceed, element) {
+      element = $(element);
+      // IE throws an error if element is not in document
+      try { element.offsetParent }
+      catch(e) { return $(document.body) }
+      var position = element.getStyle('position');
+      if (position !== 'static') return proceed(element);
+      element.setStyle({ position: 'relative' });
+      var value = proceed(element);
+      element.setStyle({ position: position });
+      return value;
+    }
+  );
+
+  $w('positionedOffset viewportOffset').each(function(method) {
+    Element.Methods[method] = Element.Methods[method].wrap(
+      function(proceed, element) {
+        element = $(element);
+        try { element.offsetParent }
+        catch(e) { return Element._returnOffset(0,0) }
+        var position = element.getStyle('position');
+        if (position !== 'static') return proceed(element);
+        // Trigger hasLayout on the offset parent so that IE6 reports
+        // accurate offsetTop and offsetLeft values for position: fixed.
+        var offsetParent = element.getOffsetParent();
+        if (offsetParent && offsetParent.getStyle('position') === 'fixed')
+          offsetParent.setStyle({ zoom: 1 });
+        element.setStyle({ position: 'relative' });
+        var value = proceed(element);
+        element.setStyle({ position: position });
+        return value;
+      }
+    );
+  });
+
+  Element.Methods.cumulativeOffset = Element.Methods.cumulativeOffset.wrap(
+    function(proceed, element) {
+      try { element.offsetParent }
+      catch(e) { return Element._returnOffset(0,0) }
+      return proceed(element);
+    }
+  );
+
+  Element.Methods.getStyle = function(element, style) {
+    element = $(element);
+    style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize();
+    var value = element.style[style];
+    if (!value && element.currentStyle) value = element.currentStyle[style];
+
+    if (style == 'opacity') {
+      if (value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/))
+        if (value[1]) return parseFloat(value[1]) / 100;
+      return 1.0;
+    }
+
+    if (value == 'auto') {
+      if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none'))
+        return element['offset' + style.capitalize()] + 'px';
+      return null;
+    }
+    return value;
+  };
+
+  Element.Methods.setOpacity = function(element, value) {
+    function stripAlpha(filter){
+      return filter.replace(/alpha\([^\)]*\)/gi,'');
+    }
+    element = $(element);
+    var currentStyle = element.currentStyle;
+    if ((currentStyle && !currentStyle.hasLayout) ||
+      (!currentStyle && element.style.zoom == 'normal'))
+        element.style.zoom = 1;
+
+    var filter = element.getStyle('filter'), style = element.style;
+    if (value == 1 || value === '') {
+      (filter = stripAlpha(filter)) ?
+        style.filter = filter : style.removeAttribute('filter');
+      return element;
+    } else if (value < 0.00001) value = 0;
+    style.filter = stripAlpha(filter) +
+      'alpha(opacity=' + (value * 100) + ')';
+    return element;
+  };
+
+  Element._attributeTranslations = {
+    read: {
+      names: {
+        'class': 'className',
+        'for':   'htmlFor'
+      },
+      values: {
+        _getAttr: function(element, attribute) {
+          return element.getAttribute(attribute, 2);
+        },
+        _getAttrNode: function(element, attribute) {
+          var node = element.getAttributeNode(attribute);
+          return node ? node.value : "";
+        },
+        _getEv: function(element, attribute) {
+          attribute = element.getAttribute(attribute);
+          return attribute ? attribute.toString().slice(23, -2) : null;
+        },
+        _flag: function(element, attribute) {
+          return $(element).hasAttribute(attribute) ? attribute : null;
+        },
+        style: function(element) {
+          return element.style.cssText.toLowerCase();
+        },
+        title: function(element) {
+          return element.title;
+        }
+      }
+    }
+  };
+
+  Element._attributeTranslations.write = {
+    names: Object.extend({
+      cellpadding: 'cellPadding',
+      cellspacing: 'cellSpacing'
+    }, Element._attributeTranslations.read.names),
+    values: {
+      checked: function(element, value) {
+        element.checked = !!value;
+      },
+
+      style: function(element, value) {
+        element.style.cssText = value ? value : '';
+      }
+    }
+  };
+
+  Element._attributeTranslations.has = {};
+
+  $w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' +
+      'encType maxLength readOnly longDesc frameBorder').each(function(attr) {
+    Element._attributeTranslations.write.names[attr.toLowerCase()] = attr;
+    Element._attributeTranslations.has[attr.toLowerCase()] = attr;
+  });
+
+  (function(v) {
+    Object.extend(v, {
+      href:        v._getAttr,
+      src:         v._getAttr,
+      type:        v._getAttr,
+      action:      v._getAttrNode,
+      disabled:    v._flag,
+      checked:     v._flag,
+      readonly:    v._flag,
+      multiple:    v._flag,
+      onload:      v._getEv,
+      onunload:    v._getEv,
+      onclick:     v._getEv,
+      ondblclick:  v._getEv,
+      onmousedown: v._getEv,
+      onmouseup:   v._getEv,
+      onmouseover: v._getEv,
+      onmousemove: v._getEv,
+      onmouseout:  v._getEv,
+      onfocus:     v._getEv,
+      onblur:      v._getEv,
+      onkeypress:  v._getEv,
+      onkeydown:   v._getEv,
+      onkeyup:     v._getEv,
+      onsubmit:    v._getEv,
+      onreset:     v._getEv,
+      onselect:    v._getEv,
+      onchange:    v._getEv
+    });
+  })(Element._attributeTranslations.read.values);
+}
+
+else if (Prototype.Browser.Gecko && /rv:1\.8\.0/.test(navigator.userAgent)) {
+  Element.Methods.setOpacity = function(element, value) {
+    element = $(element);
+    element.style.opacity = (value == 1) ? 0.999999 :
+      (value === '') ? '' : (value < 0.00001) ? 0 : value;
+    return element;
+  };
+}
+
+else if (Prototype.Browser.WebKit) {
+  Element.Methods.setOpacity = function(element, value) {
+    element = $(element);
+    element.style.opacity = (value == 1 || value === '') ? '' :
+      (value < 0.00001) ? 0 : value;
+
+    if (value == 1)
+      if(element.tagName.toUpperCase() == 'IMG' && element.width) {
+        element.width++; element.width--;
+      } else try {
+        var n = document.createTextNode(' ');
+        element.appendChild(n);
+        element.removeChild(n);
+      } catch (e) { }
+
+    return element;
+  };
+
+  // Safari returns margins on body which is incorrect if the child is absolutely
+  // positioned.  For performance reasons, redefine Element#cumulativeOffset for
+  // KHTML/WebKit only.
+  Element.Methods.cumulativeOffset = function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      if (element.offsetParent == document.body)
+        if (Element.getStyle(element, 'position') == 'absolute') break;
+
+      element = element.offsetParent;
+    } while (element);
+
+    return Element._returnOffset(valueL, valueT);
+  };
+}
+
+if (Prototype.Browser.IE || Prototype.Browser.Opera) {
+  // IE and Opera are missing .innerHTML support for TABLE-related and SELECT elements
+  Element.Methods.update = function(element, content) {
+    element = $(element);
+
+    if (content && content.toElement) content = content.toElement();
+    if (Object.isElement(content)) return element.update().insert(content);
+
+    content = Object.toHTML(content);
+    var tagName = element.tagName.toUpperCase();
+
+    if (tagName in Element._insertionTranslations.tags) {
+      $A(element.childNodes).each(function(node) { element.removeChild(node) });
+      Element._getContentFromAnonymousElement(tagName, content.stripScripts())
+        .each(function(node) { element.appendChild(node) });
+    }
+    else element.innerHTML = content.stripScripts();
+
+    content.evalScripts.bind(content).defer();
+    return element;
+  };
+}
+
+if ('outerHTML' in document.createElement('div')) {
+  Element.Methods.replace = function(element, content) {
+    element = $(element);
+
+    if (content && content.toElement) content = content.toElement();
+    if (Object.isElement(content)) {
+      element.parentNode.replaceChild(content, element);
+      return element;
+    }
+
+    content = Object.toHTML(content);
+    var parent = element.parentNode, tagName = parent.tagName.toUpperCase();
+
+    if (Element._insertionTranslations.tags[tagName]) {
+      var nextSibling = element.next();
+      var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
+      parent.removeChild(element);
+      if (nextSibling)
+        fragments.each(function(node) { parent.insertBefore(node, nextSibling) });
+      else
+        fragments.each(function(node) { parent.appendChild(node) });
+    }
+    else element.outerHTML = content.stripScripts();
+
+    content.evalScripts.bind(content).defer();
+    return element;
+  };
+}
+
+Element._returnOffset = function(l, t) {
+  var result = [l, t];
+  result.left = l;
+  result.top = t;
+  return result;
+};
+
+Element._getContentFromAnonymousElement = function(tagName, html) {
+  var div = new Element('div'), t = Element._insertionTranslations.tags[tagName];
+  if (t) {
+    div.innerHTML = t[0] + html + t[1];
+    t[2].times(function() { div = div.firstChild });
+  } else div.innerHTML = html;
+  return $A(div.childNodes);
+};
+
+Element._insertionTranslations = {
+  before: function(element, node) {
+    element.parentNode.insertBefore(node, element);
+  },
+  top: function(element, node) {
+    element.insertBefore(node, element.firstChild);
+  },
+  bottom: function(element, node) {
+    element.appendChild(node);
+  },
+  after: function(element, node) {
+    element.parentNode.insertBefore(node, element.nextSibling);
+  },
+  tags: {
+    TABLE:  ['<table>',                '</table>',                   1],
+    TBODY:  ['<table><tbody>',         '</tbody></table>',           2],
+    TR:     ['<table><tbody><tr>',     '</tr></tbody></table>',      3],
+    TD:     ['<table><tbody><tr><td>', '</td></tr></tbody></table>', 4],
+    SELECT: ['<select>',               '</select>',                  1]
+  }
+};
+
+(function() {
+  Object.extend(this.tags, {
+    THEAD: this.tags.TBODY,
+    TFOOT: this.tags.TBODY,
+    TH:    this.tags.TD
+  });
+}).call(Element._insertionTranslations);
+
+Element.Methods.Simulated = {
+  hasAttribute: function(element, attribute) {
+    attribute = Element._attributeTranslations.has[attribute] || attribute;
+    var node = $(element).getAttributeNode(attribute);
+    return !!(node && node.specified);
+  }
+};
+
+Element.Methods.ByTag = { };
+
+Object.extend(Element, Element.Methods);
+
+if (!Prototype.BrowserFeatures.ElementExtensions &&
+    document.createElement('div')['__proto__']) {
+  window.HTMLElement = { };
+  window.HTMLElement.prototype = document.createElement('div')['__proto__'];
+  Prototype.BrowserFeatures.ElementExtensions = true;
+}
+
+Element.extend = (function() {
+  if (Prototype.BrowserFeatures.SpecificElementExtensions)
+    return Prototype.K;
+
+  var Methods = { }, ByTag = Element.Methods.ByTag;
+
+  var extend = Object.extend(function(element) {
+    if (!element || element._extendedByPrototype ||
+        element.nodeType != 1 || element == window) return element;
+
+    var methods = Object.clone(Methods),
+      tagName = element.tagName.toUpperCase(), property, value;
+
+    // extend methods for specific tags
+    if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]);
+
+    for (property in methods) {
+      value = methods[property];
+      if (Object.isFunction(value) && !(property in element))
+        element[property] = value.methodize();
+    }
+
+    element._extendedByPrototype = Prototype.emptyFunction;
+    return element;
+
+  }, {
+    refresh: function() {
+      // extend methods for all tags (Safari doesn't need this)
+      if (!Prototype.BrowserFeatures.ElementExtensions) {
+        Object.extend(Methods, Element.Methods);
+        Object.extend(Methods, Element.Methods.Simulated);
+      }
+    }
+  });
+
+  extend.refresh();
+  return extend;
+})();
+
+Element.hasAttribute = function(element, attribute) {
+  if (element.hasAttribute) return element.hasAttribute(attribute);
+  return Element.Methods.Simulated.hasAttribute(element, attribute);
+};
+
+Element.addMethods = function(methods) {
+  var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag;
+
+  if (!methods) {
+    Object.extend(Form, Form.Methods);
+    Object.extend(Form.Element, Form.Element.Methods);
+    Object.extend(Element.Methods.ByTag, {
+      "FORM":     Object.clone(Form.Methods),
+      "INPUT":    Object.clone(Form.Element.Methods),
+      "SELECT":   Object.clone(Form.Element.Methods),
+      "TEXTAREA": Object.clone(Form.Element.Methods)
+    });
+  }
+
+  if (arguments.length == 2) {
+    var tagName = methods;
+    methods = arguments[1];
+  }
+
+  if (!tagName) Object.extend(Element.Methods, methods || { });
+  else {
+    if (Object.isArray(tagName)) tagName.each(extend);
+    else extend(tagName);
+  }
+
+  function extend(tagName) {
+    tagName = tagName.toUpperCase();
+    if (!Element.Methods.ByTag[tagName])
+      Element.Methods.ByTag[tagName] = { };
+    Object.extend(Element.Methods.ByTag[tagName], methods);
+  }
+
+  function copy(methods, destination, onlyIfAbsent) {
+    onlyIfAbsent = onlyIfAbsent || false;
+    for (var property in methods) {
+      var value = methods[property];
+      if (!Object.isFunction(value)) continue;
+      if (!onlyIfAbsent || !(property in destination))
+        destination[property] = value.methodize();
+    }
+  }
+
+  function findDOMClass(tagName) {
+    var klass;
+    var trans = {
+      "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph",
+      "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList",
+      "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading",
+      "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote",
+      "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION":
+      "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD":
+      "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR":
+      "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET":
+      "FrameSet", "IFRAME": "IFrame"
+    };
+    if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element';
+    if (window[klass]) return window[klass];
+    klass = 'HTML' + tagName + 'Element';
+    if (window[klass]) return window[klass];
+    klass = 'HTML' + tagName.capitalize() + 'Element';
+    if (window[klass]) return window[klass];
+
+    window[klass] = { };
+    window[klass].prototype = document.createElement(tagName)['__proto__'];
+    return window[klass];
+  }
+
+  if (F.ElementExtensions) {
+    copy(Element.Methods, HTMLElement.prototype);
+    copy(Element.Methods.Simulated, HTMLElement.prototype, true);
+  }
+
+  if (F.SpecificElementExtensions) {
+    for (var tag in Element.Methods.ByTag) {
+      var klass = findDOMClass(tag);
+      if (Object.isUndefined(klass)) continue;
+      copy(T[tag], klass.prototype);
+    }
+  }
+
+  Object.extend(Element, Element.Methods);
+  delete Element.ByTag;
+
+  if (Element.extend.refresh) Element.extend.refresh();
+  Element.cache = { };
+};
+
+document.viewport = {
+  getDimensions: function() {
+    var dimensions = { }, B = Prototype.Browser;
+    $w('width height').each(function(d) {
+      var D = d.capitalize();
+      if (B.WebKit && !document.evaluate) {
+        // Safari <3.0 needs self.innerWidth/Height
+        dimensions[d] = self['inner' + D];
+      } else if (B.Opera && parseFloat(window.opera.version()) < 9.5) {
+        // Opera <9.5 needs document.body.clientWidth/Height
+        dimensions[d] = document.body['client' + D]
+      } else {
+        dimensions[d] = document.documentElement['client' + D];
+      }
+    });
+    return dimensions;
+  },
+
+  getWidth: function() {
+    return this.getDimensions().width;
+  },
+
+  getHeight: function() {
+    return this.getDimensions().height;
+  },
+
+  getScrollOffsets: function() {
+    return Element._returnOffset(
+      window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft,
+      window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop);
+  }
+};
+/* Portions of the Selector class are derived from Jack Slocum's DomQuery,
+ * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style
+ * license.  Please see http://www.yui-ext.com/ for more information. */
+
+var Selector = Class.create({
+  initialize: function(expression) {
+    this.expression = expression.strip();
+
+    if (this.shouldUseSelectorsAPI()) {
+      this.mode = 'selectorsAPI';
+    } else if (this.shouldUseXPath()) {
+      this.mode = 'xpath';
+      this.compileXPathMatcher();
+    } else {
+      this.mode = "normal";
+      this.compileMatcher();
+    }
+
+  },
+
+  shouldUseXPath: function() {
+    if (!Prototype.BrowserFeatures.XPath) return false;
+
+    var e = this.expression;
+
+    // Safari 3 chokes on :*-of-type and :empty
+    if (Prototype.Browser.WebKit &&
+     (e.include("-of-type") || e.include(":empty")))
+      return false;
+
+    // XPath can't do namespaced attributes, nor can it read
+    // the "checked" property from DOM nodes
+    if ((/(\[[\w-]*?:|:checked)/).test(e))
+      return false;
+
+    return true;
+  },
+
+  shouldUseSelectorsAPI: function() {
+    if (!Prototype.BrowserFeatures.SelectorsAPI) return false;
+
+    if (!Selector._div) Selector._div = new Element('div');
+
+    // Make sure the browser treats the selector as valid. Test on an
+    // isolated element to minimize cost of this check.
+    try {
+      Selector._div.querySelector(this.expression);
+    } catch(e) {
+      return false;
+    }
+
+    return true;
+  },
+
+  compileMatcher: function() {
+    var e = this.expression, ps = Selector.patterns, h = Selector.handlers,
+        c = Selector.criteria, le, p, m;
+
+    if (Selector._cache[e]) {
+      this.matcher = Selector._cache[e];
+      return;
+    }
+
+    this.matcher = ["this.matcher = function(root) {",
+                    "var r = root, h = Selector.handlers, c = false, n;"];
+
+    while (e && le != e && (/\S/).test(e)) {
+      le = e;
+      for (var i in ps) {
+        p = ps[i];
+        if (m = e.match(p)) {
+          this.matcher.push(Object.isFunction(c[i]) ? c[i](m) :
+            new Template(c[i]).evaluate(m));
+          e = e.replace(m[0], '');
+          break;
+        }
+      }
+    }
+
+    this.matcher.push("return h.unique(n);\n}");
+    eval(this.matcher.join('\n'));
+    Selector._cache[this.expression] = this.matcher;
+  },
+
+  compileXPathMatcher: function() {
+    var e = this.expression, ps = Selector.patterns,
+        x = Selector.xpath, le, m;
+
+    if (Selector._cache[e]) {
+      this.xpath = Selector._cache[e]; return;
+    }
+
+    this.matcher = ['.//*'];
+    while (e && le != e && (/\S/).test(e)) {
+      le = e;
+      for (var i in ps) {
+        if (m = e.match(ps[i])) {
+          this.matcher.push(Object.isFunction(x[i]) ? x[i](m) :
+            new Template(x[i]).evaluate(m));
+          e = e.replace(m[0], '');
+          break;
+        }
+      }
+    }
+
+    this.xpath = this.matcher.join('');
+    Selector._cache[this.expression] = this.xpath;
+  },
+
+  findElements: function(root) {
+    root = root || document;
+    var e = this.expression, results;
+
+    switch (this.mode) {
+      case 'selectorsAPI':
+        // querySelectorAll queries document-wide, then filters to descendants
+        // of the context element. That's not what we want.
+        // Add an explicit context to the selector if necessary.
+        if (root !== document) {
+          var oldId = root.id, id = $(root).identify();
+          e = "#" + id + " " + e;
+        }
+
+        results = $A(root.querySelectorAll(e)).map(Element.extend);
+        root.id = oldId;
+
+        return results;
+      case 'xpath':
+        return document._getElementsByXPath(this.xpath, root);
+      default:
+       return this.matcher(root);
+    }
+  },
+
+  match: function(element) {
+    this.tokens = [];
+
+    var e = this.expression, ps = Selector.patterns, as = Selector.assertions;
+    var le, p, m;
+
+    while (e && le !== e && (/\S/).test(e)) {
+      le = e;
+      for (var i in ps) {
+        p = ps[i];
+        if (m = e.match(p)) {
+          // use the Selector.assertions methods unless the selector
+          // is too complex.
+          if (as[i]) {
+            this.tokens.push([i, Object.clone(m)]);
+            e = e.replace(m[0], '');
+          } else {
+            // reluctantly do a document-wide search
+            // and look for a match in the array
+            return this.findElements(document).include(element);
+          }
+        }
+      }
+    }
+
+    var match = true, name, matches;
+    for (var i = 0, token; token = this.tokens[i]; i++) {
+      name = token[0], matches = token[1];
+      if (!Selector.assertions[name](element, matches)) {
+        match = false; break;
+      }
+    }
+
+    return match;
+  },
+
+  toString: function() {
+    return this.expression;
+  },
+
+  inspect: function() {
+    return "#<Selector:" + this.expression.inspect() + ">";
+  }
+});
+
+Object.extend(Selector, {
+  _cache: { },
+
+  xpath: {
+    descendant:   "//*",
+    child:        "/*",
+    adjacent:     "/following-sibling::*[1]",
+    laterSibling: '/following-sibling::*',
+    tagName:      function(m) {
+      if (m[1] == '*') return '';
+      return "[local-name()='" + m[1].toLowerCase() +
+             "' or local-name()='" + m[1].toUpperCase() + "']";
+    },
+    className:    "[contains(concat(' ', @class, ' '), ' #{1} ')]",
+    id:           "[@id='#{1}']",
+    attrPresence: function(m) {
+      m[1] = m[1].toLowerCase();
+      return new Template("[@#{1}]").evaluate(m);
+    },
+    attr: function(m) {
+      m[1] = m[1].toLowerCase();
+      m[3] = m[5] || m[6];
+      return new Template(Selector.xpath.operators[m[2]]).evaluate(m);
+    },
+    pseudo: function(m) {
+      var h = Selector.xpath.pseudos[m[1]];
+      if (!h) return '';
+      if (Object.isFunction(h)) return h(m);
+      return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m);
+    },
+    operators: {
+      '=':  "[@#{1}='#{3}']",
+      '!=': "[@#{1}!='#{3}']",
+      '^=': "[starts-with(@#{1}, '#{3}')]",
+      '$=': "[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']",
+      '*=': "[contains(@#{1}, '#{3}')]",
+      '~=': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]",
+      '|=': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]"
+    },
+    pseudos: {
+      'first-child': '[not(preceding-sibling::*)]',
+      'last-child':  '[not(following-sibling::*)]',
+      'only-child':  '[not(preceding-sibling::* or following-sibling::*)]',
+      'empty':       "[count(*) = 0 and (count(text()) = 0)]",
+      'checked':     "[@checked]",
+      'disabled':    "[(@disabled) and (@type!='hidden')]",
+      'enabled':     "[not(@disabled) and (@type!='hidden')]",
+      'not': function(m) {
+        var e = m[6], p = Selector.patterns,
+            x = Selector.xpath, le, v;
+
+        var exclusion = [];
+        while (e && le != e && (/\S/).test(e)) {
+          le = e;
+          for (var i in p) {
+            if (m = e.match(p[i])) {
+              v = Object.isFunction(x[i]) ? x[i](m) : new Template(x[i]).evaluate(m);
+              exclusion.push("(" + v.substring(1, v.length - 1) + ")");
+              e = e.replace(m[0], '');
+              break;
+            }
+          }
+        }
+        return "[not(" + exclusion.join(" and ") + ")]";
+      },
+      'nth-child':      function(m) {
+        return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ", m);
+      },
+      'nth-last-child': function(m) {
+        return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ", m);
+      },
+      'nth-of-type':    function(m) {
+        return Selector.xpath.pseudos.nth("position() ", m);
+      },
+      'nth-last-of-type': function(m) {
+        return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", m);
+      },
+      'first-of-type':  function(m) {
+        m[6] = "1"; return Selector.xpath.pseudos['nth-of-type'](m);
+      },
+      'last-of-type':   function(m) {
+        m[6] = "1"; return Selector.xpath.pseudos['nth-last-of-type'](m);
+      },
+      'only-of-type':   function(m) {
+        var p = Selector.xpath.pseudos; return p['first-of-type'](m) + p['last-of-type'](m);
+      },
+      nth: function(fragment, m) {
+        var mm, formula = m[6], predicate;
+        if (formula == 'even') formula = '2n+0';
+        if (formula == 'odd')  formula = '2n+1';
+        if (mm = formula.match(/^(\d+)$/)) // digit only
+          return '[' + fragment + "= " + mm[1] + ']';
+        if (mm = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
+          if (mm[1] == "-") mm[1] = -1;
+          var a = mm[1] ? Number(mm[1]) : 1;
+          var b = mm[2] ? Number(mm[2]) : 0;
+          predicate = "[((#{fragment} - #{b}) mod #{a} = 0) and " +
+          "((#{fragment} - #{b}) div #{a} >= 0)]";
+          return new Template(predicate).evaluate({
+            fragment: fragment, a: a, b: b });
+        }
+      }
+    }
+  },
+
+  criteria: {
+    tagName:      'n = h.tagName(n, r, "#{1}", c);      c = false;',
+    className:    'n = h.className(n, r, "#{1}", c);    c = false;',
+    id:           'n = h.id(n, r, "#{1}", c);           c = false;',
+    attrPresence: 'n = h.attrPresence(n, r, "#{1}", c); c = false;',
+    attr: function(m) {
+      m[3] = (m[5] || m[6]);
+      return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(m);
+    },
+    pseudo: function(m) {
+      if (m[6]) m[6] = m[6].replace(/"/g, '\\"');
+      return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m);
+    },
+    descendant:   'c = "descendant";',
+    child:        'c = "child";',
+    adjacent:     'c = "adjacent";',
+    laterSibling: 'c = "laterSibling";'
+  },
+
+  patterns: {
+    // combinators must be listed first
+    // (and descendant needs to be last combinator)
+    laterSibling: /^\s*~\s*/,
+    child:        /^\s*>\s*/,
+    adjacent:     /^\s*\+\s*/,
+    descendant:   /^\s/,
+
+    // selectors follow
+    tagName:      /^\s*(\*|[\w\-]+)(\b|$)?/,
+    id:           /^#([\w\-\*]+)(\b|$)/,
+    className:    /^\.([\w\-\*]+)(\b|$)/,
+    pseudo:
+/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/,
+    attrPresence: /^\[((?:[\w]+:)?[\w]+)\]/,
+    attr:         /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/
+  },
+
+  // for Selector.match and Element#match
+  assertions: {
+    tagName: function(element, matches) {
+      return matches[1].toUpperCase() == element.tagName.toUpperCase();
+    },
+
+    className: function(element, matches) {
+      return Element.hasClassName(element, matches[1]);
+    },
+
+    id: function(element, matches) {
+      return element.id === matches[1];
+    },
+
+    attrPresence: function(element, matches) {
+      return Element.hasAttribute(element, matches[1]);
+    },
+
+    attr: function(element, matches) {
+      var nodeValue = Element.readAttribute(element, matches[1]);
+      return nodeValue && Selector.operators[matches[2]](nodeValue, matches[5] || matches[6]);
+    }
+  },
+
+  handlers: {
+    // UTILITY FUNCTIONS
+    // joins two collections
+    concat: function(a, b) {
+      for (var i = 0, node; node = b[i]; i++)
+        a.push(node);
+      return a;
+    },
+
+    // marks an array of nodes for counting
+    mark: function(nodes) {
+      var _true = Prototype.emptyFunction;
+      for (var i = 0, node; node = nodes[i]; i++)
+        node._countedByPrototype = _true;
+      return nodes;
+    },
+
+    unmark: function(nodes) {
+      for (var i = 0, node; node = nodes[i]; i++)
+        node._countedByPrototype = undefined;
+      return nodes;
+    },
+
+    // mark each child node with its position (for nth calls)
+    // "ofType" flag indicates whether we're indexing for nth-of-type
+    // rather than nth-child
+    index: function(parentNode, reverse, ofType) {
+      parentNode._countedByPrototype = Prototype.emptyFunction;
+      if (reverse) {
+        for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) {
+          var node = nodes[i];
+          if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;
+        }
+      } else {
+        for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++)
+          if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;
+      }
+    },
+
+    // filters out duplicates and extends all nodes
+    unique: function(nodes) {
+      if (nodes.length == 0) return nodes;
+      var results = [], n;
+      for (var i = 0, l = nodes.length; i < l; i++)
+        if (!(n = nodes[i])._countedByPrototype) {
+          n._countedByPrototype = Prototype.emptyFunction;
+          results.push(Element.extend(n));
+        }
+      return Selector.handlers.unmark(results);
+    },
+
+    // COMBINATOR FUNCTIONS
+    descendant: function(nodes) {
+      var h = Selector.handlers;
+      for (var i = 0, results = [], node; node = nodes[i]; i++)
+        h.concat(results, node.getElementsByTagName('*'));
+      return results;
+    },
+
+    child: function(nodes) {
+      var h = Selector.handlers;
+      for (var i = 0, results = [], node; node = nodes[i]; i++) {
+        for (var j = 0, child; child = node.childNodes[j]; j++)
+          if (child.nodeType == 1 && child.tagName != '!') results.push(child);
+      }
+      return results;
+    },
+
+    adjacent: function(nodes) {
+      for (var i = 0, results = [], node; node = nodes[i]; i++) {
+        var next = this.nextElementSibling(node);
+        if (next) results.push(next);
+      }
+      return results;
+    },
+
+    laterSibling: function(nodes) {
+      var h = Selector.handlers;
+      for (var i = 0, results = [], node; node = nodes[i]; i++)
+        h.concat(results, Element.nextSiblings(node));
+      return results;
+    },
+
+    nextElementSibling: function(node) {
+      while (node = node.nextSibling)
+        if (node.nodeType == 1) return node;
+      return null;
+    },
+
+    previousElementSibling: function(node) {
+      while (node = node.previousSibling)
+        if (node.nodeType == 1) return node;
+      return null;
+    },
+
+    // TOKEN FUNCTIONS
+    tagName: function(nodes, root, tagName, combinator) {
+      var uTagName = tagName.toUpperCase();
+      var results = [], h = Selector.handlers;
+      if (nodes) {
+        if (combinator) {
+          // fastlane for ordinary descendant combinators
+          if (combinator == "descendant") {
+            for (var i = 0, node; node = nodes[i]; i++)
+              h.concat(results, node.getElementsByTagName(tagName));
+            return results;
+          } else nodes = this[combinator](nodes);
+          if (tagName == "*") return nodes;
+        }
+        for (var i = 0, node; node = nodes[i]; i++)
+          if (node.tagName.toUpperCase() === uTagName) results.push(node);
+        return results;
+      } else return root.getElementsByTagName(tagName);
+    },
+
+    id: function(nodes, root, id, combinator) {
+      var targetNode = $(id), h = Selector.handlers;
+      if (!targetNode) return [];
+      if (!nodes && root == document) return [targetNode];
+      if (nodes) {
+        if (combinator) {
+          if (combinator == 'child') {
+            for (var i = 0, node; node = nodes[i]; i++)
+              if (targetNode.parentNode == node) return [targetNode];
+          } else if (combinator == 'descendant') {
+            for (var i = 0, node; node = nodes[i]; i++)
+              if (Element.descendantOf(targetNode, node)) return [targetNode];
+          } else if (combinator == 'adjacent') {
+            for (var i = 0, node; node = nodes[i]; i++)
+              if (Selector.handlers.previousElementSibling(targetNode) == node)
+                return [targetNode];
+          } else nodes = h[combinator](nodes);
+        }
+        for (var i = 0, node; node = nodes[i]; i++)
+          if (node == targetNode) return [targetNode];
+        return [];
+      }
+      return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : [];
+    },
+
+    className: function(nodes, root, className, combinator) {
+      if (nodes && combinator) nodes = this[combinator](nodes);
+      return Selector.handlers.byClassName(nodes, root, className);
+    },
+
+    byClassName: function(nodes, root, className) {
+      if (!nodes) nodes = Selector.handlers.descendant([root]);
+      var needle = ' ' + className + ' ';
+      for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) {
+        nodeClassName = node.className;
+        if (nodeClassName.length == 0) continue;
+        if (nodeClassName == className || (' ' + nodeClassName + ' ').include(needle))
+          results.push(node);
+      }
+      return results;
+    },
+
+    attrPresence: function(nodes, root, attr, combinator) {
+      if (!nodes) nodes = root.getElementsByTagName("*");
+      if (nodes && combinator) nodes = this[combinator](nodes);
+      var results = [];
+      for (var i = 0, node; node = nodes[i]; i++)
+        if (Element.hasAttribute(node, attr)) results.push(node);
+      return results;
+    },
+
+    attr: function(nodes, root, attr, value, operator, combinator) {
+      if (!nodes) nodes = root.getElementsByTagName("*");
+      if (nodes && combinator) nodes = this[combinator](nodes);
+      var handler = Selector.operators[operator], results = [];
+      for (var i = 0, node; node = nodes[i]; i++) {
+        var nodeValue = Element.readAttribute(node, attr);
+        if (nodeValue === null) continue;
+        if (handler(nodeValue, value)) results.push(node);
+      }
+      return results;
+    },
+
+    pseudo: function(nodes, name, value, root, combinator) {
+      if (nodes && combinator) nodes = this[combinator](nodes);
+      if (!nodes) nodes = root.getElementsByTagName("*");
+      return Selector.pseudos[name](nodes, value, root);
+    }
+  },
+
+  pseudos: {
+    'first-child': function(nodes, value, root) {
+      for (var i = 0, results = [], node; node = nodes[i]; i++) {
+        if (Selector.handlers.previousElementSibling(node)) continue;
+          results.push(node);
+      }
+      return results;
+    },
+    'last-child': function(nodes, value, root) {
+      for (var i = 0, results = [], node; node = nodes[i]; i++) {
+        if (Selector.handlers.nextElementSibling(node)) continue;
+          results.push(node);
+      }
+      return results;
+    },
+    'only-child': function(nodes, value, root) {
+      var h = Selector.handlers;
+      for (var i = 0, results = [], node; node = nodes[i]; i++)
+        if (!h.previousElementSibling(node) && !h.nextElementSibling(node))
+          results.push(node);
+      return results;
+    },
+    'nth-child':        function(nodes, formula, root) {
+      return Selector.pseudos.nth(nodes, formula, root);
+    },
+    'nth-last-child':   function(nodes, formula, root) {
+      return Selector.pseudos.nth(nodes, formula, root, true);
+    },
+    'nth-of-type':      function(nodes, formula, root) {
+      return Selector.pseudos.nth(nodes, formula, root, false, true);
+    },
+    'nth-last-of-type': function(nodes, formula, root) {
+      return Selector.pseudos.nth(nodes, formula, root, true, true);
+    },
+    'first-of-type':    function(nodes, formula, root) {
+      return Selector.pseudos.nth(nodes, "1", root, false, true);
+    },
+    'last-of-type':     function(nodes, formula, root) {
+      return Selector.pseudos.nth(nodes, "1", root, true, true);
+    },
+    'only-of-type':     function(nodes, formula, root) {
+      var p = Selector.pseudos;
+      return p['last-of-type'](p['first-of-type'](nodes, formula, root), formula, root);
+    },
+
+    // handles the an+b logic
+    getIndices: function(a, b, total) {
+      if (a == 0) return b > 0 ? [b] : [];
+      return $R(1, total).inject([], function(memo, i) {
+        if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i);
+        return memo;
+      });
+    },
+
+    // handles nth(-last)-child, nth(-last)-of-type, and (first|last)-of-type
+    nth: function(nodes, formula, root, reverse, ofType) {
+      if (nodes.length == 0) return [];
+      if (formula == 'even') formula = '2n+0';
+      if (formula == 'odd')  formula = '2n+1';
+      var h = Selector.handlers, results = [], indexed = [], m;
+      h.mark(nodes);
+      for (var i = 0, node; node = nodes[i]; i++) {
+        if (!node.parentNode._countedByPrototype) {
+          h.index(node.parentNode, reverse, ofType);
+          indexed.push(node.parentNode);
+        }
+      }
+      if (formula.match(/^\d+$/)) { // just a number
+        formula = Number(formula);
+        for (var i = 0, node; node = nodes[i]; i++)
+          if (node.nodeIndex == formula) results.push(node);
+      } else if (m = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
+        if (m[1] == "-") m[1] = -1;
+        var a = m[1] ? Number(m[1]) : 1;
+        var b = m[2] ? Number(m[2]) : 0;
+        var indices = Selector.pseudos.getIndices(a, b, nodes.length);
+        for (var i = 0, node, l = indices.length; node = nodes[i]; i++) {
+          for (var j = 0; j < l; j++)
+            if (node.nodeIndex == indices[j]) results.push(node);
+        }
+      }
+      h.unmark(nodes);
+      h.unmark(indexed);
+      return results;
+    },
+
+    'empty': function(nodes, value, root) {
+      for (var i = 0, results = [], node; node = nodes[i]; i++) {
+        // IE treats comments as element nodes
+        if (node.tagName == '!' || node.firstChild) continue;
+        results.push(node);
+      }
+      return results;
+    },
+
+    'not': function(nodes, selector, root) {
+      var h = Selector.handlers, selectorType, m;
+      var exclusions = new Selector(selector).findElements(root);
+      h.mark(exclusions);
+      for (var i = 0, results = [], node; node = nodes[i]; i++)
+        if (!node._countedByPrototype) results.push(node);
+      h.unmark(exclusions);
+      return results;
+    },
+
+    'enabled': function(nodes, value, root) {
+      for (var i = 0, results = [], node; node = nodes[i]; i++)
+        if (!node.disabled && (!node.type || node.type !== 'hidden'))
+          results.push(node);
+      return results;
+    },
+
+    'disabled': function(nodes, value, root) {
+      for (var i = 0, results = [], node; node = nodes[i]; i++)
+        if (node.disabled) results.push(node);
+      return results;
+    },
+
+    'checked': function(nodes, value, root) {
+      for (var i = 0, results = [], node; node = nodes[i]; i++)
+        if (node.checked) results.push(node);
+      return results;
+    }
+  },
+
+  operators: {
+    '=':  function(nv, v) { return nv == v; },
+    '!=': function(nv, v) { return nv != v; },
+    '^=': function(nv, v) { return nv == v || nv && nv.startsWith(v); },
+    '$=': function(nv, v) { return nv == v || nv && nv.endsWith(v); },
+    '*=': function(nv, v) { return nv == v || nv && nv.include(v); },
+    '$=': function(nv, v) { return nv.endsWith(v); },
+    '*=': function(nv, v) { return nv.include(v); },
+    '~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); },
+    '|=': function(nv, v) { return ('-' + (nv || "").toUpperCase() +
+     '-').include('-' + (v || "").toUpperCase() + '-'); }
+  },
+
+  split: function(expression) {
+    var expressions = [];
+    expression.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) {
+      expressions.push(m[1].strip());
+    });
+    return expressions;
+  },
+
+  matchElements: function(elements, expression) {
+    var matches = $$(expression), h = Selector.handlers;
+    h.mark(matches);
+    for (var i = 0, results = [], element; element = elements[i]; i++)
+      if (element._countedByPrototype) results.push(element);
+    h.unmark(matches);
+    return results;
+  },
+
+  findElement: function(elements, expression, index) {
+    if (Object.isNumber(expression)) {
+      index = expression; expression = false;
+    }
+    return Selector.matchElements(elements, expression || '*')[index || 0];
+  },
+
+  findChildElements: function(element, expressions) {
+    expressions = Selector.split(expressions.join(','));
+    var results = [], h = Selector.handlers;
+    for (var i = 0, l = expressions.length, selector; i < l; i++) {
+      selector = new Selector(expressions[i].strip());
+      h.concat(results, selector.findElements(element));
+    }
+    return (l > 1) ? h.unique(results) : results;
+  }
+});
+
+if (Prototype.Browser.IE) {
+  Object.extend(Selector.handlers, {
+    // IE returns comment nodes on getElementsByTagName("*").
+    // Filter them out.
+    concat: function(a, b) {
+      for (var i = 0, node; node = b[i]; i++)
+        if (node.tagName !== "!") a.push(node);
+      return a;
+    },
+
+    // IE improperly serializes _countedByPrototype in (inner|outer)HTML.
+    unmark: function(nodes) {
+      for (var i = 0, node; node = nodes[i]; i++)
+        node.removeAttribute('_countedByPrototype');
+      return nodes;
+    }
+  });
+}
+
+function $$() {
+  return Selector.findChildElements(document, $A(arguments));
+}
+var Form = {
+  reset: function(form) {
+    $(form).reset();
+    return form;
+  },
+
+  serializeElements: function(elements, options) {
+    if (typeof options != 'object') options = { hash: !!options };
+    else if (Object.isUndefined(options.hash)) options.hash = true;
+    var key, value, submitted = false, submit = options.submit;
+
+    var data = elements.inject({ }, function(result, element) {
+      if (!element.disabled && element.name) {
+        key = element.name; value = $(element).getValue();
+        if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted &&
+            submit !== false && (!submit || key == submit) && (submitted = true)))) {
+          if (key in result) {
+            // a key is already present; construct an array of values
+            if (!Object.isArray(result[key])) result[key] = [result[key]];
+            result[key].push(value);
+          }
+          else result[key] = value;
+        }
+      }
+      return result;
+    });
+
+    return options.hash ? data : Object.toQueryString(data);
+  }
+};
+
+Form.Methods = {
+  serialize: function(form, options) {
+    return Form.serializeElements(Form.getElements(form), options);
+  },
+
+  getElements: function(form) {
+    return $A($(form).getElementsByTagName('*')).inject([],
+      function(elements, child) {
+        if (Form.Element.Serializers[child.tagName.toLowerCase()])
+          elements.push(Element.extend(child));
+        return elements;
+      }
+    );
+  },
+
+  getInputs: function(form, typeName, name) {
+    form = $(form);
+    var inputs = form.getElementsByTagName('input');
+
+    if (!typeName && !name) return $A(inputs).map(Element.extend);
+
+    for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) {
+      var input = inputs[i];
+      if ((typeName && input.type != typeName) || (name && input.name != name))
+        continue;
+      matchingInputs.push(Element.extend(input));
+    }
+
+    return matchingInputs;
+  },
+
+  disable: function(form) {
+    form = $(form);
+    Form.getElements(form).invoke('disable');
+    return form;
+  },
+
+  enable: function(form) {
+    form = $(form);
+    Form.getElements(form).invoke('enable');
+    return form;
+  },
+
+  findFirstElement: function(form) {
+    var elements = $(form).getElements().findAll(function(element) {
+      return 'hidden' != element.type && !element.disabled;
+    });
+    var firstByIndex = elements.findAll(function(element) {
+      return element.hasAttribute('tabIndex') && element.tabIndex >= 0;
+    }).sortBy(function(element) { return element.tabIndex }).first();
+
+    return firstByIndex ? firstByIndex : elements.find(function(element) {
+      return ['input', 'select', 'textarea'].include(element.tagName.toLowerCase());
+    });
+  },
+
+  focusFirstElement: function(form) {
+    form = $(form);
+    form.findFirstElement().activate();
+    return form;
+  },
+
+  request: function(form, options) {
+    form = $(form), options = Object.clone(options || { });
+
+    var params = options.parameters, action = form.readAttribute('action') || '';
+    if (action.blank()) action = window.location.href;
+    options.parameters = form.serialize(true);
+
+    if (params) {
+      if (Object.isString(params)) params = params.toQueryParams();
+      Object.extend(options.parameters, params);
+    }
+
+    if (form.hasAttribute('method') && !options.method)
+      options.method = form.method;
+
+    return new Ajax.Request(action, options);
+  }
+};
+
+/*--------------------------------------------------------------------------*/
+
+Form.Element = {
+  focus: function(element) {
+    $(element).focus();
+    return element;
+  },
+
+  select: function(element) {
+    $(element).select();
+    return element;
+  }
+};
+
+Form.Element.Methods = {
+  serialize: function(element) {
+    element = $(element);
+    if (!element.disabled && element.name) {
+      var value = element.getValue();
+      if (value != undefined) {
+        var pair = { };
+        pair[element.name] = value;
+        return Object.toQueryString(pair);
+      }
+    }
+    return '';
+  },
+
+  getValue: function(element) {
+    element = $(element);
+    var method = element.tagName.toLowerCase();
+    return Form.Element.Serializers[method](element);
+  },
+
+  setValue: function(element, value) {
+    element = $(element);
+    var method = element.tagName.toLowerCase();
+    Form.Element.Serializers[method](element, value);
+    return element;
+  },
+
+  clear: function(element) {
+    $(element).value = '';
+    return element;
+  },
+
+  present: function(element) {
+    return $(element).value != '';
+  },
+
+  activate: function(element) {
+    element = $(element);
+    try {
+      element.focus();
+      if (element.select && (element.tagName.toLowerCase() != 'input' ||
+          !['button', 'reset', 'submit'].include(element.type)))
+        element.select();
+    } catch (e) { }
+    return element;
+  },
+
+  disable: function(element) {
+    element = $(element);
+    element.disabled = true;
+    return element;
+  },
+
+  enable: function(element) {
+    element = $(element);
+    element.disabled = false;
+    return element;
+  }
+};
+
+/*--------------------------------------------------------------------------*/
+
+var Field = Form.Element;
+var $F = Form.Element.Methods.getValue;
+
+/*--------------------------------------------------------------------------*/
+
+Form.Element.Serializers = {
+  input: function(element, value) {
+    switch (element.type.toLowerCase()) {
+      case 'checkbox':
+      case 'radio':
+        return Form.Element.Serializers.inputSelector(element, value);
+      default:
+        return Form.Element.Serializers.textarea(element, value);
+    }
+  },
+
+  inputSelector: function(element, value) {
+    if (Object.isUndefined(value)) return element.checked ? element.value : null;
+    else element.checked = !!value;
+  },
+
+  textarea: function(element, value) {
+    if (Object.isUndefined(value)) return element.value;
+    else element.value = value;
+  },
+
+  select: function(element, value) {
+    if (Object.isUndefined(value))
+      return this[element.type == 'select-one' ?
+        'selectOne' : 'selectMany'](element);
+    else {
+      var opt, currentValue, single = !Object.isArray(value);
+      for (var i = 0, length = element.length; i < length; i++) {
+        opt = element.options[i];
+        currentValue = this.optionValue(opt);
+        if (single) {
+          if (currentValue == value) {
+            opt.selected = true;
+            return;
+          }
+        }
+        else opt.selected = value.include(currentValue);
+      }
+    }
+  },
+
+  selectOne: function(element) {
+    var index = element.selectedIndex;
+    return index >= 0 ? this.optionValue(element.options[index]) : null;
+  },
+
+  selectMany: function(element) {
+    var values, length = element.length;
+    if (!length) return null;
+
+    for (var i = 0, values = []; i < length; i++) {
+      var opt = element.options[i];
+      if (opt.selected) values.push(this.optionValue(opt));
+    }
+    return values;
+  },
+
+  optionValue: function(opt) {
+    // extend element because hasAttribute may not be native
+    return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text;
+  }
+};
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.TimedObserver = Class.create(PeriodicalExecuter, {
+  initialize: function($super, element, frequency, callback) {
+    $super(callback, frequency);
+    this.element   = $(element);
+    this.lastValue = this.getValue();
+  },
+
+  execute: function() {
+    var value = this.getValue();
+    if (Object.isString(this.lastValue) && Object.isString(value) ?
+        this.lastValue != value : String(this.lastValue) != String(value)) {
+      this.callback(this.element, value);
+      this.lastValue = value;
+    }
+  }
+});
+
+Form.Element.Observer = Class.create(Abstract.TimedObserver, {
+  getValue: function() {
+    return Form.Element.getValue(this.element);
+  }
+});
+
+Form.Observer = Class.create(Abstract.TimedObserver, {
+  getValue: function() {
+    return Form.serialize(this.element);
+  }
+});
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.EventObserver = Class.create({
+  initialize: function(element, callback) {
+    this.element  = $(element);
+    this.callback = callback;
+
+    this.lastValue = this.getValue();
+    if (this.element.tagName.toLowerCase() == 'form')
+      this.registerFormCallbacks();
+    else
+      this.registerCallback(this.element);
+  },
+
+  onElementEvent: function() {
+    var value = this.getValue();
+    if (this.lastValue != value) {
+      this.callback(this.element, value);
+      this.lastValue = value;
+    }
+  },
+
+  registerFormCallbacks: function() {
+    Form.getElements(this.element).each(this.registerCallback, this);
+  },
+
+  registerCallback: function(element) {
+    if (element.type) {
+      switch (element.type.toLowerCase()) {
+        case 'checkbox':
+        case 'radio':
+          Event.observe(element, 'click', this.onElementEvent.bind(this));
+          break;
+        default:
+          Event.observe(element, 'change', this.onElementEvent.bind(this));
+          break;
+      }
+    }
+  }
+});
+
+Form.Element.EventObserver = Class.create(Abstract.EventObserver, {
+  getValue: function() {
+    return Form.Element.getValue(this.element);
+  }
+});
+
+Form.EventObserver = Class.create(Abstract.EventObserver, {
+  getValue: function() {
+    return Form.serialize(this.element);
+  }
+});
+if (!window.Event) var Event = { };
+
+Object.extend(Event, {
+  KEY_BACKSPACE: 8,
+  KEY_TAB:       9,
+  KEY_RETURN:   13,
+  KEY_ESC:      27,
+  KEY_LEFT:     37,
+  KEY_UP:       38,
+  KEY_RIGHT:    39,
+  KEY_DOWN:     40,
+  KEY_DELETE:   46,
+  KEY_HOME:     36,
+  KEY_END:      35,
+  KEY_PAGEUP:   33,
+  KEY_PAGEDOWN: 34,
+  KEY_INSERT:   45,
+
+  cache: { },
+
+  relatedTarget: function(event) {
+    var element;
+    switch(event.type) {
+      case 'mouseover': element = event.fromElement; break;
+      case 'mouseout':  element = event.toElement;   break;
+      default: return null;
+    }
+    return Element.extend(element);
+  }
+});
+
+Event.Methods = (function() {
+  var isButton;
+
+  if (Prototype.Browser.IE) {
+    var buttonMap = { 0: 1, 1: 4, 2: 2 };
+    isButton = function(event, code) {
+      return event.button == buttonMap[code];
+    };
+
+  } else if (Prototype.Browser.WebKit) {
+    isButton = function(event, code) {
+      switch (code) {
+        case 0: return event.which == 1 && !event.metaKey;
+        case 1: return event.which == 1 && event.metaKey;
+        default: return false;
+      }
+    };
+
+  } else {
+    isButton = function(event, code) {
+      return event.which ? (event.which === code + 1) : (event.button === code);
+    };
+  }
+
+  return {
+    isLeftClick:   function(event) { return isButton(event, 0) },
+    isMiddleClick: function(event) { return isButton(event, 1) },
+    isRightClick:  function(event) { return isButton(event, 2) },
+
+    element: function(event) {
+      event = Event.extend(event);
+
+      var node          = event.target,
+          type          = event.type,
+          currentTarget = event.currentTarget;
+
+      if (currentTarget && currentTarget.tagName) {
+        // Firefox screws up the "click" event when moving between radio buttons
+        // via arrow keys. It also screws up the "load" and "error" events on images,
+        // reporting the document as the target instead of the original image.
+        if (type === 'load' || type === 'error' ||
+          (type === 'click' && currentTarget.tagName.toLowerCase() === 'input'
+            && currentTarget.type === 'radio'))
+              node = currentTarget;
+      }
+      if (node.nodeType == Node.TEXT_NODE) node = node.parentNode;
+      return Element.extend(node);
+    },
+
+    findElement: function(event, expression) {
+      var element = Event.element(event);
+      if (!expression) return element;
+      var elements = [element].concat(element.ancestors());
+      return Selector.findElement(elements, expression, 0);
+    },
+
+    pointer: function(event) {
+      var docElement = document.documentElement,
+      body = document.body || { scrollLeft: 0, scrollTop: 0 };
+      return {
+        x: event.pageX || (event.clientX +
+          (docElement.scrollLeft || body.scrollLeft) -
+          (docElement.clientLeft || 0)),
+        y: event.pageY || (event.clientY +
+          (docElement.scrollTop || body.scrollTop) -
+          (docElement.clientTop || 0))
+      };
+    },
+
+    pointerX: function(event) { return Event.pointer(event).x },
+    pointerY: function(event) { return Event.pointer(event).y },
+
+    stop: function(event) {
+      Event.extend(event);
+      event.preventDefault();
+      event.stopPropagation();
+      event.stopped = true;
+    }
+  };
+})();
+
+Event.extend = (function() {
+  var methods = Object.keys(Event.Methods).inject({ }, function(m, name) {
+    m[name] = Event.Methods[name].methodize();
+    return m;
+  });
+
+  if (Prototype.Browser.IE) {
+    Object.extend(methods, {
+      stopPropagation: function() { this.cancelBubble = true },
+      preventDefault:  function() { this.returnValue = false },
+      inspect: function() { return "[object Event]" }
+    });
+
+    return function(event) {
+      if (!event) return false;
+      if (event._extendedByPrototype) return event;
+
+      event._extendedByPrototype = Prototype.emptyFunction;
+      var pointer = Event.pointer(event);
+      Object.extend(event, {
+        target: event.srcElement,
+        relatedTarget: Event.relatedTarget(event),
+        pageX:  pointer.x,
+        pageY:  pointer.y
+      });
+      return Object.extend(event, methods);
+    };
+
+  } else {
+    Event.prototype = Event.prototype || document.createEvent("HTMLEvents")['__proto__'];
+    Object.extend(Event.prototype, methods);
+    return Prototype.K;
+  }
+})();
+
+Object.extend(Event, (function() {
+  var cache = Event.cache;
+
+  function getEventID(element) {
+    if (element._prototypeEventID) return element._prototypeEventID[0];
+    arguments.callee.id = arguments.callee.id || 1;
+    return element._prototypeEventID = [++arguments.callee.id];
+  }
+
+  function getDOMEventName(eventName) {
+    if (eventName && eventName.include(':')) return "dataavailable";
+    return eventName;
+  }
+
+  function getCacheForID(id) {
+    return cache[id] = cache[id] || { };
+  }
+
+  function getWrappersForEventName(id, eventName) {
+    var c = getCacheForID(id);
+    return c[eventName] = c[eventName] || [];
+  }
+
+  function createWrapper(element, eventName, handler) {
+    var id = getEventID(element);
+    var c = getWrappersForEventName(id, eventName);
+    if (c.pluck("handler").include(handler)) return false;
+
+    var wrapper = function(event) {
+      if (!Event || !Event.extend ||
+        (event.eventName && event.eventName != eventName))
+          return false;
+
+      Event.extend(event);
+      handler.call(element, event);
+    };
+
+    wrapper.handler = handler;
+    c.push(wrapper);
+    return wrapper;
+  }
+
+  function findWrapper(id, eventName, handler) {
+    var c = getWrappersForEventName(id, eventName);
+    return c.find(function(wrapper) { return wrapper.handler == handler });
+  }
+
+  function destroyWrapper(id, eventName, handler) {
+    var c = getCacheForID(id);
+    if (!c[eventName]) return false;
+    c[eventName] = c[eventName].without(findWrapper(id, eventName, handler));
+  }
+
+  function destroyCache() {
+    for (var id in cache)
+      for (var eventName in cache[id])
+        cache[id][eventName] = null;
+  }
+
+
+  // Internet Explorer needs to remove event handlers on page unload
+  // in order to avoid memory leaks.
+  if (window.attachEvent) {
+    window.attachEvent("onunload", destroyCache);
+  }
+
+  // Safari has a dummy event handler on page unload so that it won't
+  // use its bfcache. Safari <= 3.1 has an issue with restoring the "document"
+  // object when page is returned to via the back button using its bfcache.
+  if (Prototype.Browser.WebKit) {
+    window.addEventListener('unload', Prototype.emptyFunction, false);
+  }
+
+  return {
+    observe: function(element, eventName, handler) {
+      element = $(element);
+      var name = getDOMEventName(eventName);
+
+      var wrapper = createWrapper(element, eventName, handler);
+      if (!wrapper) return element;
+
+      if (element.addEventListener) {
+        element.addEventListener(name, wrapper, false);
+      } else {
+        element.attachEvent("on" + name, wrapper);
+      }
+
+      return element;
+    },
+
+    stopObserving: function(element, eventName, handler) {
+      element = $(element);
+      var id = getEventID(element), name = getDOMEventName(eventName);
+
+      if (!handler && eventName) {
+        getWrappersForEventName(id, eventName).each(function(wrapper) {
+          element.stopObserving(eventName, wrapper.handler);
+        });
+        return element;
+
+      } else if (!eventName) {
+        Object.keys(getCacheForID(id)).each(function(eventName) {
+          element.stopObserving(eventName);
+        });
+        return element;
+      }
+
+      var wrapper = findWrapper(id, eventName, handler);
+      if (!wrapper) return element;
+
+      if (element.removeEventListener) {
+        element.removeEventListener(name, wrapper, false);
+      } else {
+        element.detachEvent("on" + name, wrapper);
+      }
+
+      destroyWrapper(id, eventName, handler);
+
+      return element;
+    },
+
+    fire: function(element, eventName, memo) {
+      element = $(element);
+      if (element == document && document.createEvent && !element.dispatchEvent)
+        element = document.documentElement;
+
+      var event;
+      if (document.createEvent) {
+        event = document.createEvent("HTMLEvents");
+        event.initEvent("dataavailable", true, true);
+      } else {
+        event = document.createEventObject();
+        event.eventType = "ondataavailable";
+      }
+
+      event.eventName = eventName;
+      event.memo = memo || { };
+
+      if (document.createEvent) {
+        element.dispatchEvent(event);
+      } else {
+        element.fireEvent(event.eventType, event);
+      }
+
+      return Event.extend(event);
+    }
+  };
+})());
+
+Object.extend(Event, Event.Methods);
+
+Element.addMethods({
+  fire:          Event.fire,
+  observe:       Event.observe,
+  stopObserving: Event.stopObserving
+});
+
+Object.extend(document, {
+  fire:          Element.Methods.fire.methodize(),
+  observe:       Element.Methods.observe.methodize(),
+  stopObserving: Element.Methods.stopObserving.methodize(),
+  loaded:        false
+});
+
+(function() {
+  /* Support for the DOMContentLoaded event is based on work by Dan Webb,
+     Matthias Miller, Dean Edwards and John Resig. */
+
+  var timer;
+
+  function fireContentLoadedEvent() {
+    if (document.loaded) return;
+    if (timer) window.clearInterval(timer);
+    document.fire("dom:loaded");
+    document.loaded = true;
+  }
+
+  if (document.addEventListener) {
+    if (Prototype.Browser.WebKit) {
+      timer = window.setInterval(function() {
+        if (/loaded|complete/.test(document.readyState))
+          fireContentLoadedEvent();
+      }, 0);
+
+      Event.observe(window, "load", fireContentLoadedEvent);
+
+    } else {
+      document.addEventListener("DOMContentLoaded",
+        fireContentLoadedEvent, false);
+    }
+
+  } else {
+    document.write("<script id=__onDOMContentLoaded defer src=//:><\/script>");
+    $("__onDOMContentLoaded").onreadystatechange = function() {
+      if (this.readyState == "complete") {
+        this.onreadystatechange = null;
+        fireContentLoadedEvent();
+      }
+    };
+  }
+})();
+/*------------------------------- DEPRECATED -------------------------------*/
+
+Hash.toQueryString = Object.toQueryString;
+
+var Toggle = { display: Element.toggle };
+
+Element.Methods.childOf = Element.Methods.descendantOf;
+
+var Insertion = {
+  Before: function(element, content) {
+    return Element.insert(element, {before:content});
+  },
+
+  Top: function(element, content) {
+    return Element.insert(element, {top:content});
+  },
+
+  Bottom: function(element, content) {
+    return Element.insert(element, {bottom:content});
+  },
+
+  After: function(element, content) {
+    return Element.insert(element, {after:content});
+  }
+};
+
+var $continue = new Error('"throw $continue" is deprecated, use "return" instead');
+
+// This should be moved to script.aculo.us; notice the deprecated methods
+// further below, that map to the newer Element methods.
+var Position = {
+  // set to true if needed, warning: firefox performance problems
+  // NOT neeeded for page scrolling, only if draggable contained in
+  // scrollable elements
+  includeScrollOffsets: false,
+
+  // must be called before calling withinIncludingScrolloffset, every time the
+  // page is scrolled
+  prepare: function() {
+    this.deltaX =  window.pageXOffset
+                || document.documentElement.scrollLeft
+                || document.body.scrollLeft
+                || 0;
+    this.deltaY =  window.pageYOffset
+                || document.documentElement.scrollTop
+                || document.body.scrollTop
+                || 0;
+  },
+
+  // caches x/y coordinate pair to use with overlap
+  within: function(element, x, y) {
+    if (this.includeScrollOffsets)
+      return this.withinIncludingScrolloffsets(element, x, y);
+    this.xcomp = x;
+    this.ycomp = y;
+    this.offset = Element.cumulativeOffset(element);
+
+    return (y >= this.offset[1] &&
+            y <  this.offset[1] + element.offsetHeight &&
+            x >= this.offset[0] &&
+            x <  this.offset[0] + element.offsetWidth);
+  },
+
+  withinIncludingScrolloffsets: function(element, x, y) {
+    var offsetcache = Element.cumulativeScrollOffset(element);
+
+    this.xcomp = x + offsetcache[0] - this.deltaX;
+    this.ycomp = y + offsetcache[1] - this.deltaY;
+    this.offset = Element.cumulativeOffset(element);
+
+    return (this.ycomp >= this.offset[1] &&
+            this.ycomp <  this.offset[1] + element.offsetHeight &&
+            this.xcomp >= this.offset[0] &&
+            this.xcomp <  this.offset[0] + element.offsetWidth);
+  },
+
+  // within must be called directly before
+  overlap: function(mode, element) {
+    if (!mode) return 0;
+    if (mode == 'vertical')
+      return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
+        element.offsetHeight;
+    if (mode == 'horizontal')
+      return ((this.offset[0] + element.offsetWidth) - this.xcomp) /
+        element.offsetWidth;
+  },
+
+  // Deprecation layer -- use newer Element methods now (1.5.2).
+
+  cumulativeOffset: Element.Methods.cumulativeOffset,
+
+  positionedOffset: Element.Methods.positionedOffset,
+
+  absolutize: function(element) {
+    Position.prepare();
+    return Element.absolutize(element);
+  },
+
+  relativize: function(element) {
+    Position.prepare();
+    return Element.relativize(element);
+  },
+
+  realOffset: Element.Methods.cumulativeScrollOffset,
+
+  offsetParent: Element.Methods.getOffsetParent,
+
+  page: Element.Methods.viewportOffset,
+
+  clone: function(source, target, options) {
+    options = options || { };
+    return Element.clonePosition(target, source, options);
+  }
+};
+
+/*--------------------------------------------------------------------------*/
+
+if (!document.getElementsByClassName) document.getElementsByClassName = function(instanceMethods){
+  function iter(name) {
+    return name.blank() ? null : "[contains(concat(' ', @class, ' '), ' " + name + " ')]";
+  }
+
+  instanceMethods.getElementsByClassName = Prototype.BrowserFeatures.XPath ?
+  function(element, className) {
+    className = className.toString().strip();
+    var cond = /\s/.test(className) ? $w(className).map(iter).join('') : iter(className);
+    return cond ? document._getElementsByXPath('.//*' + cond, element) : [];
+  } : function(element, className) {
+    className = className.toString().strip();
+    var elements = [], classNames = (/\s/.test(className) ? $w(className) : null);
+    if (!classNames && !className) return elements;
+
+    var nodes = $(element).getElementsByTagName('*');
+    className = ' ' + className + ' ';
+
+    for (var i = 0, child, cn; child = nodes[i]; i++) {
+      if (child.className && (cn = ' ' + child.className + ' ') && (cn.include(className) ||
+          (classNames && classNames.all(function(name) {
+            return !name.toString().blank() && cn.include(' ' + name + ' ');
+          }))))
+        elements.push(Element.extend(child));
+    }
+    return elements;
+  };
+
+  return function(className, parentElement) {
+    return $(parentElement || document.body).getElementsByClassName(className);
+  };
+}(Element.Methods);
+
+/*--------------------------------------------------------------------------*/
+
+Element.ClassNames = Class.create();
+Element.ClassNames.prototype = {
+  initialize: function(element) {
+    this.element = $(element);
+  },
+
+  _each: function(iterator) {
+    this.element.className.split(/\s+/).select(function(name) {
+      return name.length > 0;
+    })._each(iterator);
+  },
+
+  set: function(className) {
+    this.element.className = className;
+  },
+
+  add: function(classNameToAdd) {
+    if (this.include(classNameToAdd)) return;
+    this.set($A(this).concat(classNameToAdd).join(' '));
+  },
+
+  remove: function(classNameToRemove) {
+    if (!this.include(classNameToRemove)) return;
+    this.set($A(this).without(classNameToRemove).join(' '));
+  },
+
+  toString: function() {
+    return $A(this).join(' ');
+  }
+};
+
+Object.extend(Element.ClassNames.prototype, Enumerable);
+
+/*--------------------------------------------------------------------------*/
+
+Element.addMethods();
Index: /ruby/tags/release-0.5.0/public/robots.txt
===================================================================
--- /ruby/tags/release-0.5.0/public/robots.txt	(revision 367)
+++ /ruby/tags/release-0.5.0/public/robots.txt	(revision 367)
@@ -0,0 +1,5 @@
+# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
+#
+# To ban all spiders from the entire site uncomment the next two lines:
+# User-Agent: *
+# Disallow: /
Index: /ruby/tags/release-0.5.0/script/about
===================================================================
--- /ruby/tags/release-0.5.0/script/about	(revision 367)
+++ /ruby/tags/release-0.5.0/script/about	(revision 367)
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+require File.dirname(__FILE__) + '/../config/boot'
+require 'commands/about'
Index: /ruby/tags/release-0.5.0/script/autospec
===================================================================
--- /ruby/tags/release-0.5.0/script/autospec	(revision 367)
+++ /ruby/tags/release-0.5.0/script/autospec	(revision 367)
@@ -0,0 +1,6 @@
+#!/usr/bin/env ruby
+gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9
+ENV['RSPEC'] = 'true'     # allows autotest to discover rspec
+ENV['AUTOTEST'] = 'true'  # allows autotest to run w/ color on linux
+system((RUBY_PLATFORM =~ /mswin|mingw/ ? 'autotest.bat' : 'autotest'), *ARGV) ||
+  $stderr.puts("Unable to find autotest.  Please install ZenTest or fix your PATH")
Index: /ruby/tags/release-0.5.0/script/console
===================================================================
--- /ruby/tags/release-0.5.0/script/console	(revision 367)
+++ /ruby/tags/release-0.5.0/script/console	(revision 367)
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+require File.dirname(__FILE__) + '/../config/boot'
+require 'commands/console'
Index: /ruby/tags/release-0.5.0/script/dbconsole
===================================================================
--- /ruby/tags/release-0.5.0/script/dbconsole	(revision 367)
+++ /ruby/tags/release-0.5.0/script/dbconsole	(revision 367)
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+require File.dirname(__FILE__) + '/../config/boot'
+require 'commands/dbconsole'
Index: /ruby/tags/release-0.5.0/script/destroy
===================================================================
--- /ruby/tags/release-0.5.0/script/destroy	(revision 367)
+++ /ruby/tags/release-0.5.0/script/destroy	(revision 367)
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+require File.dirname(__FILE__) + '/../config/boot'
+require 'commands/destroy'
Index: /ruby/tags/release-0.5.0/script/generate
===================================================================
--- /ruby/tags/release-0.5.0/script/generate	(revision 367)
+++ /ruby/tags/release-0.5.0/script/generate	(revision 367)
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+require File.dirname(__FILE__) + '/../config/boot'
+require 'commands/generate'
Index: /ruby/tags/release-0.5.0/script/performance/benchmarker
===================================================================
--- /ruby/tags/release-0.5.0/script/performance/benchmarker	(revision 367)
+++ /ruby/tags/release-0.5.0/script/performance/benchmarker	(revision 367)
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+require File.dirname(__FILE__) + '/../../config/boot'
+require 'commands/performance/benchmarker'
Index: /ruby/tags/release-0.5.0/script/performance/profiler
===================================================================
--- /ruby/tags/release-0.5.0/script/performance/profiler	(revision 367)
+++ /ruby/tags/release-0.5.0/script/performance/profiler	(revision 367)
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+require File.dirname(__FILE__) + '/../../config/boot'
+require 'commands/performance/profiler'
Index: /ruby/tags/release-0.5.0/script/performance/request
===================================================================
--- /ruby/tags/release-0.5.0/script/performance/request	(revision 367)
+++ /ruby/tags/release-0.5.0/script/performance/request	(revision 367)
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+require File.dirname(__FILE__) + '/../../config/boot'
+require 'commands/performance/request'
Index: /ruby/tags/release-0.5.0/script/plugin
===================================================================
--- /ruby/tags/release-0.5.0/script/plugin	(revision 367)
+++ /ruby/tags/release-0.5.0/script/plugin	(revision 367)
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+require File.dirname(__FILE__) + '/../config/boot'
+require 'commands/plugin'
Index: /ruby/tags/release-0.5.0/script/process/inspector
===================================================================
--- /ruby/tags/release-0.5.0/script/process/inspector	(revision 367)
+++ /ruby/tags/release-0.5.0/script/process/inspector	(revision 367)
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+require File.dirname(__FILE__) + '/../../config/boot'
+require 'commands/process/inspector'
Index: /ruby/tags/release-0.5.0/script/process/reaper
===================================================================
--- /ruby/tags/release-0.5.0/script/process/reaper	(revision 367)
+++ /ruby/tags/release-0.5.0/script/process/reaper	(revision 367)
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+require File.dirname(__FILE__) + '/../../config/boot'
+require 'commands/process/reaper'
Index: /ruby/tags/release-0.5.0/script/process/spawner
===================================================================
--- /ruby/tags/release-0.5.0/script/process/spawner	(revision 367)
+++ /ruby/tags/release-0.5.0/script/process/spawner	(revision 367)
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+require File.dirname(__FILE__) + '/../../config/boot'
+require 'commands/process/spawner'
Index: /ruby/tags/release-0.5.0/script/runner
===================================================================
--- /ruby/tags/release-0.5.0/script/runner	(revision 367)
+++ /ruby/tags/release-0.5.0/script/runner	(revision 367)
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+require File.dirname(__FILE__) + '/../config/boot'
+require 'commands/runner'
Index: /ruby/tags/release-0.5.0/script/server
===================================================================
--- /ruby/tags/release-0.5.0/script/server	(revision 367)
+++ /ruby/tags/release-0.5.0/script/server	(revision 367)
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+require File.dirname(__FILE__) + '/../config/boot'
+require 'commands/server'
Index: /ruby/tags/release-0.5.0/script/spec
===================================================================
--- /ruby/tags/release-0.5.0/script/spec	(revision 367)
+++ /ruby/tags/release-0.5.0/script/spec	(revision 367)
@@ -0,0 +1,10 @@
+#!/usr/bin/env ruby
+if ARGV.any? {|arg| %w[--drb -X --generate-options -G --help -h --version -v].include?(arg)}
+  require 'rubygems' unless ENV['NO_RUBYGEMS']
+else
+  gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9
+  ENV["RAILS_ENV"] ||= 'test'
+  require File.expand_path(File.dirname(__FILE__) + "/../config/environment") unless defined?(RAILS_ROOT)
+end
+require 'spec/autorun'
+exit ::Spec::Runner::CommandLine.run
Index: /ruby/tags/release-0.5.0/script/spec_server
===================================================================
--- /ruby/tags/release-0.5.0/script/spec_server	(revision 367)
+++ /ruby/tags/release-0.5.0/script/spec_server	(revision 367)
@@ -0,0 +1,9 @@
+#!/usr/bin/env ruby
+gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9
+
+puts "Loading Rails environment"
+ENV["RAILS_ENV"] ||= 'test'
+require File.expand_path(File.dirname(__FILE__) + "/../config/environment") unless defined?(RAILS_ROOT)
+
+require 'optparse'
+require 'spec/rails/spec_server'
Index: /ruby/tags/release-0.5.0/spec/fixtures/encoding_aliases.yml
===================================================================
--- /ruby/tags/release-0.5.0/spec/fixtures/encoding_aliases.yml	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/fixtures/encoding_aliases.yml	(revision 367)
@@ -0,0 +1,9 @@
+1:
+  alias: Latin1
+  mibenum: 4
+2:
+  alias: MS_Kanji
+  mibenum: 17
+3:
+  alias: csShiftJIS
+  mibenum: 17
Index: /ruby/tags/release-0.5.0/spec/fixtures/encodings.yml
===================================================================
--- /ruby/tags/release-0.5.0/spec/fixtures/encodings.yml	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/fixtures/encodings.yml	(revision 367)
@@ -0,0 +1,20 @@
+1:
+  name: UTF-8
+  mibenum: 16
+  source: RFC 3629
+
+2:
+  name: ISO_8859-1:1987
+  mibenum: 4
+  source: ECMA registry
+
+3:
+  name: Shift_JIS
+  mibenum: 17
+  source: >-
+    This charset is an extension of csHalfWidthKatakana by
+    adding graphic characters in JIS X 0208.  The CCS's are
+    JIS X0201:1997 and JIS X0208:1997.  The
+    complete definition is shown in Appendix 1 of JIS
+    X0208:1997.
+    This charset can be used for the top-level media type "text".
Index: /ruby/tags/release-0.5.0/spec/fixtures/terminologies.yml
===================================================================
--- /ruby/tags/release-0.5.0/spec/fixtures/terminologies.yml	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/fixtures/terminologies.yml	(revision 367)
@@ -0,0 +1,18 @@
+terminology_00001: 
+  name: openehr
+  group: subject relationship
+  code: "0"
+  id: 1
+  rubric: self
+  mappings: "HL7_RoleCode:: CEN: "
+  lang: en
+  description: "The party is the subject of EHR "
+terminology_00002: 
+  name: openehr
+  group: subject relationship
+  code: "3"
+  id: 2
+  rubric: foetus
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "The party is a foetus "
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/assumed_library_types/interval_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/assumed_library_types/interval_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/assumed_library_types/interval_spec.rb	(revision 367)
@@ -0,0 +1,140 @@
+require File.dirname(__FILE__) + '/../../../spec_helper'
+include OpenEHR::AssumedLibraryTypes
+
+describe Interval do
+  before(:each) do
+    @interval = Interval.new(:upper => 10,
+                             :lower => 1)
+  end
+
+  it 'should be an instance of Interval' do
+    @interval.should be_an_instance_of Interval
+  end
+
+  it 's upper should be greater than lower' do
+    @interval.upper.should be > @interval.lower
+  end
+
+  it 's upper should be equal 10' do
+    @interval.upper.should == 10
+  end
+
+  it 's lower should be equal 1' do
+    @interval.lower.should == 1
+  end
+
+  it 'should raise ArgumentError with smaller upper' do
+    lambda {@interval.upper = -1}.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with greater lower' do
+    lambda {@interval.lower = 11}.should raise_error ArgumentError
+  end
+
+  it 'should have 5' do
+    @interval.has?(5).should be_true
+  end
+
+  it 'should not have 11' do
+    @interval.has?(11).should_not be_true
+  end
+
+  it 'should not have -1' do
+    @interval.has?(-1).should_not be_true
+  end
+
+  it 'should not have 10' do
+    @interval.has?(10).should_not be_true
+  end
+
+  it 'should not have 1' do
+    @interval.has?(1).should_not be_true
+  end
+
+  describe Interval, 'when lower included' do
+    before do
+      @interval.lower_included = true
+    end
+
+    it 'should be lower_included' do
+      @interval.should be_lower_included
+    end
+
+    it 'should have 1 when lower included' do
+      @interval.has?(1).should be_true
+    end
+
+    after do
+      @interval.lower_included = false
+    end
+  end
+
+  describe Interval, 'when upper included' do
+    before do
+      @interval.upper_included = true
+    end
+
+    it 'should be upper uncluded' do
+      @interval.should be_upper_included
+    end
+
+    it 'should have 10 when upper included' do
+      @interval.has?(10).should be_true
+    end
+
+    after do
+      @interval.upper_included = false
+    end
+  end
+
+  describe Interval, 'when upper unbounded' do
+    before do
+      @interval.upper = nil
+    end
+
+    it 'should be upper unbounded' do
+      @interval.should be_upper_unbounded
+    end
+
+    it 'should have 11' do
+      @interval.has?(11).should be_true
+    end
+
+    it 'should raise ArgumentError, when upper_included is assigned' do
+      lambda{
+        @interval.upper_included = true
+      }.should raise_error ArgumentError
+    end
+
+    after do
+      @interval.upper = 10
+    end
+  end
+
+  describe Interval, 'when lower unbounded' do
+    before do
+      @interval.lower = nil
+    end
+
+    it 'should be lower unbounded' do
+      @interval.should be_lower_unbounded
+    end
+
+    it 'should  have -10' do
+      @interval.has?(-10).should be_true
+    end
+
+    it 'should raise ArgumentError, when lower_included is assigned' do
+      lambda{
+        @interval.lower_included = true
+      }.should raise_error ArgumentError
+    end
+  end
+
+  it 'should raise ArgumentError both upper and lower is nil' do
+    lambda {
+      Interval.new
+    }.should raise_error ArgumentError
+  end
+end
+
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/assumed_library_types/iso8601_date_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/assumed_library_types/iso8601_date_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/assumed_library_types/iso8601_date_spec.rb	(revision 367)
@@ -0,0 +1,236 @@
+require File.dirname(__FILE__) + '/../../../spec_helper'
+include OpenEHR::AssumedLibraryTypes
+
+describe ISO8601Date do
+  before do
+    @iso8601date = ISO8601Date.new('2009-09-10')
+  end
+
+  it 'should be an instance of ISO8601Date' do
+    @iso8601date.should be_an_instance_of ISO8601Date
+  end
+
+  it 'year should be equal 2009' do
+    @iso8601date.year.should be_equal 2009
+  end
+
+  it 'month should be equal 9' do
+    @iso8601date.month.should be_equal 9
+  end
+
+  it 'day should be equal 10' do
+    @iso8601date.day.should be_equal 10
+  end
+
+  it 'should be 2009-09-10 as_string' do
+    @iso8601date.as_string.should == '2009-09-10'
+  end
+
+  it 'should be extended ' do
+    @iso8601date.is_extended?.should be_true
+  end
+
+  it 'should parse vaild date form' do
+
+  end
+
+  it 'should parse valid adte form' do
+    ISO8601Date.should be_valid_iso8601_date '2009-09-22'
+  end
+
+  it 'should not parse invalid date form' do
+    ISO8601Date.should_not be_valid_iso8601_date '2009-13-54'
+  end
+
+  describe 'year behavior' do
+    it 'should raise ArgumentError with nil year string' do
+      lambda{ISO8601Date.new('-09-02')}.should raise_error ArgumentError
+    end
+
+    it 'should raise ArgumentError with nil year' do
+      lambda{@iso8601date.year = nil}.should raise_error ArgumentError
+    end
+
+    it 'should not raise ArgumentError more than 0 year' do
+      lambda{@iso8601date.year = 0}.should_not raise_error ArgumentError
+    end
+  end
+
+  describe 'month behavior' do
+    it '1 month should not raise ArgumentError' do
+      lambda{@iso8601date.month = 1}.should_not raise_error ArgumentError
+    end
+
+    it '12 month should not raise ArgumentError' do
+      lambda{@iso8601date.month = 12}.should_not raise_error ArgumentError
+    end
+
+    it '13 month should raise ArgumentError' do
+      lambda{@iso8601date.month = 13}.should raise_error ArgumentError
+    end
+
+    it '0 month should raise ArgumentError' do
+      lambda{@iso8601date.month = 0}.should raise_error ArgumentError
+    end
+  end
+
+  describe 'day behavior' do
+    it '0 day should raise ArgumentError' do
+      lambda{@iso8601date.day = 0}.should raise_error ArgumentError
+    end
+  end
+
+  [1,3,5,7,8,10,12].each do |m|
+    describe '#{m}th month behavior' do
+      before do
+        @iso8601date.month = m
+      end
+      
+      it 'should have 31 days' do
+        lambda{
+          @iso8601date.day = 31
+        }.should_not raise_error ArgumentError
+      end
+
+      it 'should not have 32 days' do
+        lambda{
+          @iso8601date.day = 32
+        }.should raise_error ArgumentError
+      end
+    end
+  end
+
+  describe 'February and leap year behavior' do
+    before do
+      @iso8601date.month = 2
+    end
+
+    describe '2009(not leap year) behavior' do
+      before do
+        @iso8601date.year = 2009
+      end
+
+      it '2009 should not be leap year' do
+        @iso8601date.should_not be_leapyear 2009
+      end
+
+      it '2009-02-28 should not raise ArgumentError' do
+        lambda{@iso8601date.day = 28}.should_not raise_error ArgumentError
+      end
+
+      it '2009-02-29 should raise ArgumentError' do
+        lambda{@iso8601date.day = 29}.should raise_error ArgumentError
+      end
+    end
+
+    describe '2008(leap year) behavior' do
+      before do
+        @iso8601date.year = 2008
+      end
+
+      it '2008 should be leap year' do
+        @iso8601date.should be_leapyear 2008
+      end
+
+      it '2008-02-29 should not raise ArgumentError' do
+        lambda{@iso8601date.day = 29}.should_not raise_error ArgumentError
+      end
+
+      it '2008-02-30 should raise ArgumentError' do
+        lambda{@iso8601date.day = 30}.should raise_error ArgumentError
+      end
+    end
+
+    describe '2000(irregular leap year' do
+      before do
+        @iso8601date.year = 2000
+      end
+
+      it 'should not leapyear' do
+        @iso8601date.should be_leapyear 2000
+      end
+
+      it '2000-02-29 should not raise ArgumentError' do
+        lambda{@iso8601date.day = 29}.should_not raise_error ArgumentError
+      end
+
+      it '2000-02-30 should raise ArgumentError' do
+        lambda{@iso8601date.day = 30}.should raise_error ArgumentError
+      end
+    end
+  end
+
+  [4,6,9,11].each do |month|
+    describe "#{month}th month behavior" do
+      before do
+        @iso8601date.month = month
+      end
+
+      it '30 day should not raise ArgumentError' do
+        lambda{
+          @iso8601date.day = 30
+        }.should_not raise_error ArgumentError
+      end
+
+      it '31 day should raise ArgumentError' do
+        lambda{
+          @iso8601date.day = 31
+        }.should raise_error ArgumentError
+      end
+    end
+  end
+
+  describe 'partial date data' do
+    describe 'day unknown' do
+      before do
+        @iso8601date.day = nil
+      end
+      
+      it 'day should be unknown' do
+        @iso8601date.should be_day_unknown
+      end
+      
+      it 'should be 2009-09 as string' do
+        @iso8601date.as_string.should == '2009-09'
+      end
+      
+      it 'should be partial' do
+        @iso8601date.is_partial?.should be_true
+      end
+      
+      it 'constructor pass partial date' do
+        lambda {
+          ISO8601Date.new('2009-09')
+        }.should_not raise_error ArgumentError
+      end
+
+      after do
+        @iso8601date.day = 10
+      end
+    end
+    
+    describe 'month unknown' do
+      before do
+        @iso8601date.day = nil
+        @iso8601date.month = nil
+      end
+      
+      it 'should raise ArgumentError with nil month and not nil day' do
+        lambda {
+          @iso8601date.day = 11
+        }.should raise_error ArgumentError
+      end
+
+      it 's as_string should be 2009' do
+        @iso8601date.as_string.should == '2009'
+      end
+
+      it 'constructor pass only year data' do
+        lambda {
+          ISO8601Date.new('2009')
+        }.should_not raise_error ArgumentError
+      end
+    end
+  end
+
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/assumed_library_types/iso8601_date_time_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/assumed_library_types/iso8601_date_time_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/assumed_library_types/iso8601_date_time_spec.rb	(revision 367)
@@ -0,0 +1,47 @@
+require File.dirname(__FILE__) + '/../../../spec_helper'
+include OpenEHR::AssumedLibraryTypes
+
+describe ISO8601DateTime do
+  before(:each) do
+    @iso8601date_time = ISO8601DateTime.new('2009-06-29T12:34:56.78+0900')
+  end
+
+  it 'should be an instance of ISO8601DateTime' do
+    @iso8601date_time.should be_an_instance_of ISO8601DateTime
+  end
+
+  it 'should be 2009-06-29T12:34:56.78T+09:00 as string' do
+    @iso8601date_time.as_string.should == '2009-06-29T12:34:56.78+0900'
+  end
+
+  it 'should raise ArgumentError with invalid date format' do
+    lambda {
+      ISO8601DateTime.new('2009:06:29Z12-34-56')
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentErrow with empty argument' do
+    lambda {
+      ISO8601DateTime.new('')
+    }.should raise_error ArgumentError
+  end    
+
+  it 'allows without fractional second' do
+    lambda {
+      ISO8601DateTime.new('2009-06-29T12:34:56')
+    }.should_not raise_error ArgumentError
+  end
+
+  describe 'partial date' do
+    it 'should recognize 2009-06' do
+      @iso8601date_time.day = nil      
+      @iso8601date_time.as_string.should == '2009-06'
+    end
+
+    it 'should recognize 2009' do
+      @iso8601date_time.day = nil
+      @iso8601date_time.month = nil
+      @iso8601date_time.as_string.should == '2009'
+    end
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/assumed_library_types/iso8601_duration_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/assumed_library_types/iso8601_duration_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/assumed_library_types/iso8601_duration_spec.rb	(revision 367)
@@ -0,0 +1,150 @@
+require File.dirname(__FILE__) + '/../../../spec_helper'
+include OpenEHR::AssumedLibraryTypes
+
+describe ISO8601Duration do
+  before(:each) do
+    @iso8601duration = ISO8601Duration.new('P1Y2M3W4DT5H6M7.8S')
+  end
+
+  it 'should be an instance of ISO8601Duration' do
+    @iso8601duration.should be_an_instance_of ISO8601Duration
+  end
+
+  it 'years should be 1' do
+    @iso8601duration.years.should be_equal 1
+  end
+
+  it 'months should be 2' do
+    @iso8601duration.months.should be_equal 2
+  end
+
+  it 'weeks should be 3' do
+    @iso8601duration.weeks.should be_equal 3
+  end
+
+  it 'days should be 4' do
+    @iso8601duration.days.should be_equal 4
+  end
+
+  it 'hours should be 5' do
+    @iso8601duration.hours.should be_equal 5
+  end
+
+  it 'minutes should be 6' do
+    @iso8601duration.minutes.should be_equal 6
+  end
+
+  it 'seconds should be 7' do
+    @iso8601duration.seconds.should be_equal 7
+  end
+
+  it 'fractional_seconds should be .8' do
+    @iso8601duration.fractional_second.should == 0.8
+  end
+
+  it 'should be equal P1Y2M3W4DT5H6M7.8S as string' do
+    @iso8601duration.as_string.should == 'P1Y2M3W4DT5H6M7.8S'
+  end
+
+  it 'should not raise ArgumentError with 0 yaers' do
+    lambda {
+      @iso8601duration.years = 0
+    }.should_not raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with -1 yaers' do
+    lambda {
+      @iso8601duration.years = -1
+    }.should raise_error ArgumentError
+  end
+
+  it 'should not raise ArgumentError with 0 months' do
+    lambda {
+      @iso8601duration.months = 0
+    }.should_not raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with -1 months' do
+    lambda {
+      @iso8601duration.months = -1
+    }.should raise_error ArgumentError
+  end
+    
+  it 'should not raise ArgumentError with 0 weeks' do
+    lambda {
+      @iso8601duration.weeks = 0
+    }.should_not raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with -1 weeks' do
+    lambda {
+      @iso8601duration.weeks = -1
+    }.should raise_error ArgumentError
+  end
+
+  it 'should not raise ArgumentError with 0 days' do
+    lambda {
+      @iso8601duration.days = 0
+    }.should_not raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with -1 days' do
+    lambda {
+      @iso8601duration.days = -1
+    }.should raise_error ArgumentError
+  end
+
+  it 'should not raise ArgumentError with 0 hours' do
+    lambda {
+      @iso8601duration.hours = 0
+    }.should_not raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with -1 hours' do
+    lambda {
+      @iso8601duration.hours = -1
+    }.should raise_error ArgumentError
+  end
+
+  it 'should not raise ArgumentError with 0 minutes' do
+    lambda {
+      @iso8601duration.minutes = 0
+    }.should_not raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with -1 minutes' do
+    lambda {
+      @iso8601duration.minutes = -1
+    }.should raise_error ArgumentError
+  end
+
+  it 'should not raise ArgumentError with 0 seconds' do
+    lambda {
+      @iso8601duration.seconds = 0
+    }.should_not raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with -1 seconds' do
+    lambda {
+      @iso8601duration.seconds = -1
+    }.should raise_error ArgumentError
+  end
+
+  it 'should not raise ArgumentError with 0 fractional_second' do
+    lambda {
+      @iso8601duration.fractional_second = 0
+    }.should_not raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with -1 fractional_second' do
+    lambda {
+      @iso8601duration.fractional_second = -1
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with 1.0 fractional_second' do
+    lambda {
+      @iso8601duration.fractional_second = 1.0
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/assumed_library_types/iso8601_time_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/assumed_library_types/iso8601_time_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/assumed_library_types/iso8601_time_spec.rb	(revision 367)
@@ -0,0 +1,234 @@
+require File.dirname(__FILE__) + '/../../../spec_helper'
+include OpenEHR::AssumedLibraryTypes
+
+describe ISO8601Time do
+  before(:each) do
+    @iso8601time = ISO8601Time.new('15:55:37.32+0900')
+  end
+
+  it 'should be an instance of ISO8601Time' do
+    @iso8601time.should be_an_instance_of ISO8601Time
+  end
+
+  it 's hour should be 15' do
+    @iso8601time.hour.should == 15
+  end
+
+  it 's minute should be 55' do
+    @iso8601time.minute.should == 55
+  end
+
+  it 's second should be 37'do
+    @iso8601time.second.should == 37
+  end
+
+  it 's fractional second should be 0.32' do
+    @iso8601time.fractional_second == 0.32
+  end
+
+  it 'have fractional_second' do
+    @iso8601time.should have_fractional_second
+  end
+
+  it 's time zone should +0900' do
+    @iso8601time.timezone == '+0900'
+  end
+
+  it 'should be 15:55:37.32+0900 as_string' do
+    @iso8601time.as_string.should == '15:55:37.32+0900'
+  end
+
+  it 'decimal sign should not be comma' do
+    @iso8601time.is_decimal_sign_comma?.should_not be_true
+  end
+
+  it 'should be extended' do
+    @iso8601time.is_extended?.should be_true
+  end
+
+  it 'should not be partial' do
+    @iso8601time.is_partial?.should_not be true
+  end
+
+  describe 'hour behavior' do
+    it 'should raise ArgumentError with nil hour' do
+      lambda {
+        @iso8601time.hour = nil
+      }.should raise_error ArgumentError
+    end
+
+    it 'should not raise ArgumentError with -1 hour' do
+      lambda {
+        @iso8601time.hour = -1
+      }.should raise_error ArgumentError
+    end        
+
+    it 'should not raise ArgumentError with 0 hour' do
+      lambda {
+        @iso8601time.hour = 0
+      }.should_not raise_error ArgumentError
+    end
+
+    it 'should not raise ArgumentError with 23 hour' do
+      lambda {
+        @iso8601time.hour = 23
+      }.should_not raise_error ArgumentError
+    end
+
+    it 'should not raise ArgumentError with 24 hour' do
+      lambda {
+        @iso8601time.hour = 24
+      }.should raise_error ArgumentError
+    end
+  end
+
+  describe 'minute behavior' do
+    it 'should raise ArgumentError with -1 miniute' do
+      lambda {
+        @iso8601time.minute = -1
+      }.should raise_error ArgumentError
+    end
+
+    it 'should not raise ArgumentError with 0 minute' do
+      lambda {
+        @iso8601time.minute = 0
+      }.should_not raise_error ArgumentError
+    end
+
+    it 'should not raise ArgumentError with 59 minute' do
+      lambda {
+        @iso8601time.minute = 59
+      }.should_not raise_error ArgumentError
+    end
+
+    it 'should raise ArgumentError with 60 minute' do
+      lambda {
+        @iso8601time.minute = 60
+      }.should raise_error ArgumentError
+    end
+  end
+
+  describe 'second behavior' do
+    it 'should raise ArgumentError with -1 miniute' do
+      lambda {
+        @iso8601time.second = -1
+      }.should raise_error ArgumentError
+    end
+
+    it 'should not raise ArgumentError with 0 second' do
+      lambda {
+        @iso8601time.second = 0
+      }.should_not raise_error ArgumentError
+    end
+
+    it 'should not raise ArgumentError with 59 second' do
+      lambda {
+        @iso8601time.second = 59
+      }.should_not raise_error ArgumentError
+    end
+
+    it 'should raise ArgumentError with 60 second' do
+      lambda {
+        @iso8601time.second = 60
+      }.should raise_error ArgumentError
+    end
+  end
+
+  describe 'fractional second behavior' do
+    it 'should raise ArgumentError less than -0.0' do
+      lambda {
+        @iso8601time.fractional_second = -0.1
+      }.should raise_error ArgumentError
+    end
+
+    it 'should raise ArgumentError more than 1.0' do
+      lambda {
+        @iso8601time.fractional_second = 1.0
+      }.should raise_error ArgumentError
+    end
+  end
+
+  describe 'timezone behavior' do
+    it 'should raise ArgumentError with invalid timezone' do
+      lambda {
+        @iso8601time.timezone = '+AbD:111'
+      }.should raise_error ArgumentError
+    end
+
+    it 'should allow ArgumentError with nil timezone' do
+      lambda {
+        @iso8601time.timezone = nil
+      }.should_not raise_error ArgumentError
+    end
+  end
+
+  describe 'constructor behavior' do
+    it 'should_not raise ArgumentError with 21:18:09.01' do
+      lambda {
+        ISO8601Time.new('21:18:09.01')
+      }.should_not raise_error ArgumentError
+    end
+
+    it 'should_not raise ArgumentError with 21:18:09' do
+      lambda {
+        ISO8601Time.new('21:18:09')
+      }.should_not raise_error ArgumentError
+    end
+
+    it 'should_not raise ArgumentError with 21:18' do
+      lambda {
+        ISO8601Time.new('21:18')
+      }.should_not raise_error ArgumentError
+    end
+
+    it 'should_not raise ArgumentError with 21' do
+      lambda {
+        ISO8601Time.new('21')
+      }.should_not raise_error ArgumentError
+    end
+
+    it 'should raise ArgumentError with malformation' do
+      lambda {
+        ISO8601Time.new('ABDCD')
+      }.should raise_error ArgumentError
+    end
+  end
+
+  describe 'ISO8601 time validation' do
+    it 'should be valid iso8601 Time' do
+      ISO8601Time.should be_valid_iso8601_time '21:24:30.05+09:00'
+    end
+
+    it 'should not be valid with over 24 hour' do
+      ISO8601Time.should_not be_valid_iso8601_time '24:24:30.05+09:00'
+    end
+
+    it 'should be valid with over 24:00:00' do
+      ISO8601Time.should be_valid_iso8601_time '24:00:00.00'
+    end
+
+    it 'should not vaild with under 0 hour' do
+      ISO8601Time.should_not be_valid_iso8601_time '-1:24:30.05+09:00'
+    end
+
+    it 'should not valid with more than 60 minutes' do
+      ISO8601Time.should_not be_valid_iso8601_time '21:60:30'
+    end
+
+    it 'should not valid with more than 60 seconds' do
+      ISO8601Time.should_not be_valid_iso8601_time '21:34:60'
+    end
+
+    it 'should not valid with invalid hour in timezone' do
+      ISO8601Time.should_not be_valid_iso8601_time '21:24:30.05+24:00'
+    end
+
+    it 'should not valid with invalid minute in timezone' do
+      ISO8601Time.should_not be_valid_iso8601_time '21:24:30.05+22:60'
+    end
+
+    it 'should not valid with invalid minute in timezone' do
+      ISO8601Time.should_not be_valid_iso8601_time '21:24:30.05TAABZ'
+    end
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/assumed_library_types/iso8601_timezone_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/assumed_library_types/iso8601_timezone_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/assumed_library_types/iso8601_timezone_spec.rb	(revision 367)
@@ -0,0 +1,57 @@
+require File.dirname(__FILE__) + '/../../../spec_helper'
+include OpenEHR::AssumedLibraryTypes
+
+describe ISO8601Timezone do
+  before(:each) do
+    @iso8601timezone = ISO8601Timezone.new('+0900')
+  end
+
+  it 'should be an instance of ISO8601Timezone' do
+    @iso8601timezone.should be_an_instance_of ISO8601Timezone
+  end
+
+  it 'sign should be +1' do
+    @iso8601timezone.sign.should == +1
+  end
+
+  it 'hour should be 9' do
+    @iso8601timezone.hour.should == 9
+  end
+
+  it 'minute should be 0' do
+    @iso8601timezone.minute.should == 0
+  end
+
+  it 'should be +0900 as string' do
+    @iso8601timezone.as_string.should == '+0900'
+  end
+
+  it 'should not be gmt' do
+    @iso8601timezone.is_gmt?.should_not be_true
+  end
+
+  it 'should raise ArgumentError with invalid format' do
+    lambda {
+      ISO8601Timezone.new('ABCDE')
+    }.should raise_error ArgumentError
+  end
+
+  it 'should allow - sign' do
+    @iso8601timezone = ISO8601Timezone.new('-5000')
+    @iso8601timezone.as_string.should == '-5000'
+  end
+
+  describe 'GMT' do
+    before(:each) do
+      @iso8601timezone = ISO8601Timezone.new('Z')
+    end
+
+    it 'should racognize UTC as Z' do
+      @iso8601timezone.as_string.should == '+0000'
+    end
+
+    it 'should be gmt(almost)' do
+      @iso8601timezone.is_gmt?.should be_true
+    end
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/assumed_library_types/time_definitions_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/assumed_library_types/time_definitions_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/assumed_library_types/time_definitions_spec.rb	(revision 367)
@@ -0,0 +1,136 @@
+require File.dirname(__FILE__) + '/../../../spec_helper'
+include OpenEHR::AssumedLibraryTypes
+
+describe TimeDefinitions do
+  describe 'year behavior' do
+    it 'should more than zero in openEHR specification' do
+      TimeDefinitions.should be_valid_year 0
+    end
+
+    it '-1 should not be valid year' do
+      TimeDefinitions.should_not be_valid_year -1
+    end
+
+    it 'nil year should be invaild' do
+      TimeDefinitions.should_not be_valid_year nil
+    end
+  end
+
+
+  describe 'month behavior' do
+    (1..12).each do |month|
+      it "should valid #{month}" do
+        TimeDefinitions.should be_valid_month month
+      end
+    end
+    
+    it '0th month should be invalid' do
+      TimeDefinitions.should_not be_valid_month 0
+    end
+    
+    it '13th month should be invalid' do
+      TimeDefinitions.should_not be_valid_month 13
+    end
+  end
+
+  describe 'day behavior' do
+    it '0 day should not be valid day' do
+      TimeDefinitions.should_not be_valid_day(1,2,0)
+    end
+
+    it '32 day should not be valid day' do
+      TimeDefinitions.should_not be_valid_day(1,2,32)
+    end
+
+    it 'should be valid 2009-09-19' do
+      TimeDefinitions.should be_valid_day(2009,9,19)
+    end
+
+    it 'should be invalid 2009 nil 19' do
+      TimeDefinitions.should_not be_valid_day(2009, nil,19)
+    end
+
+    it 'should be invalid nil 09 19' do
+      TimeDefinitions.should_not be_valid_day(nil, 9, 19)
+    end
+
+    it 'should be valid 2009 09' do
+      TimeDefinitions.should be_valid_day(2009,9,nil)
+    end
+  end
+
+  describe 'hour behavior' do
+    it 'should be valid hour 0,0,0' do
+      TimeDefinitions.should be_valid_hour(0,0,0)
+    end
+
+    it 'should be valid hour 12,59,59' do
+      TimeDefinitions.should be_valid_hour(12,59,59)
+    end
+
+    it 'should not be valid hour 12,60,59' do
+      TimeDefinitions.should_not be_valid_hour(12,60,59)
+    end
+
+    it 'should not be valid hour 12,59,60' do
+      TimeDefinitions.should_not be_valid_hour(12,59,60)
+    end
+
+    it 'should be valid hour 24,0,0' do
+      TimeDefinitions.should be_valid_hour(24,0,0)
+    end
+
+    it 'should not be valid hour 24,0,1' do
+      TimeDefinitions.should_not be_valid_hour(24,0,1)
+    end
+
+
+    it 'should be vaild hour 12,1' do
+      TimeDefinitions.should be_valid_hour(12,1)
+    end
+
+    it 'should not be valid hour 12,nil,1' do
+      TimeDefinitions.should be_valid_hour(12,nil,1)
+    end
+
+    it 'should be valid hour 12' do
+      TimeDefinitions.should be_valid_hour(12)
+    end
+  end
+
+  describe 'minute limit' do
+    it 'should be more than 0' do
+      TimeDefinitions.should be_valid_minute 0
+    end
+
+    it 'should be not less than 0' do
+      TimeDefinitions.should_not be_valid_minute -1
+    end
+
+    it 'should less than 60' do
+      TimeDefinitions.should be_valid_minute 59
+    end
+
+    it 'should not valid minute 60' do
+      TimeDefinitions.should_not be_valid_minute 60
+    end
+  end
+
+  describe 'second limit' do
+    it 'should be more than 0' do
+      TimeDefinitions.should be_valid_second 0
+    end
+
+    it 'should be not less than 0' do
+      TimeDefinitions.should_not be_valid_second -1
+    end
+
+    it 'should less than 60' do
+      TimeDefinitions.should be_valid_second 59
+    end
+
+    it 'should not valid minute 60' do
+      TimeDefinitions.should_not be_valid_second 60
+    end
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/archetyped/archetyped_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/archetyped/archetyped_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/archetyped/archetyped_spec.rb	(revision 367)
@@ -0,0 +1,50 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Common::Archetyped
+include OpenEHR::RM::Support::Identification
+
+describe Archetyped do
+  before(:each) do
+    archetype_id = ArchetypeID.new(:value => 
+                      'openEHR-EHR-SECTION.physical_examination.v2')
+    template_id = TemplateID.new(:value =>
+                   'uk.nhs.cfh:openehr-EHR-COMPOSITION.admission_ed.v5')
+    @archetyped = Archetyped.new(:archetype_id => archetype_id,
+                                 :rm_version => '1.2.4',
+                                 :template_id => template_id)
+  end
+
+  it 'should be an instance of Archetyped' do
+    @archetyped.should be_an_instance_of Archetyped
+  end
+
+  it 'archetype id concept rm_name should be EHR' do
+    @archetyped.archetype_id.rm_name.should == 'EHR'
+  end
+
+  it 'rm_version should 1.2.4' do
+    @archetyped.rm_version.should == '1.2.4'
+  end
+
+  it 'template_id.value should be uk.nhs.cfh:openehr-EHR-COMPOSITION.admission_ed.v5' do
+    @archetyped.template_id.value.should ==
+      'uk.nhs.cfh:openehr-EHR-COMPOSITION.admission_ed.v5'
+  end
+
+  it 'should raise ArgumentError with nil rm_version' do
+    lambda {
+      @archetyped.rm_version = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with empty rm_version' do
+    lambda {
+      @archetyped.rm_version = ''
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with nil ArchetypeID' do
+    lambda {
+      @archetyped.archetype_id = nil
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/archetyped/feeder_audit_details_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/archetyped/feeder_audit_details_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/archetyped/feeder_audit_details_spec.rb	(revision 367)
@@ -0,0 +1,60 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Common::Archetyped
+include OpenEHR::RM::Common::Generic
+include OpenEHR::RM::DataTypes::Quantity::DateTime
+
+describe FeederAuditDetails do
+  before(:each) do
+    provider = stub(PartyIdentified, :name => 'NERV')
+    location = stub(PartyIdentified, :name => '3rd Tokyo')
+    time = stub(DvDateTime, :value => '2009-09-28T19:40')
+    subject = stub(PartyProxy, :type => 'PARTY')
+    @feeder_audit_details =
+      FeederAuditDetails.new(:system_id => 'MELCHIOR',
+                             :provider => provider,
+                             :location => location,
+                             :time => time,
+                             :subject => subject,
+                             :version_id => '0.5.0')
+  end
+
+  it 'should be an instance of FeederAuditDetails' do
+    @feeder_audit_details.should be_an_instance_of FeederAuditDetails
+  end
+
+  it 'system_id should be MELCHIOR' do
+    @feeder_audit_details.system_id.should == 'MELCHIOR'
+  end
+
+  it 'provider.name should be NERV' do
+    @feeder_audit_details.provider.name.should == 'NERV'
+  end
+
+  it 'location.name should be 3rd Tokyo' do
+    @feeder_audit_details.location.name.should == '3rd Tokyo'
+  end
+
+  it 'time.value should be 2009-09-28T19:40' do
+    @feeder_audit_details.time.value.should == '2009-09-28T19:40'
+  end
+
+  it 'subject.type should be PARTY' do
+    @feeder_audit_details.subject.type.should == 'PARTY'
+  end
+
+  it 'version_id should be 0.5.0' do
+    @feeder_audit_details.version_id.should == '0.5.0'
+  end
+
+  it 'should reise ArgumentError with nil system_id' do
+    lambda {
+      @feeder_audit_details.system_id = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with empty syste_id' do
+    lambda {
+      @feeder_audit_details.system_id = ''
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/archetyped/feeder_audit_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/archetyped/feeder_audit_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/archetyped/feeder_audit_spec.rb	(revision 367)
@@ -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
+
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/archetyped/link_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/archetyped/link_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/archetyped/link_spec.rb	(revision 367)
@@ -0,0 +1,43 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Common::Archetyped
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::DataTypes::Uri
+
+describe Link do
+  before(:each) do
+    @link = Link.new(:meaning => DvText.new(:value => 'generic'),
+                     :type => DvText.new(:value => 'problem'),
+                     :target => DvEhrUri.new(:value => 'ehr://test'))
+  end
+
+  it 'should be an instance of Link' do
+    @link.should be_an_instance_of Link
+  end
+
+  it 'meaning should be generic' do
+    @link.meaning.value.should == 'generic'
+  end
+
+  it 'target should be ehr://test' do
+    @link.target.value.should == 'ehr://test'
+  end
+
+  it 'should raise ArgumentError with nil meaning' do
+    lambda {
+      @link.meaning = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with nil type' do
+    lambda {
+      @link.type = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with nil target' do
+    lambda {
+      @link.target = nil
+    }.should raise_error ArgumentError
+  end
+
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/archetyped/locatable_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/archetyped/locatable_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/archetyped/locatable_spec.rb	(revision 367)
@@ -0,0 +1,89 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Common::Archetyped
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::Support::Identification
+
+describe Locatable do
+  before(:each) do
+    name = DvText.new(:value => 'problem/SOAP')
+    link = stub(Set, :size => 10, :empty? => false)
+    uid = UIDBasedID.new(:value => 'ehr::localhost/3030')
+    archetype_id = ArchetypeID.new(:value =>
+                           'openEHR-EHR-SECTION.physical_examination.v2')
+    archetype_details = stub(Archetyped, :rm_version =>  '1.2.4',
+                             :archetype_id => archetype_id)
+    feeder_audit = stub(FeederAudit, :system_id => 'MAGI')
+    @locatable = Locatable.new(:archetype_node_id => 'at001',
+                               :name => name,
+                               :links => link,
+                               :uid => uid,
+                               :feeder_audit => feeder_audit,
+                               :archetype_details => archetype_details)
+  end
+
+  it 'should be_an_instance_of Locatable' do
+    @locatable.should be_an_instance_of Locatable
+  end
+
+  it 'archetype_node_id should be at001' do
+    @locatable.archetype_node_id.should == 'at001'
+  end
+
+  it 'is_archetype_root? should be true' do
+    @locatable.is_archetype_root?.should be_true
+  end
+
+  it 'is_archetype_root? should be false when archetype_details is nil' do
+    @locatable.archetype_details = nil
+    @locatable.is_archetype_root?.should be_false
+  end
+
+  it 'link size should be 10' do
+    @locatable.links.size.should == 10
+  end
+
+  it 'name.value should problem/soap' do
+    @locatable.name.value.should == 'problem/SOAP'
+  end
+
+  it 'uid.value should be ehr::localhost/3030' do
+    @locatable.uid.value.should == 'ehr::localhost/3030'
+  end
+
+  it 'archetype_details.rm_version should be 1.2.4' do
+    @locatable.archetype_details.rm_version.should == '1.2.4'
+  end
+
+  it 'feeer_audit.system_id should MAGI' do
+    @locatable.feeder_audit.system_id.should == 'MAGI'
+  end
+
+  it 'concept should be physical_examination' do
+    @locatable.concept.value.should == 'physical_examination'
+  end
+
+  it 'should raise ArgumentError with nil archetype_node_id' do
+    lambda {
+      @locatable.archetype_node_id = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with nil name' do
+    lambda {
+      @locatable.name = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with empty links' do
+    lambda {
+      @locatable.links = Set.new
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError Archetyped invalid' do
+    @locatable.archetype_details = nil
+    lambda {
+      @locatable.concept
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/archetyped/pathable_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/archetyped/pathable_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/archetyped/pathable_spec.rb	(revision 367)
@@ -0,0 +1,42 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Common::Archetyped
+
+describe Pathable do
+  before(:each) do
+    @pathable = Pathable.new
+  end
+
+  it 'should be an instance of Pathable' do
+    @pathable.should be_an_instance_of Pathable
+  end
+
+  it 'item_at_path should raise NotImplementedError' do
+    lambda {
+      @pathable.item_at_path('/')
+    }.should raise_error NotImplementedError
+  end
+
+  it 'items_at_path should raise NotImplementedError' do
+    lambda {
+      @pathable.items_at_path('/')
+    }.should raise_error NotImplementedError
+  end
+
+  it 'path_exists? should raise NotImplementedError' do
+    lambda {
+      @pathable.path_exists?('/')
+    }.should raise_error NotImplementedError
+  end
+
+  it 'path_of_item should raise NotImplementedError' do
+    lambda {
+      @pathable.path_of_item('/')
+    }.should raise_error NotImplementedError
+  end
+
+  it 'path_unique? should raise NotImplementedError' do
+    lambda {
+      @pathable.path_unique?('/')
+    }.should raise_error NotImplementedError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/change_control/contribution_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/change_control/contribution_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/change_control/contribution_spec.rb	(revision 367)
@@ -0,0 +1,56 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Common::ChangeControl
+include OpenEHR::RM::DataTypes::Text
+
+describe Contribution do
+  before(:each) do
+    uid = HierObjectID.new(:value => 'ABC::DEF::2')
+    versions = stub(Set, :size => 2, :empty? => false)
+    description = DvText.new(:value => 'test')
+    audit = stub(AuditDetails, :empty? => false, :description => description)
+    @contribution = Contribution.new(:uid => uid,
+                                     :versions => versions,
+                                     :audit => audit)
+  end
+
+  it 'should be an instance of Contribution' do
+    @contribution.should be_an_instance_of Contribution
+  end
+
+  it 'uid.value should be ABC::DEF::2' do
+    @contribution.uid.value.should == 'ABC::DEF::2'
+  end
+
+  it 'audit.description should test' do
+    @contribution.audit.description.value.should == 'test'
+  end
+
+  it 'versions size should be 2' do
+    @contribution.versions.size.should == 2
+  end
+
+  it 'should raise ArgumentError when version is empty' do
+    lambda {
+      @contribution.versions = Set.new
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError when uid is nil' do
+    lambda {
+      @contribution.uid = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError audit is nil' do
+    lambda {
+      @contribution.audit = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'shoudl raise ArgumentError audit.description is empty' do
+    nil_audit = stub(AuditDetails, :description => nil)
+    lambda {
+      @contribution.audit = nil_audit
+    }.should raise_error ArgumentError
+  end 
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/change_control/imported_version_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/change_control/imported_version_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/change_control/imported_version_spec.rb	(revision 367)
@@ -0,0 +1,29 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+require File.dirname(__FILE__) + '/shared_examples_spec'
+include OpenEHR::RM::Common::ChangeControl
+
+describe ImportedVersion do
+  it_should_behave_like 'change_control'
+
+  it 'should be an instance of ImportedVersion' do
+    @imported_version.should be_an_instance_of ImportedVersion
+  end
+
+  it 'uid should be item.uid' do
+    @imported_version.uid.value.should == 'ABCD::EFG::2'
+  end
+
+  it 'lifecycle_state should be item.lifecycle' do
+    @imported_version.lifecycle_state.defining_code.code_string.should == '532'
+  end
+
+  it 'preceding_version_uid should be item.preceding_version_uid' do
+    @imported_version.preceding_version_uid.value.should == 'HIJ::KLM::1'
+  end
+
+  it 'should raise ArgumentError when item is nil' do
+    lambda {
+      @imported_version.item = nil
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/change_control/original_version_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/change_control/original_version_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/change_control/original_version_spec.rb	(revision 367)
@@ -0,0 +1,41 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+require File.dirname(__FILE__) + '/shared_examples_spec'
+include OpenEHR::RM::Common::ChangeControl
+include OpenEHR::RM::DataTypes::Text
+
+describe OriginalVersion do
+  it_should_behave_like 'change_control'
+
+  it 'should be an isntance of OriginalVersion' do
+    @original_version.should be_an_instance_of OriginalVersion
+  end
+
+  it 'attestation size should be 12' do
+    @original_version.attestations.size.should == 12
+  end
+
+  it 'other_version_input_uids size should be 5' do
+    @original_version.other_input_version_uids.size.should == 5
+  end
+
+  it 'is_merged? should be true when other_input_version_uids is nil' do
+    @original_version.is_merged?.should be_true
+  end
+
+  it 'is_merged? should not be true when other_input_version_uids is not nil' do
+    @original_version.other_input_version_uids = nil
+    @original_version.is_merged?.should be_false
+  end
+
+  it 'should raise ArgumentError when attestations is nil' do
+    lambda {
+      @original_version.attestations = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError when other_input_version_uids is empty' do
+    lambda {
+      @original_version.other_input_version_uids = Set.new
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/change_control/shared_examples_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/change_control/shared_examples_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/change_control/shared_examples_spec.rb	(revision 367)
@@ -0,0 +1,37 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Common::ChangeControl
+include OpenEHR::RM::DataTypes::Text
+
+shared_examples_for 'change_control', :shared => true do
+  before(:each) do
+    uid = ObjectVersionID.new(:value => 'ABCD::EFG::2')
+    preceding_version_uid = ObjectVersionID.new(:value => 'HIJ::KLM::1')
+    commit_audit = stub(AuditDetails, :committer => 'UNKNOWN', :empty? => false)
+    object_id = stub(ObjectID, :value => 'unique')
+    contribution = ObjectRef.new(:namespace => 'local',
+                                 :type => 'CONTRIBUTION',
+                                 :id => object_id)
+    defining_code = stub(CodePhrase, :code_string => '532')
+    lifecycle_state = stub(DvCodedText, :defining_code => defining_code)
+    signature = '4760271533c2866579dde347ad28dd79e4aad933'
+    @version = Version.new(:uid => uid,
+                           :preceding_version_uid => preceding_version_uid,
+                           :data => 'data',
+                           :contribution => contribution,
+                           :lifecycle_state => lifecycle_state,
+                           :commit_audit => commit_audit,
+                           :signature => signature)
+    attestations = stub(Array, :empty? => false, :size => 12)
+    other_input_version_uids = stub(Set, :empty? => false, :size => 5)
+    @original_version = OriginalVersion.new(:uid => uid,
+                                            :lifecycle_state => lifecycle_state,
+                                            :attestations => attestations,
+                                            :commit_audit => commit_audit,
+                                            :contribution => contribution,
+                                            :other_input_version_uids => other_input_version_uids,
+                                            :preceding_version_uid => preceding_version_uid)
+    @imported_version = ImportedVersion.new(:item => @original_version,
+                                            :commit_audit => commit_audit,
+                                            :contribution => contribution)
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/change_control/version_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/change_control/version_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/change_control/version_spec.rb	(revision 367)
@@ -0,0 +1,72 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+require File.dirname(__FILE__) + '/shared_examples_spec'
+include OpenEHR::RM::Common::ChangeControl
+include OpenEHR::RM::Common::Generic
+include OpenEHR::RM::DataTypes::Text
+
+describe Version do
+  it_should_behave_like 'change_control'
+
+  it 'should be an instance of Version' do
+    @version.should be_an_instance_of Version
+  end
+
+  it 'uid value should be ABCD::EFG::1' do
+    @version.uid.value.should == 'ABCD::EFG::2'
+  end
+
+  it 'commit_audit.committer.should be UNKNOWN' do
+    @version.commit_audit.committer.should == 'UNKNOWN'
+  end
+
+  it 'lifecycle_state should be 532' do
+    @version.lifecycle_state.defining_code.code_string.should == '532'
+  end
+
+  it 'contribution namespece should be local' do
+    @version.contribution.namespace.should == 'local'
+  end
+
+  it 'contribution type should be CONTRIBUTION' do
+    contribution = @version.contribution
+    contribution.type = 'PARTY'
+    lambda {
+      @version.contribution = contribution
+    }.should raise_error ArgumentError
+  end
+
+  it 'signature should be 4760271533c2866579dde347ad28dd79e4aad933' do
+    @version.signature.should == '4760271533c2866579dde347ad28dd79e4aad933'
+  end
+
+  it 'should not be a branch' do
+    @version.is_branch?.should_not be true
+  end
+
+  it 'should be a branch' do
+    @version.uid.value = 'ABCD::EFG::1.2.3'
+    @version.is_branch?.should be true
+  end
+
+  it 'data should be data' do
+    @version.data.should == 'data'
+  end
+
+  it 'owner_id value should be ABCD::EFG::2' do
+    @version.owner_id.value.should == 'ABCD::EFG::2'
+  end
+
+  it 'canonical form is not well determined' do
+    lambda {
+      @version.canonical_form
+    }.should raise_error NotImplementedError
+  end
+
+  it 'should raise ArgumentError when preceding version id exists and uid version tree is first' do
+    @version.uid.value = 'ABC::DEF::1'
+    preceding_version_uid = ObjectVersionID.new(:value => 'GHI::JKL::2')
+    lambda {
+      @version.preceding_version_uid = preceding_version_uid
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/change_control/versioned_object_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/change_control/versioned_object_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/change_control/versioned_object_spec.rb	(revision 367)
@@ -0,0 +1,284 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+require File.dirname(__FILE__) + '/shared_examples_spec'
+include OpenEHR::RM::Common::ChangeControl
+include OpenEHR::RM::Common::Generic
+include OpenEHR::RM::DataTypes::Quantity::DateTime
+
+describe VersionedObject do
+  before(:each) do
+    uid1 = ObjectVersionID.new(:value => 'ABC::DEF::1')
+    defining_code1 = stub(CodePhrase, :code_string => '532')
+    lifecycle_state1 = stub(DvCodedText, :defining_code => defining_code1)
+    time_committed1 = DvDateTime.new(:value => '2008-11-12T18:24:32')
+    audit_details1 = stub(AuditDetails, :time_committed => time_committed1)
+    version1 = stub(Version, :commit_audit => audit_details1,
+                             :lifecycle_state => lifecycle_state1,
+                             :uid => uid1)
+    uid2 = ObjectVersionID.new(:value => 'GHI::JKL::2')
+    defining_code2 = stub(CodePhrase, :code_string => '553')
+    lifecycle_state2 = stub(DvCodedText, :defining_code => defining_code2)
+    time_committed2 = DvDateTime.new(:value => '2008-12-12T19:32:14')
+    audit_details2 = stub(AuditDetails, :time_committed => time_committed2)
+    attestation = stub(Attestation)
+    attestations = Array.new([attestation])
+    contribution = stub(ObjectRef, :empty? => false, :type => 'CONTRIBUTION')
+    version2 = OriginalVersion.new(:commit_audit => audit_details2,
+                                   :lifecycle_state => lifecycle_state2,
+                                   :preceding_version_uid => uid1,
+                                   :uid => uid2,
+                                   :contribution => contribution,
+                                   :attestations => attestations)
+    uid3 = ObjectVersionID.new(:value => 'MNO::PQR::3')
+    defining_code3 = stub(CodePhrase, :code_string => '523')
+    lifecycle_state3 = stub(DvCodedText, :defining_code => defining_code3)
+    time_committed3 = DvDateTime.new(:value => '2009-07-15T09:24:26')
+    audit_details3 = stub(AuditDetails, :time_committed => time_committed3)
+    version3 = stub(Version, :commit_audit => audit_details3,
+                             :lifecycle_state => lifecycle_state3,
+                             :uid => uid3)
+    uid = HierObjectID.new(:value => 'STU::VWX::5')
+    owner_id = stub(ObjectRef, :namespace => 'test')
+    time_created = DvDateTime.new(:value => '2009-11-09T09:53:22')
+    object_id = stub(ObjectID, :value => 'unique')
+    all_versions = [version1, version2, version3]
+    @versioned_object = VersionedObject.new(:uid => uid,
+                                            :owner_id => owner_id,
+                                            :time_created => time_created,
+                                            :all_versions => all_versions)
+  end
+
+  it 'should be an instance of VersionedObject' do
+    @versioned_object.should be_an_instance_of VersionedObject
+  end
+
+  it 'uid value should be STU::VWX::5' do
+    @versioned_object.uid.value.should == 'STU::VWX::5'
+  end
+
+  it 'owner_id namespace should be test' do
+    @versioned_object.owner_id.namespace.should == 'test'
+  end
+
+  it 'all_versions.size should be 3' do
+    @versioned_object.all_versions.size.should == 3
+  end
+
+  it 'version_count should be 3' do
+    @versioned_object.version_count.should == 3
+  end
+
+  it 'time_created should equal 2009-11-09T09:53:22' do
+    @versioned_object.time_created.value.should == '2009-11-09T09:53:22'
+  end
+
+  it 'all_version_ids should return all ids of versions' do
+    ids = @versioned_object.all_version_ids
+    ids.each do |id|
+      %w(ABC::DEF::1 GHI::JKL::2 MNO::PQR::3).should include id.value
+    end
+  end
+
+  it 'should have version id ABC::DEF::1' do
+    object_version_id = ObjectVersionID.new(:value => 'ABC::DEF::1')
+    @versioned_object.has_version_id?(object_version_id).should be_true
+  end
+
+  it 'should not have version id BCD::EFG::12' do
+    object_version_id = ObjectVersionID.new(:value => 'BCD::EFG::12')
+    @versioned_object.has_version_id?(object_version_id).should be_false
+  end
+
+  it 'ABC::DEF::1 should not be original version' do
+    object_version_id = ObjectVersionID.new(:value => 'ABC::DEF::1')
+    @versioned_object.is_original_version?(object_version_id).should be_false
+  end
+
+  it 'GHI::JKL::2 should be original version' do
+    object_version_id = ObjectVersionID.new(:value => 'GHI::JKL::2')
+    @versioned_object.is_original_version?(object_version_id).should be_true
+  end
+
+  it 'should have 2009-07-15T09:24:26 committed version' do
+    exist_time = DvDateTime.new(:value => '2009-07-15T09:24:26')
+    @versioned_object.has_version_at_time?(exist_time).should be_true
+  end
+
+  it 'should retrun version3 with id MNO::PQR::3' do
+    uid = ObjectVersionID.new(:value => 'MNO::PQR::3')
+    @versioned_object.version_with_id(uid).commit_audit.time_committed.
+      should == DvDateTime.new(:value => '2009-07-15T09:24:26')
+  end
+
+  it 'should return version2 with 2008-12-12T19:32:14' do
+    exist_date = DvDateTime.new(:value => '2008-12-12T19:32:14')
+    @versioned_object.version_at_time(exist_date).lifecycle_state.
+      defining_code.code_string.should == '553'
+  end
+
+  it 'latest_version should return version3' do
+    @versioned_object.latest_version.uid.value.should == 'MNO::PQR::3'
+  end
+
+  it 'latest_trunk_version should return ABC::DEF::1' do
+    @versioned_object.latest_trunk_version.uid.value.should ==
+      'ABC::DEF::1'
+  end
+
+  it 'trunk_lifecycle_state should return 532' do
+    @versioned_object.trunk_lifecycle_state.defining_code.
+      code_string.should == '532'
+  end
+
+  it 'revision_history items are 3' do
+    @versioned_object.revision_history.items.size.should == 3
+  end
+
+  it 'should be able to commit original version' do
+    contribution = stub(ObjectRef, :empty? => false, :type => 'CONTRIBUTION')
+    uid = ObjectVersionID.new(:value => 'EFG::HIJ::7')
+    preceding_version_uid = ObjectVersionID.new(:value => 'ABC::DEF::1')
+    audit = stub(AuditDetails)
+    defining_code = stub(CodePhrase, :code_string => '523')
+    lifecycle_state = stub(DvCodedText, :defining_code => defining_code)
+    attestations = stub(Array, :empty? => false)
+    @versioned_object.
+      commit_original_version(:contribution => contribution,
+                              :uid => uid,
+                              :preceding_version_uid => preceding_version_uid,
+                              :commit_audit => audit,
+                              :lifecycle_state => lifecycle_state,
+                              :data => 'data',
+                              :attestations => attestations,
+                              :signature => 'A41bdad')
+    @versioned_object.all_versions.size.should == 4
+  end
+
+  it 'should raise ArgumentError with invalid preceeding version' do
+    contribution = stub(ObjectRef, :empty? => false, :type => 'CONTRIBUTION')
+    uid = ObjectVersionID.new(:value => 'EFG::HIJ::7')
+    preceding_version_uid = ObjectVersionID.new(:value => 'BCD::EFG::8')
+    audit = stub(AuditDetails)
+    defining_code = stub(CodePhrase, :code_string => '523')
+    lifecycle_state = stub(DvCodedText, :defining_code => defining_code)
+    attestations = stub(Array, :empty? => false)
+    lambda {
+      @versioned_object.
+      commit_original_version(:contribution => contribution,
+                              :uid => uid,
+                              :preceding_version_uid => preceding_version_uid,
+                              :commit_audit => audit,
+                              :lifecycle_state => lifecycle_state,
+                              :data => 'data',
+                              :attestations => attestations,
+                              :signature => 'A41bdad')
+    }.should raise_error ArgumentError
+  end
+
+  it 'should be able to commit original merged version' do
+    contribution = stub(ObjectRef, :empty? => false, :type => 'CONTRIBUTION')
+    uid = ObjectVersionID.new(:value => 'KLM::NOP::9')
+    preceding_version_uid = ObjectVersionID.new(:value => 'ABC::DEF::1')
+    time_committed = DvDateTime.new(:value => '2009-11-09T23:42:18')
+    audit = stub(AuditDetails, :time_committed => time_committed)
+    defining_code = stub(CodePhrase, :code_string => '523')
+    lifecycle_state = stub(DvCodedText, :defining_code => defining_code)
+    attestations = stub(Array, :empty? => false)
+    @versioned_object.
+      commit_original_merged_version(:contribution => contribution,
+                              :uid => uid,
+                              :preceding_version_uid => preceding_version_uid,
+                              :commit_audit => audit,
+                              :lifecycle_state => lifecycle_state,
+                              :data => 'merged data',
+                              :attestations => attestations,
+                              :signature => 'dc3dbdad')
+    @versioned_object.latest_version.data.should == 'merged data'
+  end
+
+  it 'should be able to commit imported_version' do
+    contribution = stub(ObjectRef, :empty? => false, :type => 'CONTRIBUTION')
+    time_committed = DvDateTime.new(:value => '2009-11-09T23:42:18')
+    audit = stub(AuditDetails, :time_committed => time_committed)
+    uid = ObjectVersionID.new(:value => 'QRS::TUV::10')
+    preceding_version_uid = ObjectVersionID.new(:value => 'ABC::DEF::1')
+    defining_code = stub(CodePhrase, :code_string => '523')
+    lifecycle_state = stub(DvCodedText, :defining_code => defining_code)
+    attestations = stub(Array, :empty? => false)
+    original_version = OriginalVersion.new(:uid => uid,
+                            :contribution => contribution,
+                            :commit_audit => audit,
+                            :preceding_version_uid => preceding_version_uid,
+                            :data => 'original data',
+                            :lifecycle_state => lifecycle_state,
+                            :attestations => attestations)
+    @versioned_object.commit_imported_version(:contribution => contribution,
+                                              :commit_audit => audit,
+                                              :item => original_version)
+    @versioned_object.latest_version.commit_audit.time_committed.value.
+      should == '2009-11-09T23:42:18'
+  end
+
+  it 'should be able to commit attestation' do
+    attestation = stub(Attestation)
+    uid = ObjectVersionID.new(:value => 'GHI::JKL::2')
+    @versioned_object.commit_attestation(:attestation => attestation,
+                                         :uid => uid,
+                                         :signature => 'CDAEbad')
+    @versioned_object.version_with_id(uid).signature.
+      should == 'CDAEbad'
+  end
+
+  it 'should raise ArgumentError when time_created is nil' do
+    lambda {
+      @versioned_object.time_created = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError when all_versions are nil' do
+    lambda {
+      @versioned_object.all_versions = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError when is_original_version argument is nil' do
+    lambda {
+      @versioned_object.is_original_version?(nil)
+    }.should raise_error ArgumentError
+  end
+
+  it 'should not has time data' do
+    unexisted_time = DvDateTime.new(:value => '2009-11-10T00:43:59')
+    lambda {
+      @versioned_object.version_at_time(unexisted_time)
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with nil argument to commit_attestations' do
+    lambda {
+      @versioned_object.commit_attestation(:attestation => nil)
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with not orinigal version id' do
+    uid = ObjectVersionID.new(:value => 'ABC::DEF::1')
+    attestation = stub(Attestation)
+    lambda {
+      @versioned_object.commit_attestation(:attestation => attestation,
+                                           :uid => uid,
+                                           :signature => 'DEADBEAFE81')
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with nil argument to version with id' do
+    lambda {
+      @versioned_object.version_with_id(nil)
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with unexsited version with id ' do
+    uid = ObjectVersionID.new(:value => 'CBA::FED::1')
+    lambda {
+      @versioned_object.version_with_id(uid)
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/directory/folder_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/directory/folder_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/directory/folder_spec.rb	(revision 367)
@@ -0,0 +1,26 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Common::Directory
+include OpenEHR::RM::DataTypes::Text
+
+describe Folder do
+  before(:each) do
+    items = stub(Array, :size => 3)
+    folders = stub(Array, :size => 5, :empty? => false)
+    @folder = Folder.new(:archetype_node_id => 'at0001',
+                         :name => DvText.new(:value => 'test'),
+                         :items => items,
+                         :folders => folders)
+  end
+
+  it 'should an instance of Folder' do
+    @folder.should be_an_instance_of Folder
+  end
+
+  it 'items size should be 3' do
+    @folder.items.size.should == 3
+  end
+
+  it 'folders size should be 5' do
+    @folder.folders.size.should == 5
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/generic/attestation_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/generic/attestation_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/generic/attestation_spec.rb	(revision 367)
@@ -0,0 +1,62 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Common::Generic
+include OpenEHR::RM::Support::Identification
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::DataTypes::Quantity::DateTime
+include OpenEHR::RM::DataTypes::Encapsulated
+
+describe Attestation do
+  before(:each) do
+    committer = stub(PartyProxy, :namespace => 'UNKNOWN')
+    change_type = stub(DvCodedText, :value =>'creation')
+    time = stub(DvDateTime, :value => '2009-10-03T16:24:19.0Z')
+    reason = DvText.new(:value => 'signed')
+    items = stub(Set, :empty? => false, :size => 3)
+    attested_view = stub(DvMultimedia, :size => 300)
+    @attestation = Attestation.new(:committer => committer,
+                                   :change_type => change_type,
+                                   :time_committed => time,
+                                   :system_id => 'test',
+                                   :reason => reason,
+                                   :proof => 'DEADBEEFBABE',
+                                   :is_pending => true,
+                                   :attested_view => attested_view,
+                                   :items => items)
+  end
+
+  it 'should be an instance of Attestation' do
+    @attestation.should be_an_instance_of Attestation
+  end
+
+  it 'reason should be signed' do
+    @attestation.reason.value.should == 'signed'
+  end
+
+  it 'proof should DEADBEEFBABE' do
+    @attestation.proof.should == 'DEADBEEFBABE'
+  end
+
+  it 'attested view size should be 300' do
+    @attestation.attested_view.size.should == 300
+  end
+
+  it 'is_pending? should true' do
+    @attestation.is_pending?.should be_true
+  end
+
+  it 'items size should be 30' do
+    @attestation.items.size.should == 3
+  end
+
+  it 'should raise ArgumentError when items are empty' do
+    lambda {
+      @attestation.items = Set.new
+    }.should raise_error ArgumentError
+  end
+
+  it 'should not raise ArgumentErro when items are nil' do
+    lambda {
+      @attestation.items = nil
+    }.should_not raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/generic/audit_details_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/generic/audit_details_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/generic/audit_details_spec.rb	(revision 367)
@@ -0,0 +1,51 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Common::Generic
+include OpenEHR::RM::Support::Identification
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::DataTypes::Quantity::DateTime
+
+describe AuditDetails do
+  before(:each) do
+    committer = stub(PartyProxy, :namespace => 'UNKNOWN')
+    change_type = stub(DvCodedText, :value =>'creation')
+    time = stub(DvDateTime, :value => '2009-10-03T16:24:19.0Z')
+    desc = DvText.new(:value => 'test environment')
+    @audit_details = AuditDetails.new(:system_id => 'MAGI',
+                                      :committer => committer,
+                                      :time_committed => time,
+                                      :change_type => change_type,
+                                      :description => desc)
+  end
+
+  it 'should be an instance of AuditDetails' do
+    @audit_details.should be_an_instance_of AuditDetails
+  end
+
+  it 'system_id should be MAGI' do
+    @audit_details.system_id.should == 'MAGI'
+  end
+
+  it 'committer namespece should be UNKNOWN' do
+    @audit_details.committer.namespace.should == 'UNKNOWN'
+  end
+
+  it 'change_type.value should be creation' do
+    @audit_details.change_type.value.should == 'creation'
+  end
+
+  it 'description should be test environment' do
+    @audit_details.description.value.should == 'test environment'
+  end
+
+  it 'should raise ArgumentError when system_id was assigned nil' do
+    lambda {
+      @audit_details.system_id = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError when time_commited is nil' do
+    lambda {
+      @audit_details.time_committed = nil
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/generic/participation_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/generic/participation_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/generic/participation_spec.rb	(revision 367)
@@ -0,0 +1,36 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Common::Generic
+
+describe Participation do
+  before(:each) do
+    performer = stub(PartyProxy, :name => 'GEHIRN')
+    function = stub(DvText, :value => 'committer')
+    mode = stub(DvCodedText, :value => 'present')
+    lower = stub(DvDateTime, :value => '2009-10-03T20:33:05')
+    time = stub(DvInterval, :lower => lower)
+    @participation = Participation.new(:performer => performer,
+                                       :function => function,
+                                       :mode => mode,
+                                       :time => time)
+  end
+
+  it 'should be an instance of Participation' do
+    @participation.should be_an_instance_of Participation
+  end
+
+  it 'should assign performer properly' do
+    @participation.performer.name.should == 'GEHIRN'
+  end
+
+  it 'should assign function properly' do
+    @participation.function.value.should == 'committer'
+  end
+
+  it 'should assign mode properly' do
+    @participation.mode.value.should == 'present'
+  end
+
+  it 'should assign time properly' do
+    @participation.time.lower.value.should == '2009-10-03T20:33:05'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/generic/party_identified_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/generic/party_identified_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/generic/party_identified_spec.rb	(revision 367)
@@ -0,0 +1,64 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Common::Generic
+
+describe PartyIdentified do
+  before(:each) do
+    external_ref = stub(PartyRef, :namespace => 'unknown')
+    identifiers = stub(Array, :size => 5, :empty? => false)
+    @party_identified = PartyIdentified.new(:name => 'NERV',
+                                            :external_ref => external_ref,
+                                            :identifier => identifiers)
+  end
+
+  it 'should be an instance of PartyIdentified' do
+    @party_identified.should be_an_instance_of PartyIdentified
+  end
+
+  it 'should assign name properly' do
+    @party_identified.name.should == 'NERV'
+  end
+
+  it 'should assign external_ref properly' do
+    @party_identified.external_ref.namespace.should == 'unknown'
+  end
+
+  it 'should assign identifier properly' do
+    @party_identified.identifier.size.should be_equal 5
+  end
+
+  it 'should raise ArgumentError with all nil' do
+    lambda {
+      PartyIdentified.new
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with nil name when ex_r and id nil' do
+    @party_identified.identifier = nil
+    @party_identified.external_ref = nil
+    lambda {
+      @party_identified.name = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with nil external_ref when name and id nil' do
+    @party_identified.name = nil
+    @party_identified.identifier = nil
+    lambda {
+      @party_identified.external_ref = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with nil identifier when name and ex_r nil' do
+    @party_identified.name = nil
+    @party_identified.external_ref = nil
+    lambda {
+      @party_identified.identifier = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with empty identifier' do
+    lambda {
+      @party_identified.identifier = Array.new
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/generic/party_proxy_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/generic/party_proxy_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/generic/party_proxy_spec.rb	(revision 367)
@@ -0,0 +1,18 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Common::Generic
+include OpenEHR::RM::Support::Identification
+
+describe PartyProxy do
+  before(:each) do
+    external_ref = stub(PartyRef, :namespace => 'NERV')
+    @party_proxy = PartyProxy.new(:external_ref => external_ref)
+  end
+
+  it 'should be an isntance of PartyProxy' do
+    @party_proxy.should be_an_instance_of PartyProxy
+  end
+
+  it 'exnternal_ref.namespace should be NERV' do
+    @party_proxy.external_ref.namespace.should == 'NERV'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/generic/party_related_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/generic/party_related_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/generic/party_related_spec.rb	(revision 367)
@@ -0,0 +1,24 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Common::Generic
+include OpenEHR::RM::DataTypes::Text
+describe PartyRelated do
+  before(:each) do
+    relationship = stub(DvCodedText, :value => 'self')
+    @party_related = PartyRelated.new(:name => 'TEST',
+                                      :relationship => relationship)
+  end
+
+  it 'should be an instance of PartyRelated' do
+    @party_related.should be_an_instance_of PartyRelated
+  end
+
+  it 'should assign relationship properly' do
+    @party_related.relationship.value.should == 'self'
+  end
+
+  it 'should raise ArgumentError when nil is assigned to relationship' do
+    lambda {
+      @party_related.relationship = nil
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/generic/revision_history_item_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/generic/revision_history_item_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/generic/revision_history_item_spec.rb	(revision 367)
@@ -0,0 +1,43 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Common::Generic
+include OpenEHR::RM::Support::Identification
+
+describe RevisionHistoryItem do
+  before(:each)do
+    version_id = stub(ObjectVersionID, :object_id => 'RIO')
+    audits = stub(Array, :size => 30, :empty? => false)
+    @revision_history_item =
+      RevisionHistoryItem.new(:version_id => version_id,
+                              :audits => audits)
+  end
+
+  it 'should be an instance of RevisionHistoryItem' do
+    @revision_history_item.should be_an_instance_of RevisionHistoryItem
+  end
+
+  it 's version_id.object_id should be RIO' do
+    @revision_history_item.version_id.object_id.should == 'RIO'
+  end
+
+  it 's audits.size should be 30' do
+    @revision_history_item.audits.size.should be_equal 30
+  end
+
+  it 'should raise ArgumentError when nil is assigned to version id' do
+    lambda {
+      @revision_history_item.version_id = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError when nil is assinged to audits' do
+    lambda {
+      @revision_history_item.audits = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError when empty is assinged to audits' do
+    lambda {
+      @revision_history_item.audits = Array.new
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/generic/revision_history_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/generic/revision_history_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/generic/revision_history_spec.rb	(revision 367)
@@ -0,0 +1,45 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Common::Generic
+include OpenEHR::RM::Support::Identification
+include OpenEHR::RM::DataTypes::Quantity::DateTime
+
+describe RevisionHistory do
+  before(:each) do
+    version_id = stub(ObjectVersionID, :value => 'ABCD::EFGH::1')
+    committed_time = stub(DvDateTime, :value => '2009-11-02T22:19:34')
+    audit = stub(AuditDetails, :time_committed => committed_time)
+    audits = stub(Array, :first => audit)
+    last_item = stub(RevisionHistoryItem, :version_id => version_id,
+                     :audits => audits)
+    items = stub(Array, :size => 128, :empty? => false, :last => last_item)
+    @revision_history = RevisionHistory.new(:items => items)
+  end
+
+  it 'should be an instance of RevisionHistory' do
+    @revision_history.should be_an_instance_of RevisionHistory
+  end
+
+  it 'items size should return size 128' do
+    @revision_history.items.size.should be_equal 128
+  end
+
+  it 'should return the most recent version string' do
+    @revision_history.most_recent_version.should == 'ABCD::EFGH::1'
+  end
+
+  it 'should return the most recent commited version time string' do
+    @revision_history.most_recent_version_time_committed == '2009-11-02T22:19:34'
+  end
+
+  it 'should raise ArgumentError when item is nil' do
+    lambda {
+      @revision_history.items = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError when item is empty' do
+    lambda {
+      @revision_history.items = Array.new
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/resource/authored_resource_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/resource/authored_resource_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/resource/authored_resource_spec.rb	(revision 367)
@@ -0,0 +1,68 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Common::Resource
+include OpenEHR::RM::Common::ChangeControl
+include OpenEHR::RM::DataTypes::Text
+
+describe AuthoredResource do
+  before(:each) do
+    original_language = stub(CodePhrase, :code_string => 'ja')
+    translation_language = stub(CodePhrase, :code_string => 'en')
+    translation_details = stub(TranslationDetails,
+                               :language => translation_language)
+    translations = Hash['en', translation_details]
+    description = stub(ResourceDescription, :lifecycle_state => 'initial')
+    revision_history = stub(RevisionHistory, :most_recent_version => '0.0.3')
+    languages_available = Set.new %w(ja en)
+    @authored_resource = AuthoredResource.new(
+                  :original_language => original_language,
+                  :translations => translations,
+                  :description => description,
+                  :revision_history => revision_history)
+  end
+
+  it 'should be an instance of AuthoredResource' do
+    @authored_resource.should be_an_instance_of AuthoredResource
+  end
+
+  it 'original language should be ja' do
+    @authored_resource.original_language.code_string.should == 'ja'
+  end
+
+  it 'translations hash en returns en detail' do
+    @authored_resource.translations['en'].language.code_string.should == 'en'
+  end
+
+  it 'description lifecycle_state should e initial' do
+    @authored_resource.description.lifecycle_state.should == 'initial'
+  end
+
+  it 'language_available should be Set(%(ja en))' do
+    languages_set = Set.new ['ja', 'en']
+    @authored_resource.languages_available.should == languages_set
+  end
+
+  it 'current_revision should be 0.0.3' do
+    @authored_resource.current_revision.should == '0.0.3'
+  end
+
+  it 'should be controlled' do
+    @authored_resource.is_controlled?.should be_true
+  end
+
+  it 'should not be controlled' do
+    @authored_resource.revision_history = nil
+    @authored_resource.is_controlled?.should be_false
+  end
+
+  it 'should raise ArgumentError with empty translations' do
+    lambda {
+      @authored_resource.translations = Array.new
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError when original language is nil' do
+    lambda {
+      @authored_resource.original_language = nil
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/resource/resource_description_item_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/resource/resource_description_item_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/resource/resource_description_item_spec.rb	(revision 367)
@@ -0,0 +1,105 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Common::Resource
+include OpenEHR::RM::DataTypes::Text
+
+describe ResourceDescriptionItem do
+  before(:each) do
+    language = stub(CodePhrase, :defining_code => 'ja')
+    original_resource_uri = {'jp', 'http://openehr.jp/'}
+    @resource_description_item =
+      ResourceDescriptionItem.new(:language => language,
+                                  :purpose => 'test',
+                                  :keywords => ['openehr'],
+                                  :use => 'development',
+                                  :misuse => 'none',
+                                  :copyright => 'Shinji KOBAYASHI',
+                                  :original_resource_uri => original_resource_uri,
+                                  :other_details => {'charset', 'UTF-8'})
+  end
+
+  it 'should be an instance of ResourceDescriptionItem' do
+    @resource_description_item.should be_an_instance_of ResourceDescriptionItem
+  end
+
+  it 'language should ja' do
+    @resource_description_item.language.defining_code.should == 'ja'
+  end
+
+  it 'purpose should be test' do
+    @resource_description_item.purpose.should == 'test'
+  end
+
+  it 'should raise ArgumentError with nil purpose' do
+    lambda {
+      @resource_description_item.purpose = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with empty purpose' do
+    lambda {
+      @resource_description_item.purpose = ''
+    }.should raise_error ArgumentError
+  end
+
+  it 'keywords should [openehr]' do
+    @resource_description_item.keywords.should == ['openehr']
+  end
+
+  it 'use should be development' do
+    @resource_description_item.use.should == 'development'
+  end
+
+  it 'should raise ArgumentError with use is empty' do
+    lambda {
+      @resource_description_item.use = ''
+    }.should raise_error ArgumentError
+  end
+
+  it 'should not raise ArgumentError with nil use' do
+    lambda {
+      @resource_description_item.use = nil
+    }.should_not raise_error ArgumentError
+  end
+
+  it 'misuse should be none' do
+    @resource_description_item.misuse.should == 'none'
+  end
+
+  it 'should raise ArgumentError with empty misuse' do
+    lambda {
+      @resource_description_item.misuse = ''
+    }.should raise_error ArgumentError
+  end
+
+  it 'should not raise ArgumentError with nil misuse' do
+    lambda {
+      @resource_description_item.misuse = nil
+    }.should_not raise_error ArgumentError
+  end
+
+  it 'copyright should be Shinji KOBAYASHI' do
+    @resource_description_item.copyright.should == 'Shinji KOBAYASHI'
+  end
+
+  it 'should raise error with empty copyright' do
+    lambda {
+      @resource_description_item.copyright = ''
+    }.should raise_error ArgumentError
+  end
+
+  it 'should not raise ArgumentError with nil copyright' do
+    lambda {
+      @resource_description_item.copyright = nil
+    }.should_not raise_error ArgumentError
+  end
+
+  it 'original_resource_uri should {jp, http://openehr.jp/}' do
+    @resource_description_item.original_resource_uri.should ==
+      {'jp', 'http://openehr.jp/'}
+  end
+
+  it 'other_details should {charset, UTF-8}' do
+    @resource_description_item.other_details.should ==
+      {'charset', 'UTF-8'}
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/resource/resource_description_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/resource/resource_description_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/resource/resource_description_spec.rb	(revision 367)
@@ -0,0 +1,74 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Common::Resource
+
+describe ResourceDescription do
+  before(:each) do
+    original_author = {'Shinji KOBAYASHI', 'Ehime University'}
+    other_contributors = ['Akimichi TATSUKAWA']
+    resource_description_item =
+      stub(ResourceDescriptionItem, :purpose => 'test')
+    details = {'case', resource_description_item}
+    other_details = {'charset', 'UTF-8'}
+    parent_resource = stub(AuthoredResource, :current_revision => '0.0.3')
+    @resource_description =
+      ResourceDescription.new(:original_author => original_author,
+                              :other_contributors => other_contributors,
+                              :lifecycle_state => 'initial',
+                              :details => details,
+                              :other_details => other_details,
+                              :resource_package_uri => 'http://openehr.jp/',
+                              :parent_resource => parent_resource)
+  end
+
+  it 'should be an instance of ResourceDescription' do
+    @resource_description.should be_an_instance_of ResourceDescription
+  end
+
+  it 'original author should be Shinji KOBAYASHI' do
+    @resource_description.original_author.keys[0].should ==
+      'Shinji KOBAYASHI'
+  end
+
+  it 'other_contributors should be Akimichi TATSUKAWA' do
+    @resource_description.other_contributors[0].should == 
+      'Akimichi TATSUKAWA'
+  end
+
+  it 'lifecycle_state should be initial' do
+    @resource_description.lifecycle_state.should == 'initial'
+  end
+
+  it 'details key should be case' do
+    @resource_description.details.keys[0].should == 'case'
+  end
+
+  it 'other_details value should be charset, UTF-8' do
+    @resource_description.other_details.should == {'charset', 'UTF-8'}
+  end
+
+  it 'resource package uri should be http://openehr.jp/' do
+    @resource_description.resource_package_uri.should == 'http://openehr.jp/'
+  end
+
+  it 'parent_resource current_revision should be 0.0.3' do
+    @resource_description.parent_resource.current_revision.should == '0.0.3'
+  end
+
+  it 'should raise ArgumentError with nil original author' do
+    lambda {
+      @resource_description.original_author = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with nil lifecycle_state' do
+    lambda {
+      @resource_description.lifecycle_state = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with nil details' do
+    lambda {
+      @resource_description.details = {}
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/resource/translation_details_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/resource/translation_details_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/common/resource/translation_details_spec.rb	(revision 367)
@@ -0,0 +1,35 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Common::Resource
+include OpenEHR::RM::DataTypes::Text
+
+describe TranslationDetails do
+  before(:each) do
+    language = stub(CodePhrase, :code_string => 'ja')
+    author = Hash['Shinji KOBAYASHI', 'Ehime University']
+    @translation_details =
+      TranslationDetails.new(:language => language,
+                             :author => author,
+                             :accreditation => 'skoba@moss.gr.jp',
+                             :other_details => {'ja', 'Japanese'})
+  end
+
+  it 'should be an instance of TranslationDetails' do
+    @translation_details.should be_an_instance_of TranslationDetails
+  end
+
+  it 'language should be ja' do
+    @translation_details.language.code_string.should == 'ja'
+  end
+
+  it 'authour should be Shinji KOBAYASHI' do
+    @translation_details.author.keys[0].should == 'Shinji KOBAYASHI'
+  end
+
+  it 'accreditation should be skoba@moss.gr.jp' do
+    @translation_details.accreditation.should == 'skoba@moss.gr.jp'
+  end
+
+  it 'other_details should ja, Japanese' do
+    @translation_details.other_details.values[0].should == 'Japanese'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/composition_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/composition_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/composition_spec.rb	(revision 367)
@@ -0,0 +1,92 @@
+require File.dirname(__FILE__) + '/../../../../spec_helper'
+include OpenEHR::RM::Composition
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::Support::Identification
+include OpenEHR::RM::Common::Generic
+
+describe Composition do
+  before(:each) do
+    name = DvText.new(:value => 'composition test')
+    language = stub(CodePhrase, :code_string => 'ja')
+    category = stub(DvCodedText, :value => 'event')
+    territory = stub(CodePhrase, :code_string => 'jpn')
+    external_ref = stub(PartyRef, :type =>  'ROLE')
+    composer = stub(PartyProxy, :external_ref => external_ref)
+    content = stub(Array, :size => 3)
+    context = stub(EventContext, :location => 'lab1')
+    @composition = Composition.new(:archetype_node_id => 'at0001',
+                                   :name => name,
+                                   :language => language,
+                                   :category => category,
+                                   :territory => territory,
+                                   :composer => composer,
+                                   :content => content,
+                                   :context => context)
+  end
+
+  it 'should be an instance of Composition' do
+    @composition.should be_an_instance_of Composition
+  end
+
+  it 'language should be assigned properly' do
+    @composition.language.code_string.should == 'ja'
+  end
+
+  it 'should validate language with Termonology service'
+
+  it 'should raise ArgumentError with nil language' do
+    lambda {
+      @composition.language = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'category should be assigned properly' do
+    @composition.category.value.should == 'event'
+  end
+
+  it 'should validate category with Terminology service'
+
+  it 'should raise ArgumentError with nil category' do
+    lambda {
+      @composition.category = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'territory should be assined properly' do
+    @composition.territory.code_string.should == 'jpn'
+  end
+
+  it 'should raise ArgumentError with nil territory' do
+    lambda {
+      @composition.territory = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'composer should be assigned properly' do
+    @composition.composer.external_ref.type.should == 'ROLE'
+  end
+
+  it 'should raise ArgumentError with nil comosser' do
+    lambda {
+      @composition.composer = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'is_persistent? should be false when category is not persistent' do
+    @composition.is_persistent?.should be_false
+  end
+
+  it 'is_persistent? should be true when category is persistent' do
+    category = stub(DvCodedText, :value => 'persistent')
+    @composition.category = category
+    @composition.is_persistent?.should be_true
+  end
+
+  it 'content should be assigned properly' do
+    @composition.content.size.should == 3
+  end
+
+  it 'context should be assigned properly' do
+    @composition.context.location.should == 'lab1'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/content_item_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/content_item_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/content_item_spec.rb	(revision 367)
@@ -0,0 +1,14 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Composition::Content
+include OpenEHR::RM::DataTypes::Text
+
+describe ContentItem do
+  before(:each) do
+    @content_item = ContentItem.new(:name => DvText.new(:value => 'item'),
+                                    :archetype_node_id => 'at0001')
+  end
+
+  it 'should be an instance of ContentItem' do
+    @content_item.should be_an_instance_of ContentItem
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/action_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/action_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/action_spec.rb	(revision 367)
@@ -0,0 +1,65 @@
+require File.dirname(__FILE__) + '/../../../../../../spec_helper'
+require File.dirname(__FILE__) + '/shared_examples_spec'
+include OpenEHR::RM::Composition::Content::Entry
+include OpenEHR::RM::DataTypes::Quantity::DateTime
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::DataStructures::ItemStructure
+
+describe Action do
+  it_should_behave_like 'entry'
+
+  before(:each) do
+    time = DvDateTime.new(:value => '2009-11-18T20:17:18')
+    description = stub(ItemStructure, :archetype_node_id => 'at0002')
+    current_state = stub(DvCodedText, :value => 'planned')
+    ism_transition = stub(IsmTransition, :current_state => current_state)
+    instruction_details = stub(InstructionDetails, :activity_id => 'at0003')
+    @action= Action.new(:archetype_node_id => 'at0001',
+                        :name => @name,
+                        :language => @language,
+                        :encoding => @encoding,
+                        :subject => @subject,
+                        :time => time,
+                        :description => description,
+                        :ism_transition => ism_transition,
+                        :instruction_details => instruction_details)
+  end
+
+  it 'should be an instance of Action' do
+    @action.should be_an_instance_of Action
+  end
+
+  it 'time should be assigned properly' do
+    @action.time.value.should == '2009-11-18T20:17:18'
+  end
+
+  it 'should raise ArgumentError with nil assigned to time' do
+    lambda {
+      @action.time = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'description should assigned properly' do
+    @action.description.archetype_node_id.should == 'at0002'
+  end
+
+  it 'should raise ArgumentError with nil description' do
+    lambda {
+      @action.description = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'ism_transition should be assigned properly' do
+    @action.ism_transition.current_state.value.should == 'planned'
+  end
+
+  it 'should raise ArgumentError with nil ism_transition' do
+    lambda {
+      @action.ism_transition = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'instruction_details should be assigned properly' do
+    @action.instruction_details.activity_id.should == 'at0003'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/activity_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/activity_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/activity_spec.rb	(revision 367)
@@ -0,0 +1,59 @@
+require File.dirname(__FILE__) + '/../../../../../../spec_helper'
+require File.dirname(__FILE__) + '/shared_examples_spec'
+include OpenEHR::RM::DataStructures::ItemStructure
+include OpenEHR::RM::Composition::Content::Entry
+include OpenEHR::RM::DataTypes::Encapsulated
+
+describe Activity do
+  it_should_behave_like 'entry'
+
+  before(:each) do
+    description = stub(ItemStructure, :archetype_node_id => 'at0002')
+    timing = stub(DvParsable, :value => '2009-11-18T19:35:11')
+    @activity = Activity.new(:archetype_node_id => 'at0001',
+                             :name => @name,
+                             :description => description,
+                             :timing => timing,
+                             :action_archetype_id => '/at.+/')
+  end
+
+  it 'should be an instance of Activity' do
+    @activity.should be_an_instance_of Activity
+  end
+
+  it 'description should be assigned properly' do
+    @activity.description.archetype_node_id.should == 'at0002'
+  end
+
+  it 'should raise ArgumentError with nil description' do
+    lambda {
+      @activity.description = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'timing should be assigned properly' do
+    @activity.timing.value.should == '2009-11-18T19:35:11'
+  end
+
+  it 'should raise ArgumentError with nil timing' do
+    lambda {
+      @activity.timing = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'action_archetype_id should be assigned properly' do
+    @activity.action_archetype_id.should == '/at.+/'
+  end
+
+  it 'should raise ArgumentError with nil action_archetype_id' do
+    lambda {
+      @activity.action_archetype_id = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with empty action_archetype_id' do
+    lambda {
+      @activity.action_archetype_id = ''
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/admin_entry_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/admin_entry_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/admin_entry_spec.rb	(revision 367)
@@ -0,0 +1,34 @@
+require File.dirname(__FILE__) + '/../../../../../../spec_helper'
+require File.dirname(__FILE__) + '/shared_examples_spec'
+include OpenEHR::RM::Composition::Content::Entry
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::Common::Generic
+include OpenEHR::RM::DataStructures::ItemStructure
+
+describe AdminEntry do
+  it_should_behave_like 'entry'
+
+  before(:each) do
+    data = stub(ItemStructure, :archetype_node_id => 'at0002')
+    @admin_entry = AdminEntry.new(:archetype_node_id => 'at0001',
+                                  :name => DvText.new(:value => 'admin entry'),
+                                  :language => @language,
+                                  :encoding => @encoding,
+                                  :subject => @subject,
+                                  :data => data)
+  end
+
+  it 'should be an instance of AdminEntry' do
+    @admin_entry.should be_an_instance_of AdminEntry
+  end
+
+  it 'data should be assigned properly' do
+    @admin_entry.data.archetype_node_id.should == 'at0002'
+  end
+
+  it 'should raise ArgumentError when nil assigned to data' do
+    lambda {
+      @admin_entry.data = nil
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/care_entry_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/care_entry_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/care_entry_spec.rb	(revision 367)
@@ -0,0 +1,35 @@
+require File.dirname(__FILE__) + '/../../../../../../spec_helper'
+require File.dirname(__FILE__) + '/shared_examples_spec'
+include OpenEHR::RM::Composition::Content::Entry
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::DataStructures::ItemStructure
+include OpenEHR::RM::Support::Identification
+
+describe CareEntry do
+  it_should_behave_like 'entry'
+
+  before(:each) do
+    protocol = stub(ItemStructure, :archetype_node_id => 'at0003')
+    guideline_id = stub(ObjectRef, :type => 'care guideline')
+    @care_entry = CareEntry.new(:archetype_node_id => 'at0001',
+                                :name => DvText.new(:value => 'care entry'),
+                                :language => @language,
+                                :encoding => @encoding,
+                                :subject => @subject,
+                                :protocol => protocol,
+                                :guideline_id => guideline_id)
+  end
+
+  it 'should be an instance of CareEntry' do
+    @care_entry.should be_an_instance_of CareEntry
+  end
+
+  it 'protocol should be assigned properly' do
+    @care_entry.protocol.archetype_node_id.should == 'at0003'
+  end
+
+  it 'guideline should be assined properly' do
+    @care_entry.guideline_id.type.should == 'care guideline'
+  end
+end
+
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/entry_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/entry_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/entry_spec.rb	(revision 367)
@@ -0,0 +1,85 @@
+require File.dirname(__FILE__) + '/../../../../../../spec_helper'
+require File.dirname(__FILE__) + '/shared_examples_spec'
+include OpenEHR::RM::Composition::Content::Entry
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::Common::Generic
+
+describe Entry do
+  it_should_behave_like 'entry'
+
+  before(:each) do
+    external_ref = stub(PartyRef, :type => 'entry')
+    subject = PartyProxy.new(:external_ref => external_ref)
+    provider_external_ref = stub(PartyRef, :type => 'provider')
+    provider = PartyProxy.new(:external_ref => provider_external_ref)
+    other_participations = stub(Array, :size => 3, :empty? => false)
+    workflow_id = stub(ObjectRef, :type => 'workflow')
+    @entry = Entry.new(:archetype_node_id => 'at0001',
+                       :name => DvText.new(:value => 'entry test'),
+                       :language => @language,
+                       :encoding => @encoding,
+                       :subject => subject,
+                       :provider => provider,
+                       :other_participations => other_participations,
+                       :workflow_id => workflow_id)
+  end
+
+  it 'should be an instance of Entry' do
+    @entry.should be_an_instance_of Entry
+  end
+
+  it 'language should be assigned properly' do
+    @entry.language.code_string.should == 'ja'
+  end
+
+  it 'should raise ArgumentError when nil assign to language' do
+    lambda {
+      @entry.language = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with invalid language code'
+
+  it 'encoding should be assigned properly' do
+    @entry.encoding.code_string.should == 'UTF-8'
+  end
+
+  it 'should raise ArgumentError when nil assign to encoding' do
+    lambda {
+      @entry.encoding = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with invalid encoding'
+
+  it 'subject should be assigned properly' do
+    @entry.subject.external_ref.type.should == 'entry'
+  end
+
+  it 'should raise ArgumentError when nil assigned to subject' do
+    lambda {
+      @entry.subject = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'provider should be assigned properly' do
+    @entry.provider.external_ref.type.should == 'provider'
+  end
+
+  it 'other_participations should be assigned properly' do
+    @entry.other_participations.size.should be_equal 3
+  end
+
+  it 'workflow_id should assigned properly' do
+    @entry.workflow_id.type.should == 'workflow'
+  end
+
+  it 'subject_is_self? should be determined by subject class' do
+    @entry.subject_is_self?.should be_false
+  end
+
+  it 'subject_is_self? should be true when subject is instance of PartySelf' do
+    @entry.subject = PartySelf.new
+    @entry.subject_is_self?.should be_true
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/evaluation_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/evaluation_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/evaluation_spec.rb	(revision 367)
@@ -0,0 +1,32 @@
+require File.dirname(__FILE__) + '/../../../../../../spec_helper'
+require File.dirname(__FILE__) + '/shared_examples_spec'
+include OpenEHR::RM::DataStructures::ItemStructure
+include OpenEHR::RM::Composition::Content::Entry
+
+describe Evaluation do
+  it_should_behave_like 'entry'
+
+  before(:each) do
+    data = stub(ItemStructure, :archetype_node_id => 'at0002')
+    @evaluation = Evaluation.new(:archetype_node_id => 'at0001',
+                                 :name => @name,
+                                 :language => @language,
+                                 :encoding => @encoding,
+                                 :subject => @subject,
+                                 :data => data)
+  end
+
+  it 'should be an instance of Evaluation' do
+    @evaluation.should be_an_instance_of Evaluation
+  end
+
+  it 'data should be properly assigned' do
+    @evaluation.data.archetype_node_id.should == 'at0002'
+  end
+
+  it 'should raise ArgumentError when nil assigned to data' do
+    lambda {
+      @evaluation.data = nil
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/instruction_details_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/instruction_details_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/instruction_details_spec.rb	(revision 367)
@@ -0,0 +1,51 @@
+require File.dirname(__FILE__) + '/../../../../../../spec_helper'
+include OpenEHR::RM::DataStructures::ItemStructure
+include OpenEHR::RM::Composition::Content::Entry
+include OpenEHR::RM::Support::Identification
+
+describe InstructionDetails do
+  before(:each) do
+    instruction_id = stub(LocatableRef, :path => '[instruction]/[test]')
+    wf_details = stub(ItemStructure, :archetype_node_id => 'at0004')
+    @instruction_details =
+      InstructionDetails.new(:instruction_id => instruction_id,
+                             :activity_id => 'at0003',
+                             :wf_details => wf_details)
+  end
+
+  it 'should be an instance of InstructionDetails' do
+    @instruction_details.should be_an_instance_of InstructionDetails
+  end
+
+  it 'instruction_id should be assigned properly' do
+    @instruction_details.instruction_id.path.should ==
+      '[instruction]/[test]'
+  end
+
+  it 'should raise ArgumentError with nil instruction_id' do
+    lambda {
+      @instruction_details.instruction_id = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'activity_id should be assigned properly' do
+    @instruction_details.activity_id.should == 'at0003'
+  end
+
+  it 'should raise ArgumentError with nil activity_id' do
+    lambda {
+      @instruction_details.activity_id = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with empty activity_id' do
+    lambda {
+      @instruction_details.activity_id = ''
+    }.should raise_error ArgumentError
+  end
+
+  it 'wf_details should be assigned properly' do
+    @instruction_details.wf_details.archetype_node_id.should == 
+      'at0004'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/instruction_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/instruction_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/instruction_spec.rb	(revision 367)
@@ -0,0 +1,58 @@
+require File.dirname(__FILE__) + '/../../../../../../spec_helper'
+require File.dirname(__FILE__) + '/shared_examples_spec'
+include OpenEHR::RM::Composition::Content::Entry
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::DataTypes::Quantity::DateTime
+include OpenEHR::RM::DataTypes::Encapsulated
+
+describe Instruction do
+  it_should_behave_like 'entry'
+
+  before(:each) do
+    narrative = DvText.new(:value => 'instruction test')
+    activities = stub(Array, :size => 5, :empty? => false)
+    expiry_time = DvDateTime.new(:value => '2009-11-18T20:58:34')
+    wf_definition = stub(DvParsable, :value => 'behavior driven')
+    @instruction= Instruction.new(:archetype_node_id => 'at0001',
+                                  :name => @name,
+                                  :language => @language,
+                                  :encoding => @encoding,
+                                  :subject => @subject,
+                                  :narrative => narrative,
+                                  :activities => activities,
+                                  :expiry_time => expiry_time,
+                                  :wf_definition => wf_definition)
+  end
+
+  it 'should be an instance of Instruction' do
+    @instruction.should be_an_instance_of Instruction
+  end
+
+  it 'narrative should be assigned properly' do
+    @instruction.narrative.value.should == 'instruction test'
+  end
+
+  it 'should raise ArgumentError when narrative is assined with nil' do
+    lambda {
+      @instruction.narrative = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'activities should be assigned properly' do
+    @instruction.activities.size.should be_equal 5
+  end
+
+  it 'should raise ArgumentError with empty activities' do
+    lambda {
+      @instruction.activities = [ ]
+    }.should raise_error ArgumentError
+  end
+
+  it 'expiry_time should be assigned properly' do
+    @instruction.expiry_time.value.should == '2009-11-18T20:58:34'
+  end
+
+  it 'wf_definition should be assigned properly' do
+    @instruction.wf_definition.value.should == 'behavior driven'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/ism_transition_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/ism_transition_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/ism_transition_spec.rb	(revision 367)
@@ -0,0 +1,46 @@
+require File.dirname(__FILE__) + '/../../../../../../spec_helper'
+include OpenEHR::RM::Composition::Content::Entry
+include OpenEHR::RM::DataTypes::Text
+
+describe IsmTransition do
+  before(:each) do
+    current_state = stub(DvCodedText, :value => 'planned')
+    transition = stub(DvCodedText, :value => 'scheduled')
+    careflow_step = stub(DvCodedText, :value => 'completed')
+    @ism_transition = IsmTransition.new(:current_state => current_state,
+                                        :transition => transition,
+                                        :careflow_step => careflow_step)
+  end
+
+  it 'should be an instance of IsmTransition' do
+    @ism_transition.should be_an_instance_of IsmTransition
+  end
+
+  it 'current_status should be assigned properly' do
+    @ism_transition.current_state.value.should == 'planned'
+  end
+
+  it 'should raise ArgumentError with nil current state' do
+    lambda {
+      @ism_transition.current_state = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError when current_state has invalid code'
+
+  it 'transition should be assined properly' do
+    @ism_transition.transition.value.should == 'scheduled'
+  end
+
+  it 'should raise ArgumentError with nil transition' do
+    lambda {
+      @ism_transition.transition = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArugmentError with invalid transition code'
+
+  it 'careflow_step should be assigned properly' do
+    @ism_transition.careflow_step.value.should == 'completed'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/observation_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/observation_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/observation_spec.rb	(revision 367)
@@ -0,0 +1,38 @@
+require File.dirname(__FILE__) + '/../../../../../../spec_helper'
+require File.dirname(__FILE__) + '/shared_examples_spec'
+include OpenEHR::RM::DataStructures::History
+include OpenEHR::RM::Composition::Content::Entry
+
+describe Observation do
+  it_should_behave_like 'entry'
+
+  before(:each) do
+    data = stub(History, :archetype_node_id => 'at0002')
+    state = stub(History, :archetype_node_id => 'at0003')
+    @observation = Observation.new(:archetype_node_id => 'at0001',
+                                   :name => @name,
+                                   :language => @language,
+                                   :encoding => @encoding,
+                                   :subject => @subject,
+                                   :data => data,
+                                   :state => state)
+  end
+
+  it 'should be an instance of Observation' do
+    @observation.should be_an_instance_of Observation
+  end
+
+  it 'data should be assigned properly' do
+    @observation.data.archetype_node_id.should == 'at0002'
+  end
+
+  it 'should raise ArgumentError when nil assigned to data' do
+    lambda {
+      @observation.data = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'state should be assigned properly' do
+    @observation.state.archetype_node_id.should == 'at0003'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/shared_examples_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/shared_examples_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/entry/shared_examples_spec.rb	(revision 367)
@@ -0,0 +1,12 @@
+require File.dirname(__FILE__) + '/../../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::Common::Generic
+
+shared_examples_for 'entry', :shared => true do
+  before(:each) do
+    @name = DvText.new(:value => 'entry package')
+    @language = stub(CodePhrase, :code_string => 'ja')
+    @encoding = stub(CodePhrase, :code_string => 'UTF-8')
+    @subject = stub(PartyProxy)
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/navigation/section_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/navigation/section_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/content/navigation/section_spec.rb	(revision 367)
@@ -0,0 +1,32 @@
+require File.dirname(__FILE__) + '/../../../../../../spec_helper'
+include OpenEHR::RM::Composition::Content::Navigation
+include OpenEHR::RM::DataTypes::Text
+
+describe Section do
+  before(:each) do
+    items = stub(Array, :empty? => false, :size => 10)
+    @section = Section.new(:archetype_node_id => 'at0001',
+                           :name => DvText.new(:value => 'section'),
+                           :items => items)
+  end
+
+  it 'should be an instance of Section' do
+    @section.should be_an_instance_of Section
+  end
+
+  it 'items should be assigned properly' do
+    @section.items.size.should be_equal 10
+  end
+
+  it 'empty items should raise ArgumentError' do
+    lambda {
+      @section.items = [ ]
+    }.should raise_error ArgumentError
+  end
+
+  it 'nil items should not raise ArgumentError' do
+    lambda {
+      @section.items = nil
+    }.should_not raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/event_context_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/event_context_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/composition/event_context_spec.rb	(revision 367)
@@ -0,0 +1,88 @@
+require File.dirname(__FILE__) + '/../../../../spec_helper'
+include OpenEHR::RM::Composition
+include OpenEHR::RM::DataTypes::Quantity::DateTime
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::DataStructures::ItemStructure
+
+describe EventContext do
+  before(:each) do
+    start = DvDateTime.new(:value => '2009-11-13T20:46:57')
+    setting_group = stub(CodePhrase, :code_string => '225')
+    setting = stub(DvCodedText, :defining_code => setting_group)
+    ending = DvDateTime.new(:value => '2010-10-14T09:00:00')
+    participations = stub(Array, :size => 5, :empty? => false)
+    other_context = stub(ItemStructure, :archetype_node_id => 'at0002')
+    @event_context = EventContext.new(:start_time => start,
+                                      :end_time => ending,
+                                      :setting => setting,
+                                      :participations => participations,
+                                      :location => 'ehime',
+                                      :other_context => other_context)
+  end
+
+  it 'should be an instance of EventContext' do
+    @event_context.should be_an_instance_of EventContext
+  end
+
+  it 'start_time should be assigned properly' do
+    @event_context.start_time.value.should == '2009-11-13T20:46:57'
+  end
+
+  it 'should raise ArgumentError with nil start_time' do
+    lambda {
+      @event_context.start_time = nil
+    }.should raise_error ArgumentError
+  end
+  
+  it 'setting should be assigned properly' do
+    @event_context.setting.defining_code.code_string.should == '225'
+  end
+
+  it 'should raise ArgumentError with nil setting' do
+    lambda {
+      @event_context.setting = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should vaildate setting code with Terminology service'
+
+  it 'end_time should be assigned properly' do
+    @event_context.end_time.value.should == '2010-10-14T09:00:00'
+  end
+
+  it 'participations should be properly assigned' do
+    @event_context.participations.size.should be_equal 5
+  end
+
+  it 'should raise ArgumentError with empty participations' do
+    lambda {
+      @event_context.participations = [ ]
+    }.should raise_error ArgumentError
+  end
+
+  it 'should not raise ArgumentError with nil participations' do
+    lambda {
+      @event_context.participations = nil
+    }.should_not raise_error ArgumentError
+  end
+
+  it 'location should be assigned properly' do
+    @event_context.location.should == 'ehime'
+  end
+
+  it 'should raise ArgumentError with empty location' do
+    lambda {
+      @event_context.location = ''
+    }.should raise_error ArgumentError
+  end
+
+  it 'should not raise ArgumentError with nil location' do
+    lambda {
+      @event_context.location = nil
+    }.should_not raise_error ArgumentError
+  end
+
+  it 'other_context should be assigned properly' do
+    @event_context.other_context.archetype_node_id.should == 'at0002'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/data_structure_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/data_structure_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/data_structure_spec.rb	(revision 367)
@@ -0,0 +1,21 @@
+require File.dirname(__FILE__) + '/../../../../spec_helper'
+include OpenEHR::RM::DataStructures
+include OpenEHR::RM::DataTypes::Text
+
+describe DataStructure do
+  before(:each) do
+    name = DvText.new(:value => 'test')
+    @data_structure = DataStructure.new(:archetype_node_id => 'at0001',
+                                        :name => name)
+  end
+
+  it 'should be an instance of DataStructure' do
+    @data_structure.should be_an_instance_of DataStructure
+  end
+
+  it 'should raise NotImplementedError' do
+    lambda {
+      @data_structure.as_hierarchy
+    }.should raise_error NotImplementedError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/history/event_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/history/event_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/history/event_spec.rb	(revision 367)
@@ -0,0 +1,44 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataStructures::History
+include OpenEHR::RM::DataStructures::ItemStructure
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::DataTypes::Quantity::DateTime
+
+describe Event do
+  before(:each) do
+    time = DvDateTime.new(:value => '2009-11-12T10:19:33')
+    state = stub(ItemStructure, :archetype_node_id => 'at0002')
+    origin = DvDateTime.new(:value => '2009-11-11T10:20:40')
+    parent = stub(History, :origin => origin)
+    @event = Event.new(:archetype_node_id => 'at0001',
+                       :name => DvText.new(:value => 'Event test'),
+                       :time => time,
+                       :data => 'data',
+                       :state => state,
+                       :parent => parent)
+  end
+
+  it 'should be an instance of Event' do
+    @event.should be_an_instance_of Event
+  end
+
+  it 'data should be assigned properly' do
+    @event.data.should == 'data'
+  end
+
+  it 'time should be assigned properly' do
+    @event.time.value.should == '2009-11-12T10:19:33'
+  end
+
+  it 'state should be assigned properly' do
+    @event.state.archetype_node_id.should == 'at0002'
+  end
+
+  it 'parent should be properly assigned' do
+    @event.parent.origin.value.should == '2009-11-11T10:20:40'
+  end
+
+  it 'offset should be diff of parent.origin from time' do
+    @event.offset.value.should == 'P0Y0M0W0DT23H58M53S'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/history/history_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/history/history_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/history/history_spec.rb	(revision 367)
@@ -0,0 +1,67 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataStructures::History
+include OpenEHR::RM::DataStructures::ItemStructure
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::DataTypes::Quantity::DateTime
+
+describe History do
+  before(:each) do
+    origin = DvDateTime.new(:value => '2009-11-01T00:00:00')
+    period = DvDuration.new(:value => 'P1Y2M3W4D')
+    duration = DvDuration.new(:value => 'P0Y0M0W6D')
+    events = [stub(Event, :archetype_node_id => 'at0002')]
+    summary = stub(ItemStructure, :archetype_node_id => 'at0003')
+    @history = History.new(:archetype_node_id => 'at0001',
+                           :name => DvText.new(:value => 'history test'),
+                           :origin => origin,
+                           :period => period,
+                           :duration => duration,
+                           :events => events,
+                           :summary => summary)
+  end
+
+  it 'should be an instance of History' do
+    @history.should be_an_instance_of History
+  end
+
+  it 'origin should be properly assigned' do
+    @history.origin.value.should == '2009-11-01T00:00:00'
+  end
+
+  it 'should raise ArgumentError with nil origin' do
+    lambda {
+      @history.origin = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'period should be properly assigned' do
+    @history.period.value.should == 'P1Y2M3W4D'
+  end
+
+  it 'duration should be properly assigned' do
+    @history.duration.value.should == 'P0Y0M0W6D'
+  end
+
+  it 'is_periodic? should be true when period is not nil' do
+    @history.is_periodic?.should be_true
+  end
+
+  it 'is_periodic? should be false when period is nil' do
+    @history.period = nil
+    @history.is_periodic?.should be_false
+  end
+
+  it 'events should be properly assigned' do
+    @history.events[0].archetype_node_id.should == 'at0002'
+  end
+
+  it 'empty events should raise ArgumentError' do
+    lambda {
+      @history.events = []
+    }.should raise_error ArgumentError
+  end
+
+  it 'summary should be properly assigned' do
+    @history.summary.archetype_node_id.should == 'at0003'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/history/interval_event_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/history/interval_event_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/history/interval_event_spec.rb	(revision 367)
@@ -0,0 +1,43 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataStructures::History
+include OpenEHR::RM::DataStructures::ItemStructure
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::DataTypes::Quantity::DateTime
+
+describe IntervalEvent do
+  before(:each) do
+    time = DvDateTime.new(:value => '2009-11-12T10:19:33')
+    state = stub(ItemStructure, :archetype_node_id => 'at0002')
+    origin = DvDateTime.new(:value => '2009-11-11T10:20:40')
+    parent = stub(History, :origin => origin)
+    math_function = stub(DvCodedText, :value => 'mean')
+    width = DvDuration.new(:value => 'P0Y2M1W3DT5H7M3S')
+    @interval_event = IntervalEvent.new(:archetype_node_id => 'at0001',
+                                :name => DvText.new(:value => 'Event test'),
+                                :time => time,
+                                :data => 'data',
+                                :width => width,
+                                :math_function => math_function, 
+                                :sample_count => 1234)
+  end
+
+  it 'should be an instance of IntervalEvent' do
+    @interval_event.should be_an_instance_of IntervalEvent
+  end
+
+  it 'width should be assigned properly' do
+    @interval_event.width.value.should == 'P0Y2M1W3DT5H7M3S'
+  end
+
+  it 'math_function should be assigned properly' do
+    @interval_event.math_function.value.should == 'mean'
+  end
+
+  it 'sample_count should be assigned properly' do
+    @interval_event.sample_count.should be_equal 1234
+  end
+
+  it 'should subtract time for interval start time' do
+    @interval_event.interval_start_time.value.should == '2009-09-09T05:12:30+09:00'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/item_structure/item_list_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/item_structure/item_list_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/item_structure/item_list_spec.rb	(revision 367)
@@ -0,0 +1,53 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataStructures::ItemStructure
+include OpenEHR::RM::DataStructures::ItemStructure::Representation
+include OpenEHR::RM::DataTypes::Text
+
+describe ItemList do
+  before(:each) do
+    items = %w{one two three}.collect do |n|
+      Element.new(:name => DvText.new(:value => n),
+                  :archetype_node_id => 'test')
+    end
+    item_list_name = DvText.new(:value => 'item list')
+    @item_list = ItemList.new(:name => item_list_name,
+                              :archetype_node_id => 'test',
+                              :items => items)
+    
+  end
+
+  it 'should be instance of ItemList' do
+    @item_list.should be_an_instance_of ItemList
+  end
+
+  it 'count should be 3' do
+    @item_list.item_count.should be_equal 3
+  end
+
+  it 'count should be 0' do
+    @item_list.items = nil
+    @item_list.item_count.should be_equal 0
+  end
+
+
+  it 'retrieve the names of all items' do
+    @item_list.names.should == %w{one two three}.collect{|n|
+      DvText.new(:value => n)}
+  end
+
+  it 'should return the item with a name' do
+    @item_list.named_item('one').name.value.should == 'one'
+  end
+
+  it 'should return nil when item is not exist' do
+    @item_list.named_item('four').should be_nil
+  end
+
+  it 'retrieve the ith item with number' do
+    @item_list.ith_item(1).name.value.should == 'one'
+  end
+
+  it 'generate cluster of items' do
+    @item_list.as_hierarchy.name.value.should == 'item list'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/item_structure/item_single_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/item_structure/item_single_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/item_structure/item_single_spec.rb	(revision 367)
@@ -0,0 +1,29 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+
+include OpenEHR::RM::DataStructures::ItemStructure
+include OpenEHR::RM::DataStructures::ItemStructure::Representation
+include OpenEHR::RM::DataTypes::Text
+
+describe ItemSingle do
+  before(:each) do
+    element = stub(Element, :archetype_node_id => 'at0002')
+    item_single_name = DvText.new(:value => 'item single')
+    @item_single = ItemSingle.new(:name => item_single_name,
+                                  :archetype_node_id => 'at0001',
+                                  :item => element)
+  end
+
+  it 'should be an instance of ItemSingle' do
+    @item_single.should be_an_instance_of ItemSingle
+  end
+
+  it 'should raise ArgumentError with nil item' do
+    lambda {
+      @item_single.item = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should return as_hierarchy' do
+    @item_single.as_hierarchy.archetype_node_id.should == 'at0002'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/item_structure/item_table_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/item_structure/item_table_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/item_structure/item_table_spec.rb	(revision 367)
@@ -0,0 +1,147 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+
+include OpenEHR::RM::DataStructures::ItemStructure
+include OpenEHR::RM::DataStructures::ItemStructure::Representation
+include OpenEHR::RM::DataTypes::Text
+
+def row(args)
+  return args.collect do |n|
+    Element.new(:name => DvText.new(:value => n),
+                :archetype_node_id => 'test')
+  end
+end
+
+def cluster_builder(name,rows)
+  return Cluster.new(:name => DvText.new(:value => name),
+                     :archetype_node_id => 'test',
+                     :items => rows)
+end
+
+describe ItemTable do
+  before(:each) do
+    row1 = row(%w{one two three})
+    row2 = row(%w{four five six})
+    rows = [row1, row2].collect{|r| cluster_builder('cluster',r)}
+    @item_table = ItemTable.new(:name => DvText.new(:value => 'item table'),
+                                :archetype_node_id => 'test',
+                                :rows => rows)
+  end
+
+  it 'should be an instance of ItemTable' do
+    @item_table.should be_an_instance_of ItemTable
+  end
+
+  it 's row count should be 2' do
+    @item_table.row_count.should be_equal 2
+  end
+
+  it 's row_count should be 0 when rows are nil' do
+    @item_table.rows = nil
+    @item_table.row_count.should be_equal 0
+  end
+
+  it 's column_count should be 3' do
+    @item_table.column_count.should be_equal 3
+  end
+
+  it 'column_count should be 0 when @rows == nil' do
+    @item_table.rows = nil
+    @item_table.column_count.should be_equal 0
+  end
+
+  it 's row_names should be cluster cluster' do
+    @item_table.row_names.should == %w{cluster cluster}.collect{|n|
+      DvText.new(:value => n)}
+  end
+
+  it 's row_names should be empty when items are nil' do
+    @item_table.rows = nil
+    @item_table.row_names.should == []
+  end
+
+  it 's column_names should one two three' do
+    @item_table.column_names.should == %w{one two three}.collect{|s|
+      DvText.new(:value => s)}
+  end
+
+  it 's column_names should empty when items aer nil' do
+    @item_table.rows = nil
+    @item_table.column_names.should == []
+  end
+
+  it 's ith_row(integer) should be ith row' do
+    @item_table.ith_row(2).items[1].name.value.should == 'five'
+  end
+
+  it 'should be invalid index under 0' do
+    lambda {@item_table.ith_row(0) }.should raise_error(ArgumentError)
+  end
+
+  it 'should be true because it has_row_with_name cluster' do
+    @item_table.has_row_with_name?('one').should be_true
+  end
+
+  it 'should be true because it does not have_row_with_name key' do
+    @item_table.has_row_with_name?('two').should_not be_true
+  end
+
+  it 'should raise argument error key is nil' do
+    lambda {@item_table.has_row_with_name?(nil)
+      }.should raise_error(ArgumentError)
+  end
+
+  it 'should raise argument error key is empty' do
+    lambda {@item_table.has_row_with_name?('')
+      }.should raise_error(ArgumentError)
+  end
+
+  it 'should be true because it has_column_with_name one' do
+    @item_table.has_column_with_name?('one').should be_true
+  end
+
+  it 'should be false it has_column with name ten' do
+    @item_table.has_column_with_name?('ten').should be_false
+  end
+
+  it 'second row should be named_row four' do
+    @item_table.named_row('four').items[1].name.value = 'five'
+  end
+
+  it 'should be true if row has key' do
+    @item_table.has_row_with_key?(Set['one','two']).should be_true
+  end
+
+  it 'should not be true if row has not key' do
+    @item_table.has_row_with_key?(Set['two','five']).should be_false
+  end
+
+  it 'should be a first row that has one' do
+    @item_table.row_with_key(Set['one', 'two']).items[0].name.value.should =='one'
+  end
+
+  it 'should raise argument error if row has no key' do
+    lambda {
+      @item_table.row_with_key(Set['two','five'])}.should raise_error(ArgumentError)
+  end
+
+  it 'should be element at cell ij' do 
+    @item_table.element_at_cell_ij(2,2).name.value.should == 'five'
+  end
+
+  it 'should not be element at cell with wrong ij' do
+    @item_table.element_at_cell_ij(2,3).name.value.should_not == 'five'
+  end
+
+  it 'should be two element at named cell by row column' do
+    @item_table.element_at_named_cell('cluster', 'three').name.value == 'three'
+  end
+
+  it 'should return nil when rows are nil' do
+    @item_table.rows = nil
+    @item_table.row_count.should be_equal 0
+  end
+
+  it 'should be first row as hierachy' do
+    @item_table.as_hierarchy.name.value.should == 'cluster'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/item_structure/item_tree_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/item_structure/item_tree_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/item_structure/item_tree_spec.rb	(revision 367)
@@ -0,0 +1,48 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+
+include OpenEHR::RM::DataStructures::ItemStructure
+include OpenEHR::RM::DataStructures::ItemStructure::Representation
+include OpenEHR::RM::DataTypes::Text
+
+describe ItemTree do
+  before(:each) do
+    i = 1
+    items = %w{one two three}.collect do |name|
+      i += 1
+      Element.new(:name => DvText.new(:value => name),
+                  :archetype_node_id => 'at000' + i.to_s)
+    end
+    name = DvText.new(:value => 'item tree')
+    @item_tree = ItemTree.new(:name => name,
+                              :archetype_node_id => 'at0001',
+                              :items => items)
+  end
+
+  it 'should be an instance of ItemTree' do
+    @item_tree.should be_an_instance_of ItemTree
+  end
+
+  it 'first item name should be one' do
+    @item_tree.items[0].name.value.should == 'one'
+  end
+
+  it 'has valid element path' do
+    @item_tree.has_element_path?('at0002').should be_true
+  end
+
+  it 'should return false with wrong node' do
+    @item_tree.has_element_path?('at0005').should be_false
+  end
+
+  it 'path at002 should return two' do
+    @item_tree.element_at_path('at0003').name.value.should == 'two'
+  end
+
+  it 'path at005 should return nil' do
+    @item_tree.element_at_path('at0005').should be_nil
+  end
+
+  it 'should returns ItemTree as Cluster' do
+    @item_tree.as_hierarchy.name.value.should == 'item tree'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/item_structure/representation/cluster_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/item_structure/representation/cluster_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/item_structure/representation/cluster_spec.rb	(revision 367)
@@ -0,0 +1,26 @@
+require File.dirname(__FILE__) + '/../../../../../../spec_helper'
+include OpenEHR::RM::DataStructures::ItemStructure::Representation
+include OpenEHR::RM::DataTypes::Text
+
+describe Cluster do
+  before(:each) do
+    item = stub(Item)
+    @cluster = Cluster.new(:archetype_node_id => 'at0001',
+                           :name => DvText.new(:value => 'cluster'),
+                           :items => [item, item])
+  end
+
+  it 'should be an isntance of Cluster' do
+    @cluster.should be_an_instance_of Cluster
+  end
+
+  it 'item size should be 2' do
+    @cluster.items.size.should == 2
+  end
+
+  it 'should raise ArgumentError with empty items' do
+    lambda {
+      @cluster.items = []
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/item_structure/representation/element_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/item_structure/representation/element_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_structures/item_structure/representation/element_spec.rb	(revision 367)
@@ -0,0 +1,22 @@
+require File.dirname(__FILE__) + '/../../../../../../spec_helper'
+include OpenEHR::RM::DataStructures::ItemStructure::Representation
+include OpenEHR::RM::DataTypes::Text
+
+describe Element do
+  before(:each) do
+    value = DvText.new(:value => 'test')
+    @element = Element.new(:archetype_node_id => 'at0001',
+                           :name => DvText.new(:value => 'element'),
+                           :value => value)
+  end
+
+  it 'should be an instance of Element' do
+    @element.should be_an_instance_of Element
+  end
+
+  it 'value should be assigned as test' do
+    @element.value.value.should == 'test'
+  end
+
+  it 'nullflavor should be assigned'
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/basic/data_value_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/basic/data_value_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/basic/data_value_spec.rb	(revision 367)
@@ -0,0 +1,17 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+
+include OpenEHR::RM::DataTypes::Basic
+
+describe DataValue do
+  before(:each) do
+    @data_value = DataValue.new(:value => 'ANY')
+  end
+
+  it 'should be an instance of DataValue' do
+    @data_value.should be_an_instance_of DataValue
+  end
+
+  it 's value should be stub' do
+    @data_value.value.should == 'ANY'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/basic/dv_boolean_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/basic/dv_boolean_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/basic/dv_boolean_spec.rb	(revision 367)
@@ -0,0 +1,29 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Basic
+
+
+describe DvBoolean do
+  before(:each) do
+    @dv_boolean = DvBoolean.new(:value => "TRUE")
+  end
+
+  it 'should be an instance of DvBoolean' do
+    @dv_boolean.should be_an_instance_of DvBoolean
+  end
+
+  it 'should be true' do
+    @dv_boolean.value.should be_true
+    @dv_boolean.value?.should be_true
+  end
+
+  it 's value assigned false, then it should not be false' do
+    @dv_boolean.value = false
+    @dv_boolean.value.should_not be_true
+  end
+
+  it 'raise ArgumentError' do
+    lambda {
+      @dv_boolean.value = nil
+    }.should raise_error(ArgumentError)
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/basic/dv_identifier_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/basic/dv_identifier_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/basic/dv_identifier_spec.rb	(revision 367)
@@ -0,0 +1,108 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Basic
+include OpenEHR::RM::DataTypes::Text
+
+describe DvIdentifier do
+  before(:each) do
+    @dv_identifier = DvIdentifier.new(:issuer => 'Ruby Hospital',
+                                      :assigner => 'Information office',
+                                      :id => '0123456-0',
+                                      :type =>'personal id')
+  end
+
+  it 'should be an instance of DvIdentifier' do
+    @dv_identifier.should be_an_instance_of DvIdentifier
+  end
+
+  it 's issuer should be Ruby hospital' do
+    @dv_identifier.issuer.should == 'Ruby Hospital'
+  end
+
+  it 's assigner should be Information office' do
+    @dv_identifier.assigner.should == 'Information office'
+  end
+
+  it 's id should be 0123456-0' do
+    @dv_identifier.id.should == '0123456-0'
+  end
+
+  it 's type should be personal id' do
+    @dv_identifier.type.should == 'personal id'
+  end
+
+  it 's issuer should be change to other hospital' do
+    lambda {
+      @dv_identifier.issuer = 'Other Hospital'
+    }.should change(@dv_identifier, :issuer).
+      from('Ruby Hospital').to('Other Hospital')
+  end
+
+  it 'raise ArgumentError for nil issuer' do
+    lambda {
+      @dv_identifier.issuer = nil
+    }.should raise_error(ArgumentError)
+  end
+
+  it 'raise ArgumentError for empty issuer' do
+    lambda {
+      @dv_identifier.issuer = ''
+    }.should raise_error(ArgumentError)
+  end
+
+  it 's assigner should change from Information office to Service office' do
+    lambda {
+      @dv_identifier.assigner = 'Service office'
+    }.should change{@dv_identifier.assigner}.
+      from('Information office').to('Service office')
+  end
+
+  it 'raise ArgumentError for nil assigner' do
+    lambda {
+      @dv_identifier.assigner = nil
+    }.should raise_error(ArgumentError)
+  end
+
+  it 'raise ArgumentError for empty assigner' do
+    lambda {
+      @dv_identifier.assigner = ''
+    }.should raise_error(ArgumentError)
+  end
+
+  it 's id should change from 0123456-0 to TEST-0987' do
+    lambda {
+      @dv_identifier.id = 'TEST-0987'
+    }.should change(@dv_identifier, :id).
+      from('0123456-0').to('TEST-0987')
+  end
+
+  it 'raise ArgumentError for nil id' do
+    lambda {
+      @dv_identifier.id = nil
+    }.should raise_error(ArgumentError)
+  end
+
+  it 'raise ArgumentError for empty id' do
+    lambda {
+      @dv_identifier.id = ''
+    }.should raise_error(ArgumentError)
+  end
+
+  it 's type should change form personal id to test id' do
+    lambda {
+      @dv_identifier.type = "test id"
+    }.should change(@dv_identifier, :type).
+      from('personal id').to('test id')
+  end
+
+  it 'raise ArgumentError for nil type' do
+    lambda {
+      @dv_identifier.type = nil
+    }.should raise_error(ArgumentError)
+  end
+
+  it 'raise ArgumentError for empty issuer' do
+    lambda {
+      @dv_identifier.type = ''
+    }.should raise_error(ArgumentError)
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/basic/dv_state_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/basic/dv_state_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/basic/dv_state_spec.rb	(revision 367)
@@ -0,0 +1,44 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Basic
+include OpenEHR::RM::Support::Identification
+include OpenEHR::RM::DataTypes::Text
+
+describe DvState do
+  before(:each) do
+    @terminology_id = TerminologyID.new(:value => 'openher')
+    code_phrase = CodePhrase.new(:code_string => '524',
+                                 :terminology_id => @terminology_id)
+    dv_coded_text = DvCodedText.new(:value => "initial",
+                                    :defining_code => code_phrase)
+    @dv_state = DvState.new(:value => dv_coded_text,
+                            :is_terminal => false)
+  end
+
+  it 'should be an instance of DvState' do
+    @dv_state.should be_an_instance_of DvState
+  end
+
+  it 's value should be initial' do
+    @dv_state.value.value.should == 'initial'
+  end
+
+  it 'should change other value assigned' do
+    code_phrase = CodePhrase.new(:code_string => '526',
+                                 :terminology_id => @terminology_id)
+    dv_coded_text = DvCodedText.new(:value =>'planned',
+                                    :defining_code => code_phrase)
+    lambda {
+      @dv_state.value = dv_coded_text
+    }.should change{@dv_state.value.value}.from('initial').to('planned')
+  end
+
+  it 'is not terminal' do
+    @dv_state.is_terminal?.should be_false
+  end
+
+  it 'should change to terminal' do
+    lambda {
+      @dv_state.is_terminal = true
+    }.should change(@dv_state, :is_terminal?).from(false).to(true)
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/encapsulated/dv_encapsulated_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/encapsulated/dv_encapsulated_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/encapsulated/dv_encapsulated_spec.rb	(revision 367)
@@ -0,0 +1,42 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Encapsulated
+include OpenEHR::RM::DataTypes::Text
+
+describe DvEncapsulated do
+  before(:each) do
+    dummy = 'test'
+    charset = stub(CodePhrase, :code_string => 'UTF-8')
+    language = stub(CodePhrase, :code_string => 'ja')
+    @dv_encapsulated = DvEncapsulated.new(:value => dummy,
+                                          :charset => charset,
+                                          :language => language)
+  end
+
+  it 's value should be test' do
+    @dv_encapsulated.value.should == 'test'
+  end
+
+  it 's size should be 4' do
+    @dv_encapsulated.size.should be_equal 4
+  end
+
+  it 's charset should be utf-8' do
+    @dv_encapsulated.charset.code_string.should == 'UTF-8'
+  end
+
+  it 's langage should be ja' do
+    @dv_encapsulated.language.code_string.should == 'ja'
+  end
+
+  it 'should raise ArgumentError when language is invalid' do
+    wrong_lang = stub(CodePhrase, :code_string => 'jj')
+    lambda {@dv_encapsulated.language = wrong_lang}.
+      should raise_error(ArgumentError)
+  end
+
+  it 'should raise ArgumentError when charset is invalid' do
+    wrong_charset = stub(CodePhrase, :code_string => 'UBK')
+    lambda {@dv_encapsulated.charset = wrong_charset}.
+      should raise_error(ArgumentError)
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/encapsulated/dv_multimedia_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/encapsulated/dv_multimedia_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/encapsulated/dv_multimedia_spec.rb	(revision 367)
@@ -0,0 +1,79 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Encapsulated
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::DataTypes::Uri
+include OpenEHR::RM::Support::Identification
+
+describe DvMultimedia do
+  before(:each) do
+    media_type = stub(CodePhrase, :code_string => 'text/xml')
+    charset = stub(CodePhrase, :code_string => 'UTF-8')
+    uri = stub(DvUri, :value => 'http://openehr.jp/')
+    data = Array['123412', '123112']
+    compression_algorithm = stub(CodePhrase, :code_string => 'gzip')
+    integrity_check = Array['123456789ABCDEF','DEADBEEF']
+    integrity_check_algorithm = stub(CodePhrase, :code_string => 'SHA-1')
+    alternate_text = 'test'
+    @dv_multimedia = DvMultimedia.new(:value => '<xml>test</xml>',
+                                      :media_type => media_type,
+                                      :charset => charset,
+                                      :uri => uri,
+                                      :data => data,
+                                      :compression_algorithm => compression_algorithm,
+                                      :integrity_check => integrity_check,
+                                      :integrity_check_algorithm => integrity_check_algorithm,
+                                      :alternate_text => alternate_text)
+  end
+
+  it 'should be an instance of DvMultimedia' do
+    @dv_multimedia.should be_an_instance_of DvMultimedia
+  end
+
+  it 's value should be <xml>test</xml>' do
+    @dv_multimedia.value.should == '<xml>test</xml>'
+  end
+
+  it 's media_type should be text/xml' do
+    @dv_multimedia.media_type.code_string.should == 'text/xml'
+  end
+
+  it 's size should be equal 15' do
+    @dv_multimedia.size.should be_equal 15
+  end
+
+  it 's charset should be UTF-8' do
+    @dv_multimedia.charset.code_string.should == 'UTF-8'
+  end
+
+  it 's uri value should be http://openehr.jp/ ' do
+    @dv_multimedia.uri.value.should == 'http://openehr.jp/'
+  end
+
+  it 's data[0] should be 123412' do
+    @dv_multimedia.data[0].should == '123412'
+  end
+
+  it 's compression_algorithm should be gzip' do
+    @dv_multimedia.compression_algorithm.code_string.should == 'gzip'
+  end
+
+  it 's integrity_check[1] should be DEADBEEF' do
+    @dv_multimedia.integrity_check[1].should == 'DEADBEEF'
+  end
+
+  it 's integrity_check_algorithm should be SHA-1' do
+    @dv_multimedia.integrity_check_algorithm.code_string.should == 'SHA-1'
+  end
+
+  it 's alternate text should be test' do
+    @dv_multimedia.alternate_text.should == 'test'
+  end
+
+  it 'has_integrity_check should be true'
+
+  it 'is compressed should be true'
+
+  it 'is_external should be true'
+
+  it 'is_internal should be false'
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/encapsulated/dv_parsable_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/encapsulated/dv_parsable_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/encapsulated/dv_parsable_spec.rb	(revision 367)
@@ -0,0 +1,34 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Encapsulated
+include OpenEHR::RM::DataTypes::Text
+
+describe DvParsable do
+  before(:each) do
+    @dv_parsable = DvParsable.new(:value => 'test',
+                                  :formalism => 'plain/text')
+  end
+
+  it 'should be an instance of DvParsable' do
+    @dv_parsable.should be_an_instance_of DvParsable
+  end
+
+  it 'value should be test' do
+    @dv_parsable.value.should == 'test'
+  end
+
+  it 's size should be 4' do
+    @dv_parsable.size.should be_equal 4
+  end
+
+  it 's formalism should be plain/text' do
+    @dv_parsable.formalism.should == 'plain/text'
+  end
+
+  it 'should raise ArgumentError formalism nil' do
+    lambda {@dv_parsable.formalism = nil}.should raise_error(ArgumentError)
+  end
+
+  it 'should raise ArgumentError formalism empty' do
+    lambda {@dv_parsable.formalism = ''}.should raise_error(ArgumentError)
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_date_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_date_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_date_spec.rb	(revision 367)
@@ -0,0 +1,64 @@
+require File.dirname(__FILE__) + '/../../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Quantity::DateTime
+
+describe DvDate do
+  before(:each) do
+    @dv_date = DvDate.new(:value => '2009-09-28')
+  end
+
+  it 'should be an instance of DvDate' do
+    @dv_date.should be_an_instance_of DvDate
+  end
+
+  it 'value should be' do
+    @dv_date.value.should == '2009-09-28'
+  end
+
+  it 'year should be 2009' do
+    @dv_date.year.should be_equal 2009
+  end
+
+  it 'month should be 9' do
+    @dv_date.month.should be_equal 9
+  end
+
+  it 'day should be 28' do
+    @dv_date.day.should be_equal 28
+  end
+
+  it 'magnitude should 734045' do
+    @dv_date.magnitude.should == 734045
+  end
+
+  it 'diff should P0Y0M1W11D' do
+    diff_date = DvDate.new(:value => '2009-10-09')
+    @dv_date.diff(diff_date).value.should == 'P0Y0M1W11D'
+  end
+
+  it 'should process leap year' do
+    @dv_date.value = '2004-02-28'
+    diff_date = DvDate.new(:value => '2004-03-01')
+    @dv_date.diff(diff_date).value.should == 'P0Y0M0W2D'
+  end
+
+  it 'should process year'do
+    diff_date = DvDate.new(:value => '2007-12-31')
+    @dv_date.diff(diff_date).value.should == 'P1Y8M4W28D'
+  end
+
+  it 'should be P0Y11M4W31D' do
+    diff_date = DvDate.new(:value => '2008-09-30')
+    @dv_date.diff(diff_date).value.should == 'P0Y11M4W29D'
+  end
+
+  it 'should be P1Y0M0W1D' do
+    diff_date = DvDate.new(:value => '2010-09-29')
+    @dv_date.diff(diff_date).value.should == 'P1Y0M0W1D'
+  end
+
+  it 'should be P0Y0M0W1D' do
+    past_date = DvDate.new(:value => '2009-12-31')
+    future_date=DvDate.new(:value => '2010-01-01')
+    past_date.diff(future_date).value.should == 'P0Y0M0W1D'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_date_time_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_date_time_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_date_time_spec.rb	(revision 367)
@@ -0,0 +1,25 @@
+require File.dirname(__FILE__) + '/../../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Quantity::DateTime
+
+describe DvDateTime do
+  before(:each) do
+    @dv_date_time = DvDateTime.new(:value => '2009-09-29T15:03:22.3')
+  end
+
+  it 'should be an instance of DvDateTime' do
+    @dv_date_time.should be_an_instance_of DvDateTime
+  end
+
+  it 'magnitude should be 63425495002.3' do
+    @dv_date_time.magnitude.should be_close 63423697018.3, 0.001
+  end
+
+  it 'should be equal when magnitude is same' do
+    @dv_date_time.should == DvDateTime.new(:value => '2009-09-29T15:03:22.3')
+  end
+
+  it 'diff should be caluculated from past to future' do
+    future = DvDateTime.new(:value => '2009-10-29T16:23:30.3')
+    @dv_date_time.diff(future).value.should == 'P0Y1M0W0DT1H20M8.0S'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_tempral_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_tempral_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_tempral_spec.rb	(revision 367)
@@ -0,0 +1,24 @@
+require File.dirname(__FILE__) + '/../../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Quantity::DateTime
+
+describe DvTemporal do
+  before(:each) do
+    @dv_temporal = DvTemporal.new(:value => '2009-09-28T23:36')
+  end
+
+  it 'should be an instance of DvTemporal' do
+    @dv_temporal.should be_an_instance_of DvTemporal
+  end
+
+  it 'should raise ArgumentError with nil value' do
+    lambda {
+      @dv_temporal.value = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with empty value' do
+    lambda {
+      @dv_temporal.value = ''
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_time_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_time_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_time_spec.rb	(revision 367)
@@ -0,0 +1,37 @@
+require File.dirname(__FILE__) + '/../../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Quantity::DateTime
+
+describe DvTime do
+  before(:each) do
+    @dv_time = DvTime.new(:value => '11:17:30.2')
+  end
+
+  it 'should be an instance of DvTime' do
+    @dv_time.should be_an_instance_of DvTime
+  end
+
+  it 'hour should be 11' do
+    @dv_time.hour.should == 11
+  end
+
+  it 'minute should be 17' do
+    @dv_time.minute.should == 17
+  end
+
+  it 'second should be 30' do
+    @dv_time.second.should == 30
+  end
+
+  it 'fractional_second should be 0.2' do
+    @dv_time.fractional_second.should == 0.2
+  end
+
+  it 'magnitude should 40650.2' do
+    @dv_time.magnitude.should == 40650.2
+  end
+
+  it 'should be ' do
+    diff_time = DvTime.new(:value => '15:36:48.05')
+    @dv_time.diff(diff_time).value.should =='P0Y0M0W0DT4H19M17.85S'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_absolute_quantity_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_absolute_quantity_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_absolute_quantity_spec.rb	(revision 367)
@@ -0,0 +1,35 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Quantity
+
+describe DvAbsoluteQuantity do
+  before(:each) do
+    @dv_absolute_quantity = DvAbsoluteQuantity.new(:magnitude => 7)
+  end
+
+  it 'should be an instance of DvAbsoluteQuantity' do
+    @dv_absolute_quantity.should be_an_instance_of DvAbsoluteQuantity
+  end
+
+  it 's add 3 method should magnitude 10' do
+    dv_absolute_quantity10 =
+      @dv_absolute_quantity.add(DvAbsoluteQuantity.new(:magnitude => 3))
+    dv_absolute_quantity10.magnitude.should == 10
+  end
+
+  it 's diff method should return DvAmount' do    
+    diff_dv_amount = @dv_absolute_quantity.diff(DvAbsoluteQuantity.new(
+                                                    :magnitude => 10))
+    diff_dv_amount.magnitude.should == 3
+  end
+
+  it 's subtract method should raise NotImplementedError' do
+    sub_dv_absolute_quantity = @dv_absolute_quantity.subtract(DvAbsoluteQuantity.new(:magnitude => 10))
+    sub_dv_absolute_quantity.magnitude.should == -3
+  end
+
+  it 'should be raise ArgumentError when type mismatched' do
+    lambda {
+      @dv_absolute_quantity.add(1)
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_amount_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_amount_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_amount_spec.rb	(revision 367)
@@ -0,0 +1,105 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Quantity
+
+describe DvAmount do
+  before(:each) do
+    @dv_amount = DvAmount.new(:magnitude => 2,
+                              :accuracy => 100,
+                              :accuracy_percent => true)
+  end
+
+  it 'should be an instance of DvAmount' do
+    @dv_amount.should be_an_instance_of DvAmount
+  end
+
+  it 's magnitude should be equal 2' do
+    @dv_amount.magnitude.should be_equal 2
+  end
+
+  it 's accuracy should be 100 percent' do
+    @dv_amount.accuracy.should be_equal 100
+  end
+
+  it 's accuracy_is_percent should be true' do
+    @dv_amount.accuracy_is_percent?.should be_true
+  end
+
+  it 'should has an instance with nil accuracy' do
+    dv_amount = DvAmount.new(:magnitude => 1)
+    dv_amount.should be_an_instance_of DvAmount
+  end
+
+  it 'should be 3 if +2 magnitude DvAmount' do
+    dv_amount4 = @dv_amount + DvAmount.new(:magnitude => 2)
+    dv_amount4.magnitude.should == 4
+  end
+
+  it 'should be -1 if - 3 magnitude DvAmount' do
+    dv_amount_1 = @dv_amount - DvAmount.new(:magnitude => 3)
+    dv_amount_1.magnitude.should == -1
+  end
+
+  it 'should be type mismatch' do
+    lambda {
+      @dv_amount + 1
+    }.should raise_error ArgumentError
+  end
+
+  it 'should not raise ArgumentError' do
+    lambda {
+      @dv_amount.set_accuracy(0, true)
+    }.should_not raise_error ArgumentError
+  end
+  it 'should not raise ArgumentError' do
+    lambda {
+      @dv_amount.set_accuracy(50, true)
+    }.should_not raise_error ArgumentError
+  end
+
+  it 'should not raise ArgumentError' do
+    lambda {
+      @dv_amount.set_accuracy(100, true)
+    }.should_not raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with invaild accuracy' do
+    lambda {
+      @dv_amount.set_accuracy(-0.01, true)
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with invaild accuracy' do
+    lambda {
+      @dv_amount.set_accuracy(100.1, true)
+    }.should raise_error ArgumentError
+  end
+
+  it 'should not raise ArgumentError' do
+    lambda {
+      @dv_amount.set_accuracy(0, false)
+    }.should_not raise_error ArgumentError
+  end
+  it 'should not raise ArgumentError' do
+    lambda {
+      @dv_amount.set_accuracy(0.5, false)
+    }.should_not raise_error ArgumentError
+  end
+
+  it 'should not raise ArgumentError' do
+    lambda {
+      @dv_amount.set_accuracy(1.0, false)
+    }.should_not raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with invaild accuracy' do
+    lambda {
+      @dv_amount.set_accuracy(-0.01, false)
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with invaild accuracy' do
+    lambda {
+      @dv_amount.set_accuracy(1.01, false)
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_count_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_count_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_count_spec.rb	(revision 367)
@@ -0,0 +1,12 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Quantity
+
+describe DvCount do
+  before(:each) do
+    @dv_count = DvCount.new(:magnitude => 1)
+  end
+
+  it 'should be an instance of DvCount' do
+    @dv_count.should be_an_instance_of DvCount
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_interval_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_interval_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_interval_spec.rb	(revision 367)
@@ -0,0 +1,17 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Quantity
+
+describe DvInterval do
+  before(:each) do
+    @dv_interval = DvInterval.new(:upper => 100,
+                                  :lower => 1)
+  end
+
+  it 'should be an instance of DvInterval' do
+    @dv_interval.should be_an_instance_of DvInterval
+  end
+
+  it 's upper should be larger than lower' do
+    @dv_interval.upper.should > @dv_interval.lower
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_ordered_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_ordered_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_ordered_spec.rb	(revision 367)
@@ -0,0 +1,60 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Quantity
+include OpenEHR::RM::DataTypes::Text
+
+describe DvOrdered do
+  before(:each) do
+    @dv_ordered = DvOrdered.new
+  end
+
+  it 'should be an instance of DvOrdered' do
+    @dv_ordered.should be_an_instance_of DvOrdered
+  end
+
+  it 'is_normal? should be false' do
+    @dv_ordered.is_normal?.should be_false
+  end
+
+  it 'should be normal' do
+    normal_code = stub(CodePhrase, :code_string => 'N')
+    @dv_ordered.normal_status = normal_code
+    @dv_ordered.is_normal?.should be_true
+  end
+
+  it 'should not be normal' do
+    abnormal_code = stub(CodePhrase, :code_string => 'H')
+    @dv_ordered.normal_status = abnormal_code
+    @dv_ordered.is_normal?.should_not be_true
+  end
+
+  it 'is_simple? should be true' do
+    @dv_ordered.is_simple?.should be_true
+  end
+
+  it 'is_simple? should be false' do
+    @dv_ordered.other_reference_ranges = 'dummy'
+    @dv_ordered.is_simple?.should be_false
+  end
+
+  it 'should raise ArgumentError' do
+    lambda{
+      @dv_ordered.other_reference_ranges = ''
+    }.should raise_error ArgumentError
+  end
+
+  it 'should be normal in range' do
+    normal_range = stub(DvInterval, :has => true)
+    @dv_ordered.normal_range = normal_range
+    @dv_ordered.is_normal?.should be_true
+  end
+
+  it 'is_strictly_comparable_to should be true for DvOrdered' do
+    @dv_ordered.is_strictly_comparable_to?(DvOrdered.new).should be_true
+  end
+
+  it 'should be raise NotImplemented error' do
+    lambda {
+      @dv_ordered<=>1
+    }.should raise_error(NotImplementedError)
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_ordinal_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_ordinal_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_ordinal_spec.rb	(revision 367)
@@ -0,0 +1,74 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Quantity
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::Support::Identification
+
+describe DvOrdinal do
+  before(:each) do
+    terminology_id = stub(TerminologyID, :value => 'urine:prot')
+    code_phrase = stub(CodePhrase, :terminology_id => terminology_id)
+    symbol = stub(DvCodedText, :code_string => '+',
+                  :defining_code => code_phrase)
+    dv_text = stub(DvText, :value => 'limits')
+    limits = stub(ReferenceRange, :meaning => dv_text)
+    @dv_ordinal = DvOrdinal.new(:value => 1,
+                                :symbol => symbol,
+                                :limits => limits)
+  end
+
+  it 'should be an instance of DvOrdinal' do
+    @dv_ordinal.should be_an_instance_of DvOrdinal
+  end
+
+  it 's value should be equal 1' do
+    @dv_ordinal.value.should be_equal 1
+  end
+
+  it 's symbol should be + code string' do
+    @dv_ordinal.symbol.code_string.should == '+'
+  end
+
+  it 's symbol defining_code should be urine:prot' do
+    @dv_ordinal.symbol.defining_code.terminology_id.value.should ==
+      'urine:prot'
+  end
+
+  it 'should be strictry comperable to other DvOrdinal' do
+    terminology_id = stub(TerminologyID, :value => 'urine:prot')
+    code_phrase = stub(CodePhrase, :terminology_id => terminology_id)
+    symbol = stub(DvCodedText, :defining_code => code_phrase)
+    dv_ordinal = DvOrdinal.new(:value => 2,
+                               :symbol => symbol)
+    @dv_ordinal.is_strictly_comparable_to?(dv_ordinal).should be_true
+  end
+
+  it 's limit.value should be limits' do
+    @dv_ordinal.limits.meaning.value.should == 'limits'
+  end
+
+  it 'should raise error when limits.value is not limitted' do
+    unlimit = stub(DvText, :value => 'unimitted')
+    unlimitted_range = stub(ReferenceRange, :meaning => unlimit)
+    lambda {
+      @dv_ordinal.limits = unlimitted_range
+    }.should raise_error ArgumentError
+  end
+
+  it 'should be comparable' do
+    dv_ordinal = stub(DvOrdinal, :value => 2)
+    @dv_ordinal.should < dv_ordinal
+  end
+
+  it 'is_strictly comparable should be false with other instance' do
+    @dv_ordinal.is_strictly_comparable_to?('dummy').should be_false
+  end
+
+  it 'is strictly comparable should be false with other terminology' do
+    terminology_id = stub(Terminology, :value => 'blood pressure')
+    code_phrase = stub(CodePhrase, :terminology_id => terminology_id)
+    symbol = stub(DvCodedText, :defining_code => code_phrase)
+    dv_ordinal = DvOrdinal.new(:value => 3,
+                               :symbol => symbol)
+    @dv_ordinal.is_strictly_comparable_to?(dv_ordinal).should be_false
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_proportion_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_proportion_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_proportion_spec.rb	(revision 367)
@@ -0,0 +1,162 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Quantity
+include OpenEHR::RM::DataTypes::Quantity::ProportionKind
+
+describe DvProportion do
+  before(:all) do
+    @dv_proportion0 = DvProportion.new(:numerator => 2,
+                                       :denominator => 3,
+                                       :type => PK_RATIO,
+                                       :accuracy => 1,
+                                       :accuracy_percent => true)
+    @dv_proportion1 = DvProportion.new(:numerator => 3,
+                                       :denominator => 1,
+                                       :type => PK_UNITARY)
+    @dv_proportion2 = DvProportion.new(:numerator => 5,
+                                       :denominator => 100,
+                                       :type => PK_PERCENT)
+    @dv_proportion3 = DvProportion.new(:numerator => 7,
+                                       :denominator => 8,
+                                       :type => PK_FRACTION)
+    @dv_proportion4 = DvProportion.new(:numerator => 9,
+                                       :denominator => 10,
+                                       :type => PK_INTEGER_FRACTION)
+  end
+
+  describe 'PK_RATIO type' do
+    it 'should be an instance of DvProportion' do
+      @dv_proportion0.should be_an_instance_of DvProportion
+    end
+
+    it 's numerator should be equal 2' do
+      @dv_proportion0.numerator.should be_equal 2
+    end
+
+    it 's denominator should be equal 3' do
+      @dv_proportion0.denominator.should be_equal 3
+    end
+
+    it 's type should be equal 0' do
+      @dv_proportion0.type.should == 0
+    end
+
+    it 's magnitude should be 2/3' do
+      @dv_proportion0.magnitude.should == 2.0/3.0
+    end
+
+    it 's accuracy should be 1' do
+      @dv_proportion0.accuracy.should == 1
+    end
+
+    it 'is_integral? should be true' do
+      @dv_proportion0.is_integral?.should be_true
+    end
+
+    it 'should be comperable to same type DvProportion' do
+      dv_propotion_type = DvProportion.new(:numerator => 3,
+                                           :denominator => 4,
+                                           :type => 0)
+      @dv_proportion0.is_strictly_comparable_to?(dv_propotion_type).
+        should be_true
+    end
+
+    it 'should not be comparable to other type DvPropotion' do
+      @dv_proportion0.is_strictly_comparable_to?(@dv_proportion1).
+        should_not be_true
+    end
+
+    it 'should not be comperable to other class' do
+      @dv_proportion0.is_strictly_comparable_to?(1).
+        should_not be_true
+    end
+
+    it 'should raise ArguentError with invalid type -1' do
+      lambda {
+        @dv_proportion0.type = -1
+      }.should raise_error ArgumentError
+    end
+
+    it 'should raise ArgumentError with invalid type 5' do
+      lambda {
+        @dv_proportion0.type = 5
+      }.should raise_error ArgumentError
+    end
+
+    it 's precision should be 0' do
+      @dv_proportion0.precision = 0
+      @dv_proportion0.precision.should == 0
+    end
+
+    it 'should raise ArgumentError when is_integral? and precision !=0' do
+      lambda {@dv_proportion0.precision = 1}.should raise_error ArgumentError
+    end
+
+    it 'shoud not raise ArgumentError when is_not ntegral' do
+      @dv_proportion0.numerator = 2.5
+      lambda {
+        @dv_proportion0.precision = 1
+      }.should_not raise_error ArgumentError
+    end
+  end
+
+  describe 'PK_UNITARY type' do
+    it 'should be an instance of DvPropotion' do
+      @dv_proportion1.should be_an_instance_of DvProportion
+    end
+
+    it 'should raise ArgumentError without denominator 1' do
+      lambda {
+        @dv_proportion1.denominator = 10
+      }.should raise_error ArgumentError
+    end
+  end
+
+  describe 'PK_PERCENT type' do
+    it 'should be an instance of DvProportion' do
+      @dv_proportion2.should be_an_instance_of DvProportion
+    end
+
+    it 'should raise ArgumentError without denominator 100' do
+      lambda {
+        @dv_proportion2.denominator = 101
+      }.should raise_error ArgumentError
+    end
+  end
+
+  describe 'PK_FRACTION type' do
+    it 'should be an instance of DvProportion' do
+      @dv_proportion3.should be_an_instance_of DvProportion
+    end
+
+    it 'should raise ArgumentError with fractional denominator' do
+      lambda {
+        @dv_proportion3.denominator = 0.5
+      }.should raise_error ArgumentError
+    end
+
+    it 'should raise ArgumentError with fractional numerator' do
+      lambda {
+        @dv_proportion3.numerator = 0.5
+      }.should raise_error ArgumentError
+    end
+  end
+
+  describe 'PK_FRACTION_INTEGER type' do
+    it 'should be an instance of DvProportion' do
+      @dv_proportion4.should be_an_instance_of DvProportion
+    end
+
+    it 'should raise ArgumentError with fractional denominator' do
+      lambda {
+        @dv_proportion4.denominator = 0.5
+      }.should raise_error ArgumentError
+
+    end
+
+    it 'should raise ArgumentError with fractional numerator' do
+      lambda {
+        @dv_proportion4.numerator = 0.5
+      }.should raise_error ArgumentError
+    end
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_quantified_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_quantified_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_quantified_spec.rb	(revision 367)
@@ -0,0 +1,36 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Quantity
+
+describe DvQuantified do
+  before(:all) do
+    @dv_quantified = DvQuantified.new(:magnitude => 1,
+                                      :magnitude_status => '=')
+  end
+
+  it 'should be an instance of DvQuantified' do
+    @dv_quantified.should be_an_instance_of DvQuantified
+  end
+
+  it 's magnitude should be 1' do
+    @dv_quantified.magnitude.should be_equal 1
+  end
+
+  it 's magnitude_status should be =' do
+    @dv_quantified.magnitude_status.should == '='
+  end
+
+  it 's comparable to other DvQuantified' do
+    dv_quantified = DvQuantified.new(:magnitude => 2)
+    @dv_quantified.should < dv_quantified
+  end
+
+  it 'should raise ArgumentError with invalid magnitude_status' do
+    lambda {
+      @dv_quantified.magnitude_status = '+'
+    }.should raise_error ArgumentError
+  end
+
+  it 's accuracy should be unknown' do
+    @dv_quantified.should be_accuracy_unknown
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_quantity_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_quantity_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/dv_quantity_spec.rb	(revision 367)
@@ -0,0 +1,78 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Quantity
+
+describe DvQuantity do
+  before(:each) do
+    @dv_quantity = DvQuantity.new(:magnitude => 3,
+                                  :units => 'mg',
+                                  :precision => 0)
+  end
+
+  it 'should be an instance of DvQuantity' do
+    @dv_quantity.should be_instance_of DvQuantity
+  end
+
+  it 's units should be mg' do
+    @dv_quantity.units.should == 'mg'
+  end
+
+  describe 'Mathematical Operation' do
+    before(:each) do
+      @dv_quantity5 = DvQuantity.new(:magnitude => 5,
+                                     :units => 'mg')
+    end
+    
+    it 'should be comparable to 5mg' do
+      @dv_quantity.is_strictly_comparable_to?(@dv_quantity5).should be_true
+    end
+
+    it 'should be 8mg added 5mg' do
+      dv_quantity = @dv_quantity + @dv_quantity5
+      dv_quantity.magnitude.should == 8
+    end
+
+    it 'should be -2mg minus 5mg' do
+      dv_quantity = @dv_quantity - @dv_quantity5
+      dv_quantity.magnitude.should == -2
+    end
+
+    it 's unit should be mg' do
+      (@dv_quantity + @dv_quantity5).units.should == 'mg'
+    end
+  end
+
+  it 'should not be comparable to 8km' do
+    dv_quantity = DvQuantity.new(:magnitude => 8,
+                                 :units => 'km')
+    @dv_quantity.is_strictly_comparable_to?(dv_quantity).should_not be_true
+  end
+
+  it 'should return false with other type' do
+    @dv_quantity.is_strictly_comparable_to?(1).should_not be_true
+  end
+
+  it 's precision should be equal 0' do
+    @dv_quantity.precision.should == 0
+  end
+
+  it 'should be integral' do
+    @dv_quantity.is_integral?.should be_true
+  end
+
+  it 'should not be integral do' do
+    @dv_quantity.precision = 3
+    @dv_quantity.is_integral?.should_not be_true
+  end
+
+  it 'should not raise ArgumentError with -1 precision' do
+    lambda {
+      @dv_quantity.precision = -1
+    }.should_not raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with -2 precision' do
+    lambda {
+      @dv_quantity.precision = -2
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/proportion_kind_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/proportion_kind_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/proportion_kind_spec.rb	(revision 367)
@@ -0,0 +1,24 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Quantity
+
+describe ProportionKind do
+  it 'should be valid proportion kind 0' do
+    ProportionKind.should be_valid_proportion_kind 0
+  end
+
+  it 'should be valid proportion kind 2' do
+    ProportionKind.should be_valid_proportion_kind 2
+  end
+
+  it 'should be valid proportionkind 4' do
+    ProportionKind.should be_valid_proportion_kind 4
+  end
+
+  it 'should not be valid proportionkind -1' do
+    ProportionKind.should_not be_valid_proportion_kind -1
+  end
+
+  it 'should not be valid proportionkind 5' do
+    ProportionKind.should_not be_valid_proportion_kind 5
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/reference_range_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/reference_range_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/quantity/reference_range_spec.rb	(revision 367)
@@ -0,0 +1,43 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Quantity
+
+describe ReferenceRange do
+  before(:each) do
+    dv_interval ||= stub(DvInterval)
+    @mock_dv_interval ||= mock('dv_interval')
+    @reference_range = ReferenceRange.new(:meaning => 'test',
+                                          :range => dv_interval)
+  end
+
+  it 'should be an instance of DvInterval' do
+    @reference_range.should be_an_instance_of ReferenceRange
+  end
+
+  it 's meaning should be test' do
+    @reference_range.meaning.should == 'test'
+  end
+
+  it 'should be in range' do
+    @mock_dv_interval.should_receive(:has?).with(1).and_return(true)
+    @reference_range.range = @mock_dv_interval
+    @reference_range.is_in_range?(1).should be_true
+  end
+
+  it 'should be out of range' do
+    @mock_dv_interval.should_receive(:has?).with(-1).and_return(false)
+    @reference_range.range = @mock_dv_interval
+    @reference_range.is_in_range?(-1).should be_false
+  end
+
+  it 'should raise ArgumentError with nil meaning' do
+    lambda {
+      @reference_range.meaning = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with nil range' do
+    lambda {
+      @reference_range.range = nil
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/text/code_phrase_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/text/code_phrase_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/text/code_phrase_spec.rb	(revision 367)
@@ -0,0 +1,23 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::Support::Identification
+
+describe CodePhrase do
+  before(:each) do
+    terminology_id = TerminologyID.new(:value => 'openehr')
+    @code_phrase = CodePhrase.new(:code_string => '535',
+                                  :terminology_id => terminology_id)
+  end
+
+  it 'should be an instance of CodePhrase' do
+    @code_phrase.should be_an_instance_of CodePhrase
+  end
+
+  it 's code_string should be 535' do
+    @code_phrase.code_string.should == '535'
+  end
+
+  it 's terminology_id.name should be openehr' do
+    @code_phrase.terminology_id.name.should == 'openehr'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/text/dv_paragraph_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/text/dv_paragraph_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/text/dv_paragraph_spec.rb	(revision 367)
@@ -0,0 +1,13 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Text
+
+describe DvParagraph do
+  before(:each) do
+    items_dummy = Array[1,2]
+    @dv_paragraph = DvParagraph.new(:items => items_dummy)
+  end
+
+  it 's items should be_size 2' do
+    @dv_paragraph.items.size.should be_equal 2
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/text/dv_text_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/text/dv_text_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/text/dv_text_spec.rb	(revision 367)
@@ -0,0 +1,57 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::Support::Identification
+
+describe DvText do
+  before(:each) do
+    terminology_id = TerminologyID.new(:value => 'openehr')
+    language = CodePhrase.new(:terminology_id => terminology_id,
+                              :code_string => 'ja')
+    encoding = CodePhrase.new(:terminology_id => terminology_id,
+                              :code_string => 'utf-8')
+    @dv_text = DvText.new(:value => 'test',
+                          :formatting => 'font = 12pt',
+                          :language => language,
+                          :encoding => encoding)
+  end
+
+  it 'should be an instance of DvText' do
+    @dv_text.should be_an_instance_of DvText
+  end
+
+  it 's value should be test' do
+    @dv_text.value.should == 'test'
+  end
+
+  it 'should raise ArgumentError, when value include \n' do
+    lambda {
+      @dv_text.value = "not valid value\n"
+    }.should raise_error(ArgumentError)
+  end
+
+  it 'should raise ArgumentError, when value is nil' do
+    lambda {
+      @dv_text.value = nil
+    }.should raise_error(ArgumentError)
+  end
+
+  it 'formatting should be font' do
+    @dv_text.formatting.should == 'font = 12pt'
+  end
+
+  it 'should raise ArgumentError, when formatting is empty' do
+    lambda{@dv_text.formatting = ""}.should raise_error(ArgumentError)
+  end
+
+  it 'should be mapping list'
+
+  it 'should be hyperlink'
+
+  it 's language code_string should be ja' do
+    @dv_text.language.code_string.should == 'ja'
+  end
+
+  it 's encoding should be utf-8' do
+    @dv_text.encoding.code_string.should == 'utf-8'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/text/term_mapping_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/text/term_mapping_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/text/term_mapping_spec.rb	(revision 367)
@@ -0,0 +1,59 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Text
+
+describe TermMapping do
+  before(:each) do
+    target_stub = stub(DvCodedText, :value => 'TEST')
+    purpose_stub = stub(DvCodedText, :value => 'automated')
+    @term_mapping = TermMapping.new(:target => target_stub,
+                                    :match => '=',
+                                    :purpose => purpose_stub)
+  end
+
+  it 'should means equivalent' do
+    @term_mapping.should be_equivalent
+  end
+
+  it 'should means narrower' do
+    @term_mapping.match = '<'
+    @term_mapping.should be_narrower
+  end
+
+  it 'should means broader' do
+    @term_mapping.match = '>'
+    @term_mapping.should be_broader
+  end
+
+  it 'should means unknown' do
+    @term_mapping.match = '?'
+    @term_mapping.should be_unknown
+  end
+
+  it 'should be valid match code >' do
+    TermMapping.is_valid_mach_code?('>').should be_true
+  end
+
+  it 'should be valid match code =' do
+    TermMapping.is_valid_mach_code?('=').should be_true
+  end
+
+  it 'should be valid match code <' do
+    TermMapping.is_valid_mach_code?('<').should be_true
+  end
+
+  it 'should be valid match code ?' do
+    TermMapping.is_valid_mach_code?('?').should be_true
+  end
+
+  it 'should be not valid code /' do
+    TermMapping.is_valid_mach_code?('/').should_not be_true
+  end
+
+  it 's purpose should == automated' do
+    @term_mapping.purpose.value.should == 'automated'
+  end
+
+  it 'should raise ArgumentError when match is not valid' do
+    lambda {@term_mapping.match = '/'}.should raise_error(ArgumentError)
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/uri/dv_ehr_uri_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/uri/dv_ehr_uri_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/uri/dv_ehr_uri_spec.rb	(revision 367)
@@ -0,0 +1,21 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Uri
+
+describe DvEhrUri do
+  before(:each) do
+    @dv_ehr_uri = DvEhrUri.new(:value => 'ehr://test/87284370-2D4B-4e3d-A3F3-F303D2F4F34B@2005-08-02T04:30:00')
+  end
+
+  it 'should be an instance of EhrUri' do
+    @dv_ehr_uri.should be_an_instance_of DvEhrUri
+  end
+
+  it 's value should be valid' do
+    @dv_ehr_uri.value.should == 
+      'ehr://test/87284370-2D4B-4e3d-A3F3-F303D2F4F34B@2005-08-02T04:30:00'
+  end
+
+  it 's scheme should be ehr' do
+    @dv_ehr_uri.scheme.should == 'ehr'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/uri/dv_uri_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/uri/dv_uri_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/data_types/uri/dv_uri_spec.rb	(revision 367)
@@ -0,0 +1,36 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::DataTypes::Uri
+
+describe DvUri do
+  before(:each) do
+    @dv_uri = DvUri.new(:value => 
+                        "http://www.openehr.jp/changeset/test?cmd=93#file0")
+  end
+
+  it 's fragment_id should be file0' do
+    @dv_uri.fragment_id.should == 'file0'
+  end
+
+  it 's path should be /changeset/test' do
+    @dv_uri.path.should == '/changeset/test'
+  end
+
+  it 's query should be cmd=93' do
+    @dv_uri.query.should == 'cmd=93'
+  end
+
+  it 's scheme should be http' do
+    @dv_uri.scheme.should == 'http'
+  end
+
+  it 's value should be http://www.openehr.jp/changeset/test?cmd=93#file0' do
+    @dv_uri.value.should == 'http://www.openehr.jp/changeset/test?cmd=93#file0'
+  end
+
+  it 's value change' do
+    lambda {
+      @dv_uri.value="svn://www.openehr.jp/openehr-jp/"
+    }.should change(@dv_uri, :value).to('svn://www.openehr.jp/openehr-jp/')
+  end
+end
+
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/demographic/actor_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/demographic/actor_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/demographic/actor_spec.rb	(revision 367)
@@ -0,0 +1,79 @@
+require File.dirname(__FILE__) + '/../../../../spec_helper'
+include OpenEHR::RM::Demographic
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::Support::Identification
+
+describe Actor do
+  before(:each) do
+    name = DvText.new(:value => 'actor')
+    uid = HierObjectID.new(:value => '01')
+    identities = stub(Set, :empty? => false)
+    roles = stub(Set, :size => 2, :empty? => false)
+    languages = stub(Array, :size => 3, :empty? => false)
+    @actor = Actor.new(:archetype_node_id => 'at0000',
+                       :name => name,
+                       :uid => uid,
+                       :identities => identities,
+                       :roles => roles,
+                       :languages => languages)
+  end
+
+  it 'should be an instance of Actor' do
+    @actor.should be_an_instance_of Actor
+  end
+
+  it 'roles should be assigned properly' do
+    @actor.roles.size.should be_equal 2
+  end
+
+  it 'should raise ArgumentError with empty roles' do
+    lambda {
+      @actor.roles = Set.new
+    }.should raise_error ArgumentError
+  end
+
+  it 'should not raise ArgumentError with nil roles' do
+    lambda {
+      @actor.roles = nil
+    }.should_not raise_error ArgumentError
+  end
+
+  it 'languages should be assigned properly' do
+    @actor.languages.size.should be_equal 3
+  end
+
+  it 'should raise ArgumentError with empty languages' do
+    lambda {
+      @actor.languages = Set.new
+    }.should raise_error ArgumentError
+  end
+
+  it 'should not raise ArgumentError with nil languages' do
+    lambda {
+      @actor.languages = nil
+    }.should_not raise_error ArgumentError
+  end
+
+  describe 'has_legal_identity' do
+    before(:each) do
+      @dummy_purpose = DvText.new(:value => 'dummy')
+      @dummy_identity = stub(PartyIdentity, :purpose => @dummy_purpose)
+    end
+
+    it 'should not have legal identity' do
+      identity = stub(PartyIdentity, :purpose => @dummy_purpose)
+      identities = [identity, @dummy_identity].to_set
+      @actor.identities = identities
+      @actor.has_legal_identity?.should be_false
+    end
+
+    it 'should have legal identity' do
+      legal_purpose = DvText.new(:value => 'legal identity')
+      legal_identity = stub(PartyIdentity, :purpose => legal_purpose)
+      identities = [@dummy_identity, legal_identity].to_set
+      @actor.identities = identities
+      @actor.has_legal_identity?.should be_true
+    end
+  end
+end
+
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/demographic/address_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/demographic/address_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/demographic/address_spec.rb	(revision 367)
@@ -0,0 +1,33 @@
+require File.dirname(__FILE__) + '/../../../../spec_helper'
+include OpenEHR::RM::Demographic
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::DataStructures::ItemStructure
+
+describe Address do
+  before(:each) do
+    name = DvText.new(:value => 'address')
+    details = stub(ItemStructure, :archetype_node_id => 'at0001')
+    @address = Address.new(:archetype_node_id => 'at0000',
+                           :name => name,
+                           :details => details)
+  end
+
+  it 'should be an instance of Address' do
+    @address.should be_an_instance_of Address
+  end
+
+  it 'type is inherit from name' do
+    @address.type.value.should == 'address'
+  end
+
+  it 'details should be assigned properly' do
+    @address.details.archetype_node_id.should == 'at0001'
+  end
+
+  it 'should raise ArgumentError with nil details' do
+    lambda {
+      @address.details = nil
+    }.should raise_error ArgumentError
+  end
+end
+
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/demographic/capability_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/demographic/capability_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/demographic/capability_spec.rb	(revision 367)
@@ -0,0 +1,37 @@
+require File.dirname(__FILE__) + '/../../../../spec_helper'
+include OpenEHR::RM::Demographic
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::DataTypes::Quantity::DateTime
+include OpenEHR::RM::Support::Identification
+include OpenEHR::RM::DataStructures::ItemStructure
+
+describe Capability do
+  before(:each) do
+    name = DvText.new(:value => 'party relation')
+    credentials = stub(ItemStructure, :archetype_node_id => 'at0001')
+    lower = DvDate.new(:value => '2009-11-21')
+    time_validity = stub(DvInterval, :lower => lower)
+    @capability = Capability.new(:archetype_node_id => 'at0000',
+                                 :name => name,
+                                 :credentials => credentials,
+                                 :time_validity => time_validity)
+  end
+
+  it 'should be an instance of Capability' do
+    @capability.should be_an_instance_of Capability
+  end
+
+  it 'credential should be assigned properly' do
+    @capability.credentials.archetype_node_id.should == 'at0001'
+  end
+
+  it 'should raise ArgumentError when nil assigned to credentials' do
+    lambda {
+      @capability.credentials = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'time_validity should be assigned properly' do
+    @capability.time_validity.lower.value.should == '2009-11-21'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/demographic/contact_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/demographic/contact_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/demographic/contact_spec.rb	(revision 367)
@@ -0,0 +1,45 @@
+require File.dirname(__FILE__) + '/../../../../spec_helper'
+include OpenEHR::RM::Demographic
+include OpenEHR::RM::DataTypes::Quantity::DateTime
+include OpenEHR::RM::DataTypes::Text
+
+describe Contact do
+  before(:each) do
+    name = DvText.new(:value => 'contact')
+    addresses = stub(Array, :size => 2, :empty? => false)
+    upper = DvDate.new(:value => '2009-11-20')
+    time_validity = stub(DvInterval, :upper => upper)
+    @contact = Contact.new(:archetype_node_id => 'at0000',
+                           :name => name,
+                           :addresses => addresses,
+                           :time_validity => time_validity)
+  end
+
+  it 'should be an instance of Contact' do
+    @contact.should be_an_instance_of Contact
+  end
+
+  it 'addresses should be assigned properly' do
+    @contact.addresses.size.should == 2
+  end
+
+  it 'should raise ArgumentError with nil address' do
+    lambda {
+      @contact.addresses = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with empty addresses' do
+    lambda {
+      @contact.addresses = [ ]
+    }.should raise_error ArgumentError
+  end
+
+  it 'time_validity should be assigned properly' do
+    @contact.time_validity.upper.value.should == '2009-11-20'
+  end
+
+  it 'purpose should be inherit as name' do
+    @contact.purpose.value.should == 'contact'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/demographic/party_identity_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/demographic/party_identity_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/demographic/party_identity_spec.rb	(revision 367)
@@ -0,0 +1,32 @@
+require File.dirname(__FILE__) + '/../../../../spec_helper'
+include OpenEHR::RM::Demographic
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::DataStructures::ItemStructure
+
+describe PartyIdentity do
+  before(:each) do
+    name = DvText.new(:value => 'test')
+    details = stub(ItemStructure, :archetype_node_id => 'at0002')
+    @party_identity = PartyIdentity.new(:archetype_node_id => 'at0001',
+                                        :name => name,
+                                        :details => details)
+  end
+
+  it 'should be an instance of PartyIdentity' do
+    @party_identity.should be_an_instance_of PartyIdentity
+  end
+
+  it 'details should be assigned properly' do
+    @party_identity.details.archetype_node_id.should == 'at0002'
+  end
+
+  it 'should raise ArgumentError with nil details' do
+    lambda {
+      @party_identity.details = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'purpose should return as same as name' do
+    @party_identity.purpose.value.should == 'test'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/demographic/party_relationship_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/demographic/party_relationship_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/demographic/party_relationship_spec.rb	(revision 367)
@@ -0,0 +1,84 @@
+require File.dirname(__FILE__) + '/../../../../spec_helper'
+include OpenEHR::RM::Demographic
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::DataTypes::Quantity::DateTime
+include OpenEHR::RM::Support::Identification
+include OpenEHR::RM::DataStructures::ItemStructure
+
+describe PartyRelationship do
+  before(:each) do
+    name = DvText.new(:value => 'party relation')
+    uid = HierObjectID.new(:value => '01')
+    details = stub(ItemStructure, :archetype_node_id => 'at0002')
+    upper = DvDate.new(:value => '2009-11-21')
+    time_validity = stub(DvInterval, :upper => upper)
+    source_id = ObjectID.new(:value => '01')
+    source = stub(PartyRef, :id => source_id, :type => 'source')
+    target_id = ObjectID.new(:value => '02')
+    target = stub(PartyRef, :id => target_id)
+    @party_relationship =
+      PartyRelationship.new(:archetype_node_id => 'at0000',
+                            :name => name,
+                            :uid => uid,
+                            :details => details,
+                            :time_validity => time_validity,
+                            :source => source,
+                            :target => target)
+  end
+
+  it 'should be an instance of PartyRelationship' do
+    @party_relationship.should be_an_instance_of PartyRelationship
+  end
+
+  it 'uid should be assigned properly' do
+    @party_relationship.uid.value.should == '01'
+  end
+
+  it 'should raise ArgumentError when nil assigned to uid' do
+    lambda {
+      @party_relationship.uid = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'details should be assigned properly' do
+    @party_relationship.details.archetype_node_id.should == 'at0002'
+  end
+
+  it 'time_validity should be assigned properly' do
+    @party_relationship.time_validity.upper.value.should == '2009-11-21'
+  end
+
+  it 'source should be_assigned properly' do
+    @party_relationship.source.type.should == 'source'
+  end
+
+  it 'should raise ArgumentError when source is assinged nil' do
+    lambda {
+      @party_relationship.source = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError when source is not matched with source' do
+    invalid_id = ObjectID.new(:value => '10')
+    invalid_source = stub(PartyRef, :id => invalid_id)
+    lambda {
+      @party_relationship.source = invalid_source
+    }.should raise_error ArgumentError
+  end
+
+  it 'target should be assined properly' do
+    @party_relationship.target.id.value.should == '02'
+  end
+
+  it 'should raise ArgumentError with target is assigned by nil' do
+    lambda {
+      @party_relationship.target =nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'type should be inherited of name' do
+    @party_relationship.type.value.should == 'party relation'
+  end
+end
+  
+                            
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/demographic/party_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/demographic/party_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/demographic/party_spec.rb	(revision 367)
@@ -0,0 +1,133 @@
+require File.dirname(__FILE__) + '/../../../../spec_helper'
+include OpenEHR::RM::Demographic
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::Support::Identification
+include OpenEHR::RM::DataStructures::ItemStructure
+
+describe Party do
+  before(:each) do
+    name = DvText.new(:value => 'PARTY')
+    uid = HierObjectID.new(:value => '01')
+    identities = stub(Set, :empty? => false, :size => 2)
+    contacts = stub(Set, :size => 3, :empty? => false)
+    cur_id = stub(ObjectID, :value => '01')
+    cur_source = stub(PartyRef, :id => cur_id)
+    id1 = stub(ObjectID, :value => '03')
+    targ1 = stub(PartyRef, :id => id1)
+    rel1 = stub(PartyRelationship, :source => cur_source,
+                :target => targ1)
+    id2 = stub(ObjectID, :value => '04')
+    targ2 = stub(PartyRef, :id => id2)
+    rel2 = stub(PartyRelationship, :source => cur_source,
+                :target => targ2)
+    id3 = stub(ObjectID, :value => '05')
+    targ3 = stub(PartyRef, :id => id3) 
+    rel3 = stub(PartyRelationship, :source => cur_source,
+                :target => targ3)
+    id4 = stub(ObjectID, :value => '06')
+    targ4 = stub(PartyRef, :id => id4)
+    rel4 = stub(PartyRelationship, :source => cur_source,
+                :target => targ4)
+    relationships = [rel1, rel2, rel3, rel4].to_set
+    reverse_relationships = stub(Set, :empty? => false, :size => 5)
+    details = stub(ItemStructure, :archetype_node_id => 'at0005')
+    @party = Party.new(:archetype_node_id => 'at0001',
+                       :name => name,
+                       :uid => uid,
+                       :identities => identities,
+                       :contacts => contacts,
+                       :relationships => relationships,
+                       :reverse_relationships => reverse_relationships,
+                       :details => details)
+  end
+
+  it 'should be an instance of Party' do
+    @party.should be_an_instance_of Party
+  end
+
+  it 'uid should be assigned properly' do
+    @party.uid.value.should == '01'
+  end
+
+  it 'should raise ArgumentError with nil uid' do
+    lambda {
+      @party.uid = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'identities should be assigned properly' do
+    @party.identities.size.should be_equal 2
+  end
+
+  it 'should raise ArgumentError when nil identities are assigned' do
+    lambda {
+      @party.identities = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError when identities are empty' do
+    lambda {
+      @party.identities = Set.new
+    }
+  end
+
+  it 'type should be alias of name' do
+    @party.type.value.should == 'PARTY'
+  end
+
+  it 'contacts should be assigned properly' do
+    @party.contacts.size.should be_equal 3
+  end
+
+  it 'should raise ArgumentError with empty contacts' do
+    lambda {
+      @party.contacts = Set.new
+    }.should raise_error ArgumentError
+  end
+
+  it 'relationships should be assigned properly' do
+    target_ids = Set.new
+    @party.relationships.each do |rel|
+      target_ids << rel.target.id.value
+    end
+    target_ids.should == %w{03 04 05 06}.to_set
+  end
+
+  it 'should not raise ArgumentError with nil relationships' do
+    lambda {
+      @party.relationships = nil
+    }.should_not raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with empty relationships' do
+    lambda {
+      @party.relationships = Set.new
+    }.should raise_error ArgumentError
+  end
+
+  it 'invaild relationship raise ArgumentError' do
+    invalid_id = stub(ObjectID, :value => '10')
+    invalid_source = stub(PartyRef, :id => invalid_id)
+    invalid_rel = stub(PartyRelationship, :source => invalid_source)
+    lambda {
+      @party.relationships = [invalid_rel].to_set
+    }.should raise_error ArgumentError
+  end
+
+  it 'reverse relationship should be assigned properly' do
+    @party.reverse_relationships.size.should be_equal 5
+  end
+
+  it 'reverse_relationships should not be empty' do
+    lambda {
+      @party.reverse_relationships = Set.new
+    }.should raise_error ArgumentError
+  end
+
+  it 'should validate reverse_relationships'
+
+  it 'details should be assigned properly' do
+    @party.details.archetype_node_id.should == 'at0005'
+  end
+end
+
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/demographic/role_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/demographic/role_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/demographic/role_spec.rb	(revision 367)
@@ -0,0 +1,58 @@
+require File.dirname(__FILE__) + '/../../../../spec_helper'
+include OpenEHR::RM::Demographic
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::DataTypes::Quantity::DateTime
+include OpenEHR::RM::Support::Identification
+
+describe Role do
+  before(:each) do
+    name = DvText.new(:value => 'role')
+    uid = HierObjectID.new(:value => '01')
+    identities = stub(Set, :empty? => false)
+    capabilities = stub(Array, :size => 2, :empty? => false)
+    lower = DvDate.new(:value => '2009-11-21')
+    time_validity = stub(DvInterval, :lower => lower)
+    performer = stub(PartyRef, :type => 'ROLE')
+    @role = Role.new(:archetype_node_id => 'at0000',
+                     :name => name,
+                     :uid => uid,
+                     :identities => identities,
+                     :performer => performer,
+                     :capabilities => capabilities,
+                     :time_validity => time_validity)
+  end
+
+  it 'should be an instance of Role' do
+    @role.should be_an_instance_of Role
+  end
+
+  it 'performer should assigned properly' do
+    @role.performer.type.should == 'ROLE'
+  end
+
+  it 'should raise ArgumentError with nil performer' do
+    lambda {
+      @role.performer = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'capabilities should be assigned properly' do
+    @role.capabilities.size.should be_equal 2
+  end
+
+  it 'should raise ArgumentError with empty capabilities' do
+    lambda {
+      @role.capabilities = [ ]
+    }.should raise_error ArgumentError
+  end
+
+  it 'should not raise ArgumentError with nil capabilities' do
+    lambda {
+      @role.capabilities = nil
+    }.should_not raise_error ArgumentError
+  end
+
+  it 'time_validity should be properly assigned' do
+    @role.time_validity.lower.value.should == '2009-11-21'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/ehr/ehr_access_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/ehr/ehr_access_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/ehr/ehr_access_spec.rb	(revision 367)
@@ -0,0 +1,33 @@
+require File.dirname(__FILE__) + '/../../../../spec_helper'
+include OpenEHR::RM::EHR
+include OpenEHR::RM::Security
+include OpenEHR::RM::DataTypes::Text
+
+describe EHRAccess do
+  before(:each) do
+    name = DvText.new(:value => 'EHRAccess')
+    settings = stub(AccessControlSettings)
+    @ehr_access = EHRAccess.new(:archetype_node_id => 'at0001',
+                                :name => name,
+                                :settings => settings,
+                                :scheme => 'SSL')
+  end
+
+  it 'should be an instance of EHRAccess' do
+    @ehr_access.should be_an_instance_of EHRAccess
+  end
+
+  it 'settings should be assigned, but Security package is not determined' do
+    @ehr_access.settings.should_not be_nil
+  end
+
+  it 'schema should be assigned properly' do
+    @ehr_access.scheme.should == 'SSL'
+  end
+
+  it 'should raise ArgumentError with nil schema' do
+    lambda {
+      @ehr_access.scheme = nil
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/ehr/ehr_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/ehr/ehr_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/ehr/ehr_spec.rb	(revision 367)
@@ -0,0 +1,139 @@
+require File.dirname(__FILE__) + '/../../../../spec_helper'
+include OpenEHR::RM::EHR
+include OpenEHR::RM::Support::Identification
+include OpenEHR::RM::DataTypes::Quantity::DateTime
+
+describe EHR do
+  before(:each) do
+    system_id = HierObjectID.new(:value => 'ABC::DEF')
+    ehr_id = HierObjectID.new(:value => 'GHI::JKL')
+    time_created = DvDateTime.new(:value => '2009-11-14T19:01:11')
+    ehr_access = stub(ObjectRef, :type => 'VERSIONED_EHR_ACCESS')
+    ehr_status = stub(ObjectRef, :type => 'VERSIONED_EHR_STATUS')
+    contribution1 = stub(ObjectRef, :type => 'CONTRIBUTION')
+    contribution2 = stub(ObjectRef, :type => 'CONTRIBUTION')
+    contributions = [contribution1, contribution2]
+    directory = stub(ObjectRef, :type => 'VERSIONED_FOLDER')
+    composition1 = stub(ObjectRef, :type => 'VERSIONED_COMPOSITION')
+    composition2 = stub(ObjectRef, :type => 'VERSIONED_COMPOSITION')
+    composition3 = stub(ObjectRef, :type => 'VERSIONED_COMPOSITION')
+    compositions = [composition1, composition2, composition3]
+    @ehr = EHR.new(:system_id => system_id,
+                   :ehr_id => ehr_id,
+                   :time_created => time_created,
+                   :contributions => contributions,
+                   :ehr_access => ehr_access,
+                   :ehr_status => ehr_status,
+                   :directory => directory,
+                   :compositions => compositions)
+  end
+
+  it 'should be an instance of EHR' do
+    @ehr.should be_an_instance_of EHR
+  end
+
+  it 'system_id should be assigned properly' do
+    @ehr.system_id.value.should == 'ABC::DEF'
+  end
+
+  it 'should raise ArgumentError with nil system_id' do
+    lambda {
+      @ehr.system_id = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'ehr_id should be assigned properly' do
+    @ehr.ehr_id.value.should == 'GHI::JKL'
+  end
+
+  it 'should raise ArgumentError with nil ehr_id' do
+    lambda {
+      @ehr.ehr_id = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'time_created should be assigned properly' do
+    @ehr.time_created.value.should == '2009-11-14T19:01:11'
+  end
+
+  it 'should raise ArgumentError with nil time_created' do
+    lambda {
+      @ehr.time_created = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'contributions should properly assigned' do
+    @ehr.contributions.size.should be_equal 2
+  end
+
+  it 'type contributions should be CONTRIBUTION' do
+    contributions = [stub(ObjectRef, :type => 'PARTY')]
+    lambda {
+      @ehr.contributions = contributions
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with nil contributions' do
+    lambda {
+      @ehr.contributions = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'ehr_access should be assigned properly' do
+    @ehr.ehr_access.type.should == 'VERSIONED_EHR_ACCESS'
+  end
+
+  it 'should raise ArgumentError with nil ehr_access' do
+    lambda {
+      @ehr.ehr_access = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArguemntError with invalid ehr_access type' do
+    lambda {
+      @ehr.ehr_access = stub(ObjectRef, :type => 'VERSIONED_EHR_STATUS')
+    }.should raise_error ArgumentError
+  end
+    
+  it 'ehr_status should be assigned properly' do
+    @ehr.ehr_status.type.should == 'VERSIONED_EHR_STATUS'
+  end
+
+  it 'should raise ArgumentError with nil ehr_status' do
+    lambda {
+      @ehr.ehr_status = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with invalid ehr_statsu type' do
+    lambda {
+      @ehr.ehr_status = stub(ObjectRef, :type => 'VERSIONED_EHR_ACCESS')
+    }.should raise_error ArgumentError
+  end
+
+  it 'should assigned compositions properly' do
+    @ehr.compositions.size.should be_equal 3
+  end
+
+  it 'should raise ArgumentError with nil compositions' do
+    lambda {
+      @ehr.compositions = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with invalid type composition' do
+    lambda {
+      @ehr.compositions = [stub(ObjectRef, :type => 'INVALID_COMPOSITION')]
+    }.should raise_error ArgumentError
+  end
+
+  it 'should assigned directory properly' do
+    @ehr.directory.type.should == 'VERSIONED_FOLDER'
+  end
+
+  it 'should raise ArgumentError with invalid type' do
+    lambda {
+      @ehr.directory = stub(ObjectRef, :type => 'INVALID_FOLDER')
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/ehr/ehr_status_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/ehr/ehr_status_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/ehr/ehr_status_spec.rb	(revision 367)
@@ -0,0 +1,52 @@
+require File.dirname(__FILE__) + '/../../../../spec_helper'
+include OpenEHR::RM::EHR
+include OpenEHR::RM::Common::Generic
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::Support::Identification
+include OpenEHR::RM::DataStructures::ItemStructure
+
+describe EHRStatus do
+  before(:each) do
+    external_ref = stub(PartyRef, :namespace => 'ehr status')
+    subject = PartySelf.new(:external_ref => external_ref)
+    other_details = stub(ItemStructure, :archetype_node_id => 'at0005')
+    @ehr_status = EHRStatus.new(:archetype_node_id => 'at0001',
+                                :name => DvText.new(:value => 'ehrstatus'),
+                                :subject => subject,
+                                :is_queryable => false,
+                                :is_modifiable => true,
+                                :other_details => other_details)
+  end
+
+  it 'should be an instance of EHRStatus' do
+    @ehr_status.should be_an_instance_of EHRStatus
+  end
+
+  it 'subject should be assigned properly' do
+    @ehr_status.subject.external_ref.namespace.should == 'ehr status'
+  end
+
+  it 'should raise ArgumentError with nil subject' do
+    lambda {
+      @ehr_status.subject = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'is_queryable should be properly assigned' do
+    @ehr_status.is_queryable?.should be_false
+  end
+
+  it 'is_modifiable should be assigned properly' do
+    @ehr_status.is_modifiable?.should be_true
+  end
+
+  it 'other_details should be assigned properly' do
+    @ehr_status.other_details.archetype_node_id.should == 'at0005'
+  end
+
+  it 'should raise ArgumentError when parant is not nil' do
+    lambda {
+      @ehr_status.parent = 'parent'
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/ehr/versioned_composition_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/ehr/versioned_composition_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/ehr/versioned_composition_spec.rb	(revision 367)
@@ -0,0 +1,33 @@
+require File.dirname(__FILE__) + '/../../../../spec_helper'
+include OpenEHR::RM::EHR
+include OpenEHR::RM::Composition
+include OpenEHR::RM::Common::ChangeControl
+include OpenEHR::RM::DataTypes::Text
+include OpenEHR::RM::DataTypes::Quantity::DateTime
+
+describe VersionedComposition do
+  before(:each) do
+    composition1 = stub(Composition, :archetype_node_id => 'at0002',
+                        :is_persistent? => true)
+    version1 = stub(Version, :data => composition1)
+    composition2 = stub(Composition, :archetype_node_id => 'at0002',
+                        :is_persistent? => false)
+    version2 = stub(Version, :data => composition2)
+    uid = HierObjectID.new(:value => 'opeehr.jp::350')
+    owner_id = stub(ObjectRef, :type => 'EHR')
+    time_created = DvDateTime.new(:value => '2009-11-16T15:14:33')
+    @versioned_composition = 
+      VersionedComposition.new(:uid => uid,
+                               :owner_id => owner_id,
+                               :time_created => time_created,
+                               :all_versions => [version1, version2])
+  end
+
+  it 'should be an instance of VersionedComposition' do
+    @versioned_composition.should be_an_instance_of VersionedComposition
+  end
+
+  it 'is_persistent? should be evaluated by first version' do
+    @versioned_composition.is_persistent?.should be_true
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/integration/generic_entry_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/integration/generic_entry_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/integration/generic_entry_spec.rb	(revision 367)
@@ -0,0 +1,31 @@
+require File.dirname(__FILE__) + '/../../../../spec_helper'
+include OpenEHR::RM::Integration
+include OpenEHR::RM::DataStructures::ItemStructure
+include OpenEHR::RM::DataTypes::Text
+
+describe GenericEntry do
+  before(:each) do
+    data = stub(ItemTree, :archetype_node_id => 'at0003')
+    name = DvText.new(:value => 'generic entry')
+    @generic_entry = GenericEntry.new(:archetype_node_id => 'at0001',
+                                      :name => name,
+                                      :data => data)
+  end
+
+  it 'should be an instance of GenericEntry' do
+    @generic_entry.should be_an_instance_of GenericEntry
+  end
+
+  it 'data should be assigned properly' do
+    @generic_entry.data.archetype_node_id.should == 'at0003'
+  end
+
+  it 'should raise ArgumentError when data are nil' do
+    lambda {
+      @generic_entry.data = nil
+    }.should raise_error ArgumentError
+  end
+end
+                                      
+
+  
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/access_group_ref_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/access_group_ref_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/access_group_ref_spec.rb	(revision 367)
@@ -0,0 +1,19 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Support::Identification
+
+describe AccessGroupRef do
+  before(:each) do
+    object_id = ObjectID.new(:value => 'deadbeefbabe')
+    @access_group_ref = AccessGroupRef.new(:id => object_id,
+                                           :type => 'ACCESS_GROUP',
+                                           :namespace => 'unknown')
+  end
+
+  it 'should be an instance of AccessGroupRef' do
+    @access_group_ref.should be_an_instance_of AccessGroupRef
+  end
+
+  it 'type should be equal ACCESS_GROUP' do
+    @access_group_ref.type.should == 'ACCESS_GROUP'
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/archetype_id_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/archetype_id_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/archetype_id_spec.rb	(revision 367)
@@ -0,0 +1,152 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Support::Identification
+
+describe ArchetypeID do
+  before(:each) do
+    @archetype_id = ArchetypeID.new(:value => 'openEHR-EHR-SECTION.physical_examination-prenatal.v2')
+  end
+
+  it 'should be an instance of ArchetypeID' do
+    @archetype_id.should be_an_instance_of ArchetypeID
+  end
+
+  it 's value should be equal
+       openEHR-EHR-SECTION.physical_examination-prenatal.v2' do
+    @archetype_id.value.should ==
+      'openEHR-EHR-SECTION.physical_examination-prenatal.v2'
+  end
+  it 's qualified_rm_entity should be openEHR-EHR-SECTION' do
+    @archetype_id.qualified_rm_entity.should == 'openEHR-EHR-SECTION'
+  end
+
+  it 's rm_originator should be openEHR' do
+    @archetype_id.rm_originator.should == 'openEHR'
+  end
+
+  it 's rm_name should be EHR' do
+    @archetype_id.rm_name.should == 'EHR'
+  end
+
+  it 'rm_entity should be SECTION' do
+    @archetype_id.rm_entity.should == 'SECTION'
+  end
+
+  it 's domain_concept should be physical_examination-prenatal' do
+    @archetype_id.domain_concept.should == 'physical_examination-prenatal'
+  end
+
+  it 's concept name should be physical_examination' do
+    @archetype_id.concept_name.should == 'physical_examination'
+  end
+
+  it 's specialisation should be prenatal' do
+    @archetype_id.specialisation.should == 'prenatal'
+  end
+
+  it 's version_id should == v2' do
+    @archetype_id.version_id.should == 'v2'
+  end
+
+  it 'should raise ArgumentError with wrong id format' do
+    lambda {
+      ArchetypeID.new(:value =>'wrong-format')
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with nil concept name' do
+    lambda {
+      @archetype_id.concept_name = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with wrong domain concept format' do
+    lambda {
+      @archetype_id.domain_concept = '0123'
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with empty rm_entity' do
+    lambda {
+      @archetype_id.rm_entity = ''
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with nil rm_entity' do
+    lambda {
+      @archetype_id.rm_entity = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with empty rm_originator' do
+    lambda {
+      @archetype_id.rm_originator = ''
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with nil rm_originator' do
+    lambda {
+      @archetype_id.rm_originator = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with empty specialisation' do
+    lambda {
+      @archetype_id.specialisation = ''
+    }.should raise_error ArgumentError
+  end
+
+  it 'should not raise ArgumentError with nil specialisation' do
+    lambda {
+      @archetype_id.specialisation = nil
+    }.should_not raise_error ArgumentError
+  end
+
+  describe 'another constructor' do
+    before(:each) do
+      @archetype_id = ArchetypeID.new(:rm_originator => 'openEHR',
+                                      :rm_name => 'EHR',
+                                      :rm_entity => 'EVALUATION',
+                                      :concept_name => 'clinical_synopsis',
+                                      :version_id => 'v1')
+    end
+
+    it 'should be an instance of ArchetypeID' do
+      @archetype_id.should be_an_instance_of ArchetypeID
+    end
+
+    it 'domain_concept should be clinical_synopsis' do
+      @archetype_id.domain_concept.should == 'clinical_synopsis'
+    end
+  end
+
+  describe 'domain concept' do
+    before(:each) do
+      @archetype_id.domain_concept = 'progress_note-naturopathy'
+    end
+
+    it 'concept_name should be progress note' do
+      @archetype_id.concept_name.should == 'progress_note'
+    end
+
+    it 'specialisation should be naturopathy' do
+      @archetype_id.specialisation === 'naturopathy'
+    end
+
+    it 'should raise ArgumentError empty domain concept' do
+      lambda {
+        @archetype_id.domain_concept = ''
+      }.should raise_error ArgumentError
+    end
+
+    it 'should raise ArgumentError nil domain concept' do
+      lambda {
+        @archetype_id.domain_concept = nil
+      }.should raise_error ArgumentError
+    end
+
+    it 's specialisation may be empty' do
+      @archetype_id.domain_concept = 'clinical_synopsis'
+      @archetype_id.concept_name.should == 'clinical_synopsis'
+    end
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/generic_id_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/generic_id_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/generic_id_spec.rb	(revision 367)
@@ -0,0 +1,33 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Support::Identification
+
+describe GenericID do
+  before(:each) do
+    @generic_id = GenericID.new(:value => '791-0245',
+                                :scheme => 'ZIP')
+  end
+
+  it 'should be an instance of GenericID' do
+    @generic_id.should be_an_instance_of GenericID
+  end
+
+  it 's value should be 791-0245' do
+    @generic_id.value.should == '791-0245'
+  end
+
+  it 's scheme should be ZIP' do
+    @generic_id.scheme.should == 'ZIP'
+  end
+
+  it 'should raise ArgumentError with nil scheme' do
+    lambda {
+      @generic_id.scheme = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with empty scheme' do
+    lambda {
+      @generic_id.scheme = ''
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/hier_object_id_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/hier_object_id_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/hier_object_id_spec.rb	(revision 367)
@@ -0,0 +1,12 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Support::Identification
+
+describe HierObjectID do
+  before(:each) do
+    @hier_object_id = HierObjectID.new(:value => '2003045')
+  end
+
+  it 'should be an instance of HierObjectID' do
+    @hier_object_id.should be_an_instance_of HierObjectID
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/internet_id_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/internet_id_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/internet_id_spec.rb	(revision 367)
@@ -0,0 +1,12 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Support::Identification
+
+describe InternetID do
+  before(:each) do
+    @internet_id = InternetID.new(:value => 'jp.openehr')
+  end
+
+  it 'should be an instance of IsoOID' do
+    @internet_id.should be_an_instance_of InternetID
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/iso_oid_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/iso_oid_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/iso_oid_spec.rb	(revision 367)
@@ -0,0 +1,12 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Support::Identification
+
+describe IsoOID do
+  before(:each) do
+    @iso_oid = IsoOID.new(:value => '1.3.6.0.1')
+  end
+
+  it 'should be an instance of IsoOID' do
+    @iso_oid.should be_an_instance_of IsoOID
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/locatable_ref_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/locatable_ref_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/locatable_ref_spec.rb	(revision 367)
@@ -0,0 +1,34 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Support::Identification
+
+describe LocatableRef do
+  before(:each) do
+    object_version_id = ObjectVersionID.new(:value => 'deadbeef::babe::1')
+    @locatable_ref = LocatableRef.new(:id => object_version_id,
+                                      :namespace => 'local',
+                                      :type =>'PERSON',
+                                      :path => 'test/support')
+  end
+
+  it 'should be an instance of LocatableRef' do
+    @locatable_ref.should be_an_instance_of LocatableRef
+  end
+
+  it 'id should be deadbeef::babe::1' do
+    @locatable_ref.id.value.should == 'deadbeef::babe::1'
+  end
+
+  it 'path should be test/support' do
+    @locatable_ref.path.should == 'test/support'
+  end
+
+  it 'as_uri should be ehr://deadbeef::babe::1/test/support' do
+    @locatable_ref.as_uri.should == 'ehr://deadbeef::babe::1/test/support'
+  end
+
+  it 'should raise ArgumentError with empty path' do
+    lambda {
+      @locatable_ref.path = ''
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/object_id_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/object_id_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/object_id_spec.rb	(revision 367)
@@ -0,0 +1,24 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Support::Identification
+
+describe ObjectID do
+  before(:each) do
+    @object_id = ObjectID.new(:value => '1')
+  end
+
+  it 'should be an instance of ObjectID' do
+    @object_id.should be_an_instance_of ObjectID
+  end
+
+  it 'value should be 1' do
+    @object_id.value.should == '1'
+  end
+
+  it 'should equal with same value' do
+    @object_id.should == ObjectID.new(:value => '1')
+  end
+
+  it 'should_not equal with other value' do
+    @object_id.should_not == ObjectID.new(:value => 'a')
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/object_ref_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/object_ref_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/object_ref_spec.rb	(revision 367)
@@ -0,0 +1,33 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Support::Identification
+
+describe ObjectRef do
+  before(:each) do
+    object_id = ObjectID.new(:value => 'deadbeefbabe')
+    @object_ref = ObjectRef.new(:id => object_id,
+                                :namespace => 'local',
+                                :type => 'PARTY')
+  end
+
+  it 'id.value should deadbeefbabe' do
+    @object_ref.id.value.should == 'deadbeefbabe'
+  end
+
+  it 'should be an isntance of ObjectRef' do
+    @object_ref.should be_an_instance_of ObjectRef
+  end
+
+  it 'namespace should be local' do
+    @object_ref.namespace.should == 'local'
+  end
+
+  it 'type should be PARTY' do
+    @object_ref.type.should == 'PARTY'
+  end
+
+  it 'should raise ArgumentError with invalid namespace' do
+    lambda {
+      @object_ref.namespace = 'a****'
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/object_version_id_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/object_version_id_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/object_version_id_spec.rb	(revision 367)
@@ -0,0 +1,60 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Support::Identification
+
+describe ObjectVersionID do
+  before(:each) do
+    @object_version_id = ObjectVersionID.new(:value => 'F7C5C7B7-75DB-4b39-9A1E-C0BA9BFDBDEC::87284370-2D4B-4e3d-A3F3-F303D2F4F34B::2')
+
+  end
+
+  it 'should be an instance of ObjectVersionID' do
+    @object_version_id.should be_an_instance_of ObjectVersionID
+  end
+
+  it 'value should be F7C5C7B7-75DB-4b39-9A1E-C0BA9BFDBDEC::87284370-2D4B-4e3d-A3F3-F303D2F4F34B::2' do
+    @object_version_id.value.should == 'F7C5C7B7-75DB-4b39-9A1E-C0BA9BFDBDEC::87284370-2D4B-4e3d-A3F3-F303D2F4F34B::2'
+  end
+
+  it 'should not be branched' do
+    @object_version_id.is_branch?.should be_false
+  end
+
+  it 'should have valid object_id' do
+    @object_version_id.object_id.value.should ==
+      'F7C5C7B7-75DB-4b39-9A1E-C0BA9BFDBDEC'
+  end
+
+  it 'should have valid creating_system_id' do
+    @object_version_id.creating_system_id.value.should ==
+      '87284370-2D4B-4e3d-A3F3-F303D2F4F34B'
+  end
+
+  it 'should raise ArgumentError with invalid format' do
+    lambda {
+      @object_version_id.value = 'invalid:form'
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with nil object id' do
+    lambda {
+      @object_version_id.object_id = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with nil creating system id' do
+    lambda {
+      @object_version_id.creating_system_id = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with nil version_tree_id' do
+    lambda {
+      @object_version_id.version_tree_id = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should be branch if version_identifier represent branch' do
+    @object_version_id.version_tree_id.value = '2.3.4'
+    @object_version_id.is_branch?.should be_true
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/party_ref_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/party_ref_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/party_ref_spec.rb	(revision 367)
@@ -0,0 +1,29 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Support::Identification
+
+describe PartyRef do
+  before(:each) do
+    object_id = stub(ObjectID, :value => 'test')
+    @party_ref = PartyRef.new(:id => object_id,
+                              :type => 'PERSON',
+                              :namespace => 'test')
+  end
+
+  it 'should be an instance of PartyRef' do
+    @party_ref.should be_an_instance_of PartyRef
+  end
+
+  %w[PERSON ORGANISATION GROUP AGENT ROLE PARTY ACTOR].each do |type|
+    it "should not raise ArgumentError with #{type} type" do
+      lambda {
+        @party_ref.type = type
+      }.should_not raise_error ArgumentError
+    end
+  end
+
+  it 'should raise ArgumentError with UNKNOWN type' do
+    lambda {
+      @party_ref.type = 'UNKNOWN'
+    }.should raise_error ArgumentError
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/template_id_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/template_id_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/template_id_spec.rb	(revision 367)
@@ -0,0 +1,12 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Support::Identification
+
+describe TemplateID do
+  before(:each) do
+    @template_id = TemplateID.new(:value => 'uk.nhs.cfh:openehr-EHR-COMPOSITION.admission_ed.v5')
+  end
+
+  it 'should be an isntance of TemplateID' do
+    @template_id.should be_an_instance_of TemplateID
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/terminology_id_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/terminology_id_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/terminology_id_spec.rb	(revision 367)
@@ -0,0 +1,33 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Support::Identification
+
+describe TerminologyID do
+  before(:each) do
+    @terminology_id = TerminologyID.new(:value => 'ICD10(2003)')
+  end
+
+  it 'should be an instance of TerminologyID' do
+    @terminology_id.should be_an_instance_of TerminologyID
+  end
+
+  it 's name should be ICD10' do
+    @terminology_id.name.should == 'ICD10'
+  end
+
+  it 's version_id should be 2003' do
+    @terminology_id.version_id.should == '2003'
+  end
+
+  it 's value should be ICD10(2003)' do
+    @terminology_id.value.should == 'ICD10(2003)'
+  end
+
+  it 'should only name when version_id is nil' do
+    @terminology_id.version_id = ''
+    @terminology_id.value.should == 'ICD10'
+  end
+
+  it 'should has another constructor' do
+    @terminology_id = TerminologyID.new(:name => 'SNOMED-CT')
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/uid_based_id_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/uid_based_id_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/uid_based_id_spec.rb	(revision 367)
@@ -0,0 +1,50 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Support::Identification
+
+describe UIDBasedID do
+  before(:each) do
+    @uid_based_id = UIDBasedID.new(:value => 'rrip::0.0.3')
+  end
+
+  it 'should be an instance of UIDBasedID' do
+    @uid_based_id.should be_an_instance_of UIDBasedID
+  end
+
+  it 'value should be rrip::0.0.3' do
+    @uid_based_id.value.should == 'rrip::0.0.3'
+  end
+
+  it 'root should be rrip' do
+    @uid_based_id.root.value.should == 'rrip'
+  end
+
+  it 'extention should be 0.0.3' do
+    @uid_based_id.extension.should == '0.0.3'
+  end
+
+  it 'should have extension' do
+    @uid_based_id.has_extension?.should be_true
+  end
+
+  describe 'when extension is empty' do
+    before(:each) do
+      @uid_based_id = UIDBasedID.new(:value => '10001')
+    end
+
+    it 'value should be 10001' do
+      @uid_based_id.value.should == '10001'
+    end
+
+    it 'has_extension? should not be true' do
+      @uid_based_id.has_extension?.should_not be_true
+    end
+
+    it 's extention should be empty' do
+      @uid_based_id.extension.should == ''
+    end
+
+    it 's root should be 10001' do
+      @uid_based_id.root.value.should == '10001'
+    end
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/uid_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/uid_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/uid_spec.rb	(revision 367)
@@ -0,0 +1,29 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Support::Identification
+
+describe UID do
+  before(:each) do
+    @uid = UID.new(:value => '1001')
+  end
+
+  it 'should be an instance of UID' do
+    @uid.should be_an_instance_of UID
+  end
+
+  it 's value should be 1001' do
+    @uid.value.should == '1001'
+  end
+
+  it 'should raise ArgumentError with nil value' do
+    lambda {
+      @uid.value = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with empty value' do
+    lambda {
+      @uid.value = ''
+    }.should raise_error ArgumentError
+  end
+end
+  
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/version_tree_id_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/version_tree_id_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/identification/version_tree_id_spec.rb	(revision 367)
@@ -0,0 +1,104 @@
+require File.dirname(__FILE__) + '/../../../../../spec_helper'
+include OpenEHR::RM::Support::Identification
+
+describe VersionTreeID do
+  before(:each) do
+    @version_tree_id = VersionTreeID.new(:value => '1.2.3')
+  end
+
+  it 'should be an instance of VersionTreeID' do
+    @version_tree_id.should be_an_instance_of VersionTreeID
+  end
+
+  it 'value should be 1.2.3' do
+    @version_tree_id.value.should == '1.2.3'
+  end
+
+  it 'trunk_version should 1' do
+    @version_tree_id.trunk_version.should == '1'
+  end
+
+  it 'branch_number should 2' do
+    @version_tree_id.branch_number.should == '2'
+  end
+
+  it 'branch_version should 3' do
+    @version_tree_id.branch_version.should == '3'
+  end
+
+  it 'is_first? should be true' do
+    @version_tree_id.is_first?.should be_true
+  end
+
+  it 'is_branch? should be true' do
+    @version_tree_id.is_branch?.should be_true
+  end
+
+  it 'should raise ArgumentError with nil trunk version' do
+    lambda {
+      @version_tree_id.trunk_version = nil
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with 0 trunk version' do
+    lambda {
+      @version_tree_id.trunk_version = 0
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with 0 branch number' do
+    lambda {
+      @version_tree_id.branch_number = 0
+    }.should raise_error ArgumentError
+  end
+
+  it 'should raise ArgumentError with 0 branch version' do
+    lambda {
+      @version_tree_id.branch_version = 0
+    }.should raise_error ArgumentError
+  end
+
+  describe 'partial version tree id' do
+    describe 'version 4.5' do
+      before(:each) do
+        @version_tree_id = VersionTreeID.new(:value => '4.5')
+      end
+
+      it 'value should be 4.5' do
+        @version_tree_id.value.should == '4.5'
+      end
+
+      it 'should be nil branch version' do
+        @version_tree_id.branch_version.should be_nil
+      end
+
+      it 'is_first? should not be true' do
+        @version_tree_id.is_first?.should_not be_true
+      end
+    end
+
+    describe 'version 6' do
+      before(:each) do
+        @version_tree_id = VersionTreeID.new(:value => '6')
+      end
+
+      it 'value should be 6' do
+        @version_tree_id.value.should == '6'
+      end
+
+      it 'should be nil branch number' do
+        @version_tree_id.branch_number.should be_nil
+      end
+
+      it 'is_branch should not be true' do
+        @version_tree_id.is_branch?.should_not be_true
+      end
+
+      it 'should raise ArgumentError if assinged branch version' do
+        lambda {
+          @version_tree_id.branch_version = '7'
+        }.should raise_error ArgumentError
+      end
+    end
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/measurement_service_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/measurement_service_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/measurement_service_spec.rb	(revision 367)
@@ -0,0 +1,7 @@
+require File.dirname(__FILE__) + '/../../../../spec_helper'
+include OpenEHR::RM::Support::Measurement
+
+describe MeasurementService do
+
+
+end
Index: /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/terminology_service_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/terminology_service_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/lib/open_ehr/rm/support/terminology_service_spec.rb	(revision 367)
@@ -0,0 +1,24 @@
+require File.dirname(__FILE__) + '/../../../../spec_helper'
+include OpenEHR::RM::Support::Terminology
+
+describe TerminologyService do
+  before(:each) do
+    @ts ||= TerminologyService.new
+    @terminology_mock = mock('terminology')
+  end
+
+  it 'should get terminology by its name' do
+  end
+
+  it 'should get code_set by its name'
+
+  it 'should reply if it has terminology or not'
+
+  it 'should reply if it has terminology or not'
+
+  it 'should reply all terminology_identifires'
+
+  it 'should get openehr code stes'
+
+  it 'should get code_set_identifiers'
+end
Index: /ruby/tags/release-0.5.0/spec/models/encoding_alias_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/models/encoding_alias_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/models/encoding_alias_spec.rb	(revision 367)
@@ -0,0 +1,7 @@
+require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+
+describe EncodingAlias do
+  before(:each) do
+    @encoding_alias ||= EncodingAlias.new
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/models/encoding_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/models/encoding_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/models/encoding_spec.rb	(revision 367)
@@ -0,0 +1,18 @@
+require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+
+describe 'encoding in general', :shared => true do
+  before(:all) do
+    @encoding_mock = mock('encoding')
+  end
+end
+
+
+describe Encoding do
+
+  it "should  valid charset?" do
+    encodings_proxy = mock('encodings')
+    encodings_proxy.should_receive(:valid_charset?).with('UTF-8').and_return(true)
+    @encoding.stub!(:valid_charset?).and_return(encodings_proxy)
+    encodings_proxy.valid_charset?('UTF-8').should be_true
+  end
+end
Index: /ruby/tags/release-0.5.0/spec/models/terminology_spec.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/models/terminology_spec.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/models/terminology_spec.rb	(revision 367)
@@ -0,0 +1,9 @@
+require File.dirname(__FILE__) + '/../spec_helper'
+
+describe Terminology do
+  before(:each) do
+    @terminology = Terminology.new
+  end
+
+  it 'should find all the codes by group'
+end
Index: /ruby/tags/release-0.5.0/spec/rcov.opts
===================================================================
--- /ruby/tags/release-0.5.0/spec/rcov.opts	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/rcov.opts	(revision 367)
@@ -0,0 +1,2 @@
+--exclude "spec/*,gems/*"
+--rails
Index: /ruby/tags/release-0.5.0/spec/spec.opts
===================================================================
--- /ruby/tags/release-0.5.0/spec/spec.opts	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/spec.opts	(revision 367)
@@ -0,0 +1,4 @@
+--colour
+--format progress
+--loadby mtime
+--reverse
Index: /ruby/tags/release-0.5.0/spec/spec_helper.rb
===================================================================
--- /ruby/tags/release-0.5.0/spec/spec_helper.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/spec/spec_helper.rb	(revision 367)
@@ -0,0 +1,51 @@
+# This file is copied to ~/spec when you run 'ruby script/generate rspec'
+# from the project root directory.
+ENV["RAILS_ENV"] ||= 'test'
+require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
+require 'spec/autorun'
+require 'spec/rails'
+
+# Requires supporting files with custom matchers and macros, etc,
+# in ./support/ and its subdirectories.
+Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
+
+Spec::Runner.configure do |config|
+  # If you're not using ActiveRecord you should remove these
+  # lines, delete config/database.yml and disable :active_record
+  # in your config/boot.rb
+  config.use_transactional_fixtures = true
+  config.use_instantiated_fixtures  = false
+  config.fixture_path = RAILS_ROOT + '/spec/fixtures/'
+
+  # == Fixtures
+  #
+  # You can declare fixtures for each example_group like this:
+  #   describe "...." do
+  #     fixtures :table_a, :table_b
+  #
+  # Alternatively, if you prefer to declare them only once, you can
+  # do so right here. Just uncomment the next line and replace the fixture
+  # names with your fixtures.
+  #
+  # config.global_fixtures = :table_a, :table_b
+  #
+  # If you declare global fixtures, be aware that they will be declared
+  # for all of your examples, even those that don't use them.
+  #
+  # You can also declare which fixtures to use (for example fixtures for test/fixtures):
+  #
+  # config.fixture_path = RAILS_ROOT + '/spec/fixtures/'
+  #
+  # == Mock Framework
+  #
+  # RSpec uses it's own mocking framework by default. If you prefer to
+  # use mocha, flexmock or RR, uncomment the appropriate line:
+  #
+  # config.mock_with :mocha
+  # config.mock_with :flexmock
+  # config.mock_with :rr
+  #
+  # == Notes
+  #
+  # For more information take a look at Spec::Runner::Configuration and Spec::Runner
+end
Index: /ruby/tags/release-0.5.0/test/fixtures/terminologies.yml
===================================================================
--- /ruby/tags/release-0.5.0/test/fixtures/terminologies.yml	(revision 367)
+++ /ruby/tags/release-0.5.0/test/fixtures/terminologies.yml	(revision 367)
@@ -0,0 +1,1728 @@
+terminology_00155: 
+  name: openehr
+  group: event math function
+  code: "522"
+  id: 155
+  rubric: increase
+  mappings: ""
+  lang: en
+  description: "This is also a change  but is only a positive change and cannot be expressed as a negative. This can be used for positive changes like Weight gain: 2.5kg\xE2\x80\x9D. "
+terminology_00013: 
+  name: openehr
+  group: subject relationship
+  code: "27"
+  id: 13
+  rubric: sibling
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of sibling to subject of EHR "
+terminology_00127: 
+  name: openehr
+  group: property
+  code: "370"
+  id: 127
+  rubric: "Specific energy "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00070: 
+  name: openehr
+  group: participation mode
+  code: "222"
+  id: 70
+  rubric: interpreted audio-only
+  mappings: "HL7_ParticipationMode::V16544 (includes live) "
+  lang: en
+  description: "Any live audio-only communication using an interpreter. "
+terminology_00183: 
+  name: openehr
+  group: Instruction transitions
+  code: "549"
+  id: 183
+  rubric: time out
+  mappings: ""
+  lang: en
+  description: "Time out has occurred  taking the Instruction from some pervious state into the expired state. "
+terminology_00041: 
+  name: openehr
+  group: participation mode
+  code: "193"
+  id: 41
+  rubric: not specified
+  mappings: ""
+  lang: en
+  description: "Mode of participation is not specified; use only for legacy data. "
+terminology_00014: 
+  name: openehr
+  group: subject relationship
+  code: "28"
+  id: 14
+  rubric: child
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of child to subject of EHR "
+terminology_00128: 
+  name: openehr
+  group: property
+  code: "371"
+  id: 128
+  rubric: "Specific heat  gas content "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00071: 
+  name: openehr
+  group: participation mode
+  code: "223"
+  id: 71
+  rubric: interpreted face-toface communication
+  mappings: "HL7_ParticipationMode::16545 "
+  lang: en
+  description: "Face to face communications between parties in the same room with an interpreter "
+terminology_00184: 
+  name: openehr
+  group: Instruction transitions
+  code: "551"
+  id: 184
+  rubric: notify completed
+  mappings: ""
+  lang: en
+  description: "Occurs when notification of Instruction having been completed is received after expiry. "
+terminology_00042: 
+  name: openehr
+  group: participation mode
+  code: "194"
+  id: 42
+  rubric: asynchronous audiovisual; recorded video
+  mappings: ""
+  lang: en
+  description: "Audio-visual communication that is not live "
+terminology_00156: 
+  name: openehr
+  group: version lifecycle state
+  code: "523"
+  id: 156
+  rubric: deleted
+  mappings: ""
+  lang: en
+  description: "Item has been logically deleted. "
+terminology_00129: 
+  name: openehr
+  group: property
+  code: "373"
+  id: 129
+  rubric: "Heat transfer coefficient "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00072: 
+  name: openehr
+  group: participation mode
+  code: "224"
+  id: 72
+  rubric: interpreted video communication
+  mappings: ""
+  lang: en
+  description: "Live audio-visual communication involving an interpreter "
+terminology_00185: 
+  name: openehr
+  group: Instruction transitions
+  code: "552"
+  id: 185
+  rubric: notify cancelled
+  mappings: ""
+  lang: en
+  description: "Occurs when notification of Instruction having been cancelled is received after expiry. "
+terminology_00043: 
+  name: openehr
+  group: participation mode
+  code: "195"
+  id: 43
+  rubric: live audiovisual; videoconference; videophone
+  mappings: ""
+  lang: en
+  description: "Any audio-visual communication in real time "
+terminology_00157: 
+  name: openehr
+  group: audit change type
+  code: "523"
+  id: 157
+  rubric: deleted
+  mappings: "HL7_CDA: CEN: "
+  lang: en
+  description: "Change type was logical deletion. "
+terminology_00015: 
+  name: openehr
+  group: subject relationship
+  code: "29"
+  id: 15
+  rubric: daughter
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of daughter to subject of EHR "
+terminology_00186: 
+  name: openehr
+  group: version lifecycle state
+  code: "553"
+  id: 186
+  rubric: incomplete
+  mappings: ""
+  lang: en
+  description: "Item is incomplete at time of committal  in the view of the author. Further editing or review needed before its status will be set to finished\xE2\x80\x9D. "
+terminology_00044: 
+  name: openehr
+  group: participation mode
+  code: "196"
+  id: 44
+  rubric: recorded video
+  mappings: ""
+  lang: en
+  description: "Recorded video or video mail "
+terminology_00158: 
+  name: openehr
+  group: Instruction transitions
+  code: "524"
+  id: 158
+  rubric: initial
+  mappings: ""
+  lang: en
+  description: "The instruction is recorded but no state is determined "
+terminology_00016: 
+  name: openehr
+  group: subject relationship
+  code: "31"
+  id: 16
+  rubric: son
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of son to subject of EHR "
+terminology_00073: 
+  name: openehr
+  group: attestation reason
+  code: "240"
+  id: 73
+  rubric: signed
+  mappings: "HL7_ParticipationSignature::10284 "
+  lang: en
+  description: "The attested information has been signed by its signatory. "
+terminology_00187: 
+  name: openehr
+  group: event math function
+  code: "640"
+  id: 187
+  rubric: actual
+  mappings: ""
+  lang: en
+  description: "Value of the datum was the value indicated during the entire time of the event  i.e. it is not an averaged or other computed value. "
+terminology_00045: 
+  name: openehr
+  group: participation mode
+  code: "197"
+  id: 45
+  rubric: videophone
+  mappings: ""
+  lang: en
+  description: "Live audio-visual communication "
+terminology_00100: 
+  name: openehr
+  group: property
+  code: "337"
+  id: 100
+  rubric: "Specific surface "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00159: 
+  name: openehr
+  group: Instruction transitions
+  code: "526"
+  id: 159
+  rubric: planned
+  mappings: ""
+  lang: en
+  description: "The instruction is planned "
+terminology_00017: 
+  name: openehr
+  group: subject relationship
+  code: "36"
+  id: 17
+  rubric: paternal grandfather
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of aternal grandfather to subject of EHR "
+terminology_00074: 
+  name: openehr
+  group: Instruction transitions
+  code: "245"
+  id: 74
+  rubric: active
+  mappings: ""
+  lang: en
+  description: "The instruction is currently being carried out "
+terminology_00188: 
+  name: openehr
+  group: attestation reason
+  code: "648"
+  id: 188
+  rubric: witnessed
+  mappings: ""
+  lang: en
+  description: "This attested information has been witnessed by the signatory. "
+terminology_00046: 
+  name: openehr
+  group: participation mode
+  code: "198"
+  id: 46
+  rubric: videoconferencing
+  mappings: "HL7_ParticipationMode::16548 "
+  lang: en
+  description: "Live audio-visual communication over videoconferencing or other similar equipment. "
+terminology_00101: 
+  name: openehr
+  group: property
+  code: "338"
+  id: 101
+  rubric: "Velocity "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00018: 
+  name: openehr
+  group: subject relationship
+  code: "37"
+  id: 18
+  rubric: paternal grandmother
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of paternal grandmother to subject of EHR "
+terminology_00075: 
+  name: openehr
+  group: audit change type
+  code: "249"
+  id: 75
+  rubric: creation
+  mappings: "HL7_CDA: CEN: "
+  lang: en
+  description: "Change type was creation. "
+terminology_00130: 
+  name: openehr
+  group: property
+  code: "374"
+  id: 130
+  rubric: "Voltage  electrical "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00189: 
+  name: openehr
+  group: audit change type
+  code: "666"
+  id: 189
+  rubric: attestation
+  mappings: "HL7_CDA: CEN: "
+  lang: en
+  description: "Existing data were attested. "
+terminology_00047: 
+  name: openehr
+  group: participation mode
+  code: "199"
+  id: 47
+  rubric: asynchronous audio-only; dictated; voice mail
+  mappings: ""
+  lang: en
+  description: "Audio-only communication that is not live. "
+terminology_00102: 
+  name: openehr
+  group: property
+  code: "339"
+  id: 102
+  rubric: "Acceleration "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00019: 
+  name: openehr
+  group: subject relationship
+  code: "38"
+  id: 19
+  rubric: maternal uncle
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of maternal uncle to subject of EHR "
+terminology_00076: 
+  name: openehr
+  group: audit change type
+  code: "250"
+  id: 76
+  rubric: amendment
+  mappings: "HL7_CDA: CEN: "
+  lang: en
+  description: "Change type was amendment i.e. correction of the previous version. "
+terminology_00131: 
+  name: openehr
+  group: property
+  code: "375"
+  id: 131
+  rubric: "Resistance "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00048: 
+  name: openehr
+  group: participation mode
+  code: "200"
+  id: 48
+  rubric: dictated
+  mappings: "HL7_ParticipationMode::16547 "
+  lang: en
+  description: "Non-interactive audio-only information recorded on some medium  such as cassette tape. "
+terminology_00103: 
+  name: openehr
+  group: property
+  code: "340"
+  id: 103
+  rubric: "Momentum "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00160: 
+  name: openehr
+  group: Instruction transitions
+  code: "527"
+  id: 160
+  rubric: postponed
+  mappings: ""
+  lang: en
+  description: "The instruction has been posponed - it had not be commenced "
+terminology_00077: 
+  name: openehr
+  group: audit change type
+  code: "251"
+  id: 77
+  rubric: modification
+  mappings: "HL7_CDA: CEN: "
+  lang: en
+  description: "Change type was update of the previous version. "
+terminology_00132: 
+  name: openehr
+  group: property
+  code: "377"
+  id: 132
+  rubric: "Electrical field strength "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00049: 
+  name: openehr
+  group: participation mode
+  code: "201"
+  id: 49
+  rubric: voice-mail
+  mappings: ""
+  lang: en
+  description: "Audio messaging system "
+terminology_00104: 
+  name: openehr
+  group: property
+  code: "341"
+  id: 104
+  rubric: "Velocity  angular "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00133: 
+  name: openehr
+  group: property
+  code: "378"
+  id: 133
+  rubric: "Magnetic flux "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00105: 
+  name: openehr
+  group: property
+  code: "342"
+  id: 105
+  rubric: "Acceleration  angular "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00190: 
+  name: openehr
+  group: term mapping purpose
+  code: "669"
+  id: 190
+  rubric: public health
+  mappings: ""
+  lang: en
+  description: "Public health related term mapping. "
+terminology_00161: 
+  name: openehr
+  group: Instruction transitions
+  code: "528"
+  id: 161
+  rubric: cancelled
+  mappings: ""
+  lang: en
+  description: "The instruction has been cancelled - it had not been commenced and will not commence in the future "
+terminology_00078: 
+  name: openehr
+  group: audit change type
+  code: "252"
+  id: 78
+  rubric: synthesis
+  mappings: "HL7_CDA: CEN: "
+  lang: en
+  description: "Change type was creation synthesis of data due to conversion process  typically a data importer. "
+terminology_00134: 
+  name: openehr
+  group: property
+  code: "379"
+  id: 134
+  rubric: "Inductance "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00106: 
+  name: openehr
+  group: property
+  code: "343"
+  id: 106
+  rubric: "Momentum  angular "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00191: 
+  name: openehr
+  group: term mapping purpose
+  code: "670"
+  id: 191
+  rubric: reimbursement
+  mappings: ""
+  lang: en
+  description: "Reimbrusement / billing related term mapping. "
+terminology_00162: 
+  name: openehr
+  group: Instruction transitions
+  code: "529"
+  id: 162
+  rubric: scheduled
+  mappings: ""
+  lang: en
+  description: "The instruction has been scheduled to be carried out at a particular time "
+terminology_00020: 
+  name: openehr
+  group: subject relationship
+  code: "39"
+  id: 20
+  rubric: maternal aunt
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of maternal aunt to subject of EHR "
+terminology_00079: 
+  name: openehr
+  group: null flavours
+  code: "253"
+  id: 79
+  rubric: unknown
+  mappings: "HL7_NullFlavor::V10612 "
+  lang: en
+  description: "A possible value exists but is not provided. "
+terminology_00192: 
+  name: openehr
+  group: term mapping purpose
+  code: "671"
+  id: 192
+  rubric: research study
+  mappings: ""
+  lang: en
+  description: "Term mapping.for research study "
+terminology_00107: 
+  name: openehr
+  group: property
+  code: "344"
+  id: 107
+  rubric: "Moment inertia  area "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00050: 
+  name: openehr
+  group: participation mode
+  code: "202"
+  id: 50
+  rubric: live audio-only; telephone; internet phone; teleconference
+  mappings: "HL7_ParticipationMode::V16544 (includes live) "
+  lang: en
+  description: "Any live audio-only communication. "
+terminology_00163: 
+  name: openehr
+  group: Instruction transitions
+  code: "530"
+  id: 163
+  rubric: suspended
+  mappings: ""
+  lang: en
+  description: "The instruction is suspended  it has been activated but is not active at present. It could be active again in the future. "
+terminology_00021: 
+  name: openehr
+  group: subject relationship
+  code: "40"
+  id: 21
+  rubric: paternal uncle
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of paternal uncle to subject of EHR "
+terminology_00135: 
+  name: openehr
+  group: property
+  code: "380"
+  id: 135
+  rubric: "Qualified real "
+  mappings: ""
+  lang: en
+  description: "This is a number with an arithmetic qualification (which may be no units  103 etc) allowing integers to be expressed as reals raised to a nominated power  or for real numbers alone. "
+terminology_00108: 
+  name: openehr
+  group: property
+  code: "345"
+  id: 108
+  rubric: "Moment inertia  mass "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00164: 
+  name: openehr
+  group: Instruction transitions
+  code: "531"
+  id: 164
+  rubric: aborted
+  mappings: ""
+  lang: en
+  description: "The instruction is aborted  it has been activated but ceased before it has been completed and will not be restarted in the future. "
+terminology_00022: 
+  name: openehr
+  group: subject relationship
+  code: "41"
+  id: 22
+  rubric: paternal aunt
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of paternal aunt to subject of EHR "
+terminology_00136: 
+  name: openehr
+  group: property
+  code: "381"
+  id: 136
+  rubric: "Amount (Eq) "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00109: 
+  name: openehr
+  group: property
+  code: "346"
+  id: 109
+  rubric: "Momentum  flow rate "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00051: 
+  name: openehr
+  group: participation mode
+  code: "203"
+  id: 51
+  rubric: teleconference
+  mappings: "HL7_ParticipationMode::16546 "
+  lang: en
+  description: "Live verbal communication over teleconference "
+terminology_00165: 
+  name: openehr
+  group: version lifecycle state
+  code: "532"
+  id: 165
+  rubric: complete
+  mappings: ""
+  lang: en
+  description: "Item is complete at time of committal. "
+terminology_00023: 
+  name: openehr
+  group: event math function
+  code: "45"
+  id: 23
+  rubric: minimum
+  mappings: ""
+  lang: en
+  description: "Value of the interval-event is the minimum value of the discrete events which the interval-event summarises. "
+terminology_00137: 
+  name: openehr
+  group: property
+  code: "382"
+  id: 137
+  rubric: "Frequency "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00080: 
+  name: openehr
+  group: subject relationship
+  code: "254"
+  id: 80
+  rubric: parent
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of parent to subject of EHR "
+terminology_00052: 
+  name: openehr
+  group: participation mode
+  code: "204"
+  id: 52
+  rubric: internet telephone
+  mappings: "HL7_ParticipationMode::16546 "
+  lang: en
+  description: "Live verbal communication over a the internet. "
+terminology_00166: 
+  name: openehr
+  group: Instruction transitions
+  code: "532"
+  id: 166
+  rubric: completed
+  mappings: ""
+  lang: en
+  description: "The instruction has been completed "
+terminology_00024: 
+  name: openehr
+  group: property
+  code: "121"
+  id: 24
+  rubric: "Energy "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00138: 
+  name: openehr
+  group: property
+  code: "384"
+  id: 138
+  rubric: "Amount (mole) "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00081: 
+  name: openehr
+  group: subject relationship
+  code: "255"
+  id: 81
+  rubric: biological mother
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of biological mother to subject of EHR "
+terminology_00053: 
+  name: openehr
+  group: participation mode
+  code: "205"
+  id: 53
+  rubric: telephone
+  mappings: "HL7_ParticipationMode::16546 "
+  lang: en
+  description: "Live verbal communication over a telephone. "
+terminology_00167: 
+  name: openehr
+  group: Instruction transitions
+  code: "533"
+  id: 167
+  rubric: expired
+  mappings: ""
+  lang: en
+  description: "The instruction has expired  timed out - and assumed to have either been cancelled  aborted or completed "
+terminology_00025: 
+  name: openehr
+  group: property
+  code: "122"
+  id: 25
+  rubric: "Length "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00139: 
+  name: openehr
+  group: property
+  code: "385"
+  id: 139
+  rubric: "Mass (IU) "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00082: 
+  name: openehr
+  group: subject relationship
+  code: "256"
+  id: 82
+  rubric: biological father
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of biological father to subject of EHR "
+terminology_00054: 
+  name: openehr
+  group: participation mode
+  code: "206"
+  id: 54
+  rubric: asynchronous text; email; fax; letter; handwritten note; SMS message
+  mappings: "HL7_ParticipationMode::V16549 "
+  lang: en
+  description: "Any text-only communication including email  written text  SMS message etc. "
+terminology_00168: 
+  name: openehr
+  group: Instruction transitions
+  code: "535"
+  id: 168
+  rubric: initiate
+  mappings: ""
+  lang: en
+  description: "Initiate the planning of the Instruction. "
+terminology_00026: 
+  name: openehr
+  group: property
+  code: "123"
+  id: 26
+  rubric: "Loudness "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00083: 
+  name: openehr
+  group: subject relationship
+  code: "257"
+  id: 83
+  rubric: cousin
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of cousin to subject of EHR "
+terminology_00055: 
+  name: openehr
+  group: participation mode
+  code: "207"
+  id: 55
+  rubric: email
+  mappings: "HL7_ParticipationMode::16553 [ inlcude HL7_ParticipationMode::16554 (electronic data)] "
+  lang: en
+  description: "Written communication by email. "
+terminology_00110: 
+  name: openehr
+  group: property
+  code: "347"
+  id: 110
+  rubric: "Flow rate  mass "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00169: 
+  name: openehr
+  group: Instruction transitions
+  code: "536"
+  id: 169
+  rubric: plan step
+  mappings: ""
+  lang: en
+  description: "Any step in the planned state of the Instruction  e.g. signing  approving. "
+terminology_00027: 
+  name: openehr
+  group: property
+  code: "124"
+  id: 27
+  rubric: "Mass "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00056: 
+  name: openehr
+  group: participation mode
+  code: "208"
+  id: 56
+  rubric: facsimile/telefax
+  mappings: "HL7_ParticipationMode::16552 "
+  lang: en
+  description: "Non-interactive written communication using a fax machine. "
+terminology_00111: 
+  name: openehr
+  group: property
+  code: "348"
+  id: 111
+  rubric: "Flux  mass "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00028: 
+  name: openehr
+  group: property
+  code: "125"
+  id: 28
+  rubric: "Pressure "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00084: 
+  name: openehr
+  group: subject relationship
+  code: "258"
+  id: 84
+  rubric: adoptive mother
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of adoptive mother to subject of EHR "
+terminology_00112: 
+  name: openehr
+  group: property
+  code: "349"
+  id: 112
+  rubric: "Mass per area "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00029: 
+  name: openehr
+  group: property
+  code: "126"
+  id: 29
+  rubric: "Flow rate  volume "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00085: 
+  name: openehr
+  group: subject relationship
+  code: "259"
+  id: 85
+  rubric: adoptive father
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of adoptive father to subject of EHR "
+terminology_00140: 
+  name: openehr
+  group: composition category
+  code: "431"
+  id: 140
+  rubric: persistent
+  mappings: ""
+  lang: en
+  description: "This Composition contains information which remains valid for (more or less) the life of the EHR. Typical persistent Compositions include family history\xE2\x80\x9D problem list\xE2\x80\x9D current medications\xE2\x80\x9D  and vaccination history\xE2\x80\x9D. The usual change type when creating a new version of a persistent composition is modification\xE2\x80\x9D. "
+terminology_00057: 
+  name: openehr
+  group: participation mode
+  code: "209"
+  id: 57
+  rubric: SMS message
+  mappings: ""
+  lang: en
+  description: "Messages sent via mobile/cell phone "
+terminology_00113: 
+  name: openehr
+  group: property
+  code: "350"
+  id: 113
+  rubric: "Density "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00170: 
+  name: openehr
+  group: Instruction transitions
+  code: "537"
+  id: 170
+  rubric: postpone
+  mappings: ""
+  lang: en
+  description: "Put a planned Instruction on hold  while still in the planning stage  i.e. before it has been booked or started. "
+terminology_00086: 
+  name: openehr
+  group: subject relationship
+  code: "260"
+  id: 86
+  rubric: adopted son
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of adopted son to subject of EHR "
+terminology_00141: 
+  name: openehr
+  group: composition category
+  code: "433"
+  id: 141
+  rubric: event
+  mappings: ""
+  lang: en
+  description: "This composition pertains to a point in time or brief episode. Change types may usually be modificationor  "
+terminology_00058: 
+  name: openehr
+  group: participation mode
+  code: "210"
+  id: 58
+  rubric: printed/typed letter
+  mappings: "HL7_ParticipationMode::16551 "
+  lang: en
+  description: "Written communication by typewritten document. "
+terminology_00171: 
+  name: openehr
+  group: Instruction transitions
+  code: "538"
+  id: 171
+  rubric: restore
+  mappings: ""
+  lang: en
+  description: "Restore a previously postponed Instruction back to the planned state. "
+terminology_00087: 
+  name: openehr
+  group: subject relationship
+  code: "261"
+  id: 87
+  rubric: adopted daughter
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of adopted daughter to subject of EHR "
+terminology_00142: 
+  name: openehr
+  group: property
+  code: "497"
+  id: 142
+  rubric: "Angle  plane "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00059: 
+  name: openehr
+  group: participation mode
+  code: "211"
+  id: 59
+  rubric: handwritten note
+  mappings: "HL7_ParticipationMode::16550 "
+  lang: en
+  description: "Written communication by handwritten document. "
+terminology_00114: 
+  name: openehr
+  group: property
+  code: "351"
+  id: 114
+  rubric: "Flow rate  mass/volume "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00115: 
+  name: openehr
+  group: property
+  code: "352"
+  id: 115
+  rubric: "Flow rate  mass/force "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00088: 
+  name: openehr
+  group: subject relationship
+  code: "262"
+  id: 88
+  rubric: step mother
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of step mother to subject of EHR "
+terminology_00143: 
+  name: openehr
+  group: property
+  code: "498"
+  id: 143
+  rubric: "Electrical charge "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00001: 
+  name: openehr
+  group: subject relationship
+  code: "0"
+  id: 1
+  rubric: self
+  mappings: "HL7_RoleCode:: CEN: "
+  lang: en
+  description: "The party is the subject of EHR "
+terminology_00116: 
+  name: openehr
+  group: property
+  code: "355"
+  id: 116
+  rubric: "Force "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00089: 
+  name: openehr
+  group: subject relationship
+  code: "263"
+  id: 89
+  rubric: step father
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of step father to subject of EHR "
+terminology_00030: 
+  name: openehr
+  group: property
+  code: "127"
+  id: 30
+  rubric: "Temperature "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00172: 
+  name: openehr
+  group: Instruction transitions
+  code: "539"
+  id: 172
+  rubric: schedule
+  mappings: ""
+  lang: en
+  description: "Where booking is required  book the activities in the Instruction in a scheduling system. "
+terminology_00144: 
+  name: openehr
+  group: property
+  code: "499"
+  id: 144
+  rubric: "Light intensity "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00002: 
+  name: openehr
+  group: subject relationship
+  code: "3"
+  id: 2
+  rubric: foetus
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "The party is a foetus "
+terminology_00117: 
+  name: openehr
+  group: property
+  code: "356"
+  id: 117
+  rubric: "Surface tension "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00003: 
+  name: openehr
+  group: subject relationship
+  code: "6"
+  id: 3
+  rubric: donor
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "The party is a donor of organs or other body products to the EHR subject. "
+terminology_00031: 
+  name: openehr
+  group: property
+  code: "128"
+  id: 31
+  rubric: "Time "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00145: 
+  name: openehr
+  group: property
+  code: "500"
+  id: 145
+  rubric: "Angle  solid "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00173: 
+  name: openehr
+  group: Instruction transitions
+  code: "540"
+  id: 173
+  rubric: start
+  mappings: ""
+  lang: en
+  description: "Start executing the activities in the Instruction  e.g. commence drug administration course. "
+terminology_00060: 
+  name: openehr
+  group: participation mode
+  code: "212"
+  id: 60
+  rubric: live text-only; internet chat; SMS chat; interactive written note
+  mappings: ""
+  lang: en
+  description: "Any live text-only communication "
+terminology_00174: 
+  name: openehr
+  group: Instruction transitions
+  code: "540"
+  id: 174
+  rubric: notify aborted
+  mappings: ""
+  lang: en
+  description: "Occurs when notification of Instruction having been aborted is received after expiry. "
+terminology_00061: 
+  name: openehr
+  group: participation mode
+  code: "213"
+  id: 61
+  rubric: internet chat
+  mappings: ""
+  lang: en
+  description: "Live text-only communication over the internet "
+terminology_00146: 
+  name: openehr
+  group: property
+  code: "501"
+  id: 146
+  rubric: "Electrical capacitance "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00032: 
+  name: openehr
+  group: property
+  code: "129"
+  id: 32
+  rubric: "Volume "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00004: 
+  name: openehr
+  group: subject relationship
+  code: "7"
+  id: 4
+  rubric: maternal grandmother
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of maternal grandmother to subject of EHR "
+terminology_00118: 
+  name: openehr
+  group: property
+  code: "357"
+  id: 118
+  rubric: "Force  body "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00090: 
+  name: openehr
+  group: subject relationship
+  code: "264"
+  id: 90
+  rubric: guardian
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of guardianto subject of EHR "
+terminology_00005: 
+  name: openehr
+  group: subject relationship
+  code: "8"
+  id: 5
+  rubric: maternal grandfather
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of maternal grandfather to subject of EHR "
+terminology_00033: 
+  name: openehr
+  group: property
+  code: "130"
+  id: 33
+  rubric: "Work "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00147: 
+  name: openehr
+  group: property
+  code: "502"
+  id: 147
+  rubric: "Electrical conductance "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00119: 
+  name: openehr
+  group: property
+  code: "360"
+  id: 119
+  rubric: "Velocity  dynamic "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00175: 
+  name: openehr
+  group: Instruction transitions
+  code: "541"
+  id: 175
+  rubric: do
+  mappings: ""
+  lang: en
+  description: "Do the activities in the Instruction in one go  taking the state machine directly from the planned to the completed state. Used for Instructions whose activities are instantaneous in the practical sense  e.g. a single vaccination  single tablet. "
+terminology_00176: 
+  name: openehr
+  group: Instruction transitions
+  code: "542"
+  id: 176
+  rubric: postponed step
+  mappings: ""
+  lang: en
+  description: "Any step in the postponed state of the Instruction. "
+terminology_00062: 
+  name: openehr
+  group: participation mode
+  code: "214"
+  id: 62
+  rubric: SMS chat
+  mappings: ""
+  lang: en
+  description: "Live text-only chat over mobile/cell phone "
+terminology_00148: 
+  name: openehr
+  group: property
+  code: "503"
+  id: 148
+  rubric: "Magnetic flux density "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00034: 
+  name: openehr
+  group: event math function
+  code: "144"
+  id: 34
+  rubric: maximum
+  mappings: ""
+  lang: en
+  description: "Value of the interval-event is the maximum value of the discrete events which the interval-event summarises. "
+terminology_00006: 
+  name: openehr
+  group: subject relationship
+  code: "9"
+  id: 6
+  rubric: father
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "The party is the father of the subject of the EHR "
+terminology_00091: 
+  name: openehr
+  group: subject relationship
+  code: "265"
+  id: 91
+  rubric: cohabitee
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Lives with the subject of EHR "
+terminology_00063: 
+  name: openehr
+  group: participation mode
+  code: "215"
+  id: 63
+  rubric: interactive written note
+  mappings: "HL7_ParticipationMode::16550 "
+  lang: en
+  description: "Live text-only communication using written notes "
+terminology_00035: 
+  name: openehr
+  group: event math function
+  code: "146"
+  id: 35
+  rubric: mean
+  mappings: ""
+  lang: en
+  description: "Value of the interval-event is the average value of the discrete events which the interval-event summarises. "
+terminology_00007: 
+  name: openehr
+  group: subject relationship
+  code: "10"
+  id: 7
+  rubric: mother
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "The party is the mother of the subject of EHR "
+terminology_00092: 
+  name: openehr
+  group: event math function
+  code: "267"
+  id: 92
+  rubric: mode
+  mappings: ""
+  lang: en
+  description: "Value of the interval-event is the modal (most common) value of the discrete events which the interval-event summarises. "
+terminology_00149: 
+  name: openehr
+  group: property
+  code: "504"
+  id: 149
+  rubric: "Luminous flux "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00177: 
+  name: openehr
+  group: Instruction transitions
+  code: "543"
+  id: 177
+  rubric: active step
+  mappings: ""
+  lang: en
+  description: "Any step taken during the active phase of the Instruction  e.g. nurse\xE2\x80\x99s observation  adjustment of dose. "
+terminology_00178: 
+  name: openehr
+  group: Instruction transitions
+  code: "544"
+  id: 178
+  rubric: suspend
+  mappings: ""
+  lang: en
+  description: "Suspend the activities from the active phase  with the possibility of later resumption. "
+terminology_00036: 
+  name: openehr
+  group: event math function
+  code: "147"
+  id: 36
+  rubric: change
+  mappings: ""
+  lang: en
+  description: "Value of the interval-event is the net change over the period which the interval-event summarises. "
+terminology_00008: 
+  name: openehr
+  group: subject relationship
+  code: "22"
+  id: 8
+  rubric: partner/spouse
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "The husband or wife or life partner of the subject of EHR "
+terminology_00093: 
+  name: openehr
+  group: event math function
+  code: "268"
+  id: 93
+  rubric: median
+  mappings: ""
+  lang: en
+  description: "Value of the interval-event is the median (centre value in sorted series) value of the discrete events which the interval-event summarises. "
+terminology_00064: 
+  name: openehr
+  group: participation mode
+  code: "216"
+  id: 64
+  rubric: face-to-face communication
+  mappings: "HL7_ParticipationMode::16545 "
+  lang: en
+  description: "Face to face communications between parties in the same room. "
+terminology_00120: 
+  name: openehr
+  group: property
+  code: "361"
+  id: 120
+  rubric: "Velocity  kinematic "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00065: 
+  name: openehr
+  group: participation mode
+  code: "217"
+  id: 65
+  rubric: signing (face-toface)
+  mappings: ""
+  lang: en
+  description: "Live face-to-face communication using a recognised sign language. "
+terminology_00009: 
+  name: openehr
+  group: subject relationship
+  code: "23"
+  id: 9
+  rubric: brother
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of brother to subject of EHR "
+terminology_00094: 
+  name: openehr
+  group: null flavours
+  code: "271"
+  id: 94
+  rubric: no information
+  mappings: "HL7_NullFlavor::V10610 "
+  lang: en
+  description: "No information provided; nothing can be inferred as to the reason why  including whether there might be a possible applicable value or not. "
+terminology_00037: 
+  name: openehr
+  group: event math function
+  code: "148"
+  id: 37
+  rubric: total
+  mappings: ""
+  lang: en
+  description: "Value of the interval-event is the sum of the values of the discrete events which the interval-event summarises (typically differential flow measurements  e.g. blood loss). "
+terminology_00179: 
+  name: openehr
+  group: Instruction transitions
+  code: "545"
+  id: 179
+  rubric: suspended step
+  mappings: ""
+  lang: en
+  description: "Any step taken in the suspended state  e.g. nurse\xE2\x80\x99s observation  pathology test to determine if the Instruction should be resumed  remain suspended or aborted. "
+terminology_00038: 
+  name: openehr
+  group: event math function
+  code: "149"
+  id: 38
+  rubric: variation
+  mappings: ""
+  lang: en
+  description: "Value of the interval-event is difference between the point maximum and point minimum over the period  in other words the value band into which all sample during a period fit. Useful for specifying a maximal allowed variation in a datum to still be considered the same (approximate) value. "
+terminology_00066: 
+  name: openehr
+  group: participation mode
+  code: "218"
+  id: 66
+  rubric: signing over video
+  mappings: ""
+  lang: en
+  description: "Live video communication using sign language. "
+terminology_00121: 
+  name: openehr
+  group: property
+  code: "362"
+  id: 121
+  rubric: "Diffusion coefficient "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00150: 
+  name: openehr
+  group: property
+  code: "505"
+  id: 150
+  rubric: "Illuminance "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00039: 
+  name: openehr
+  group: Instruction transitions
+  code: "166"
+  id: 39
+  rubric: cancel
+  mappings: ""
+  lang: en
+  description: "Cancel a planned Instruction  before it is booked or started. "
+terminology_00095: 
+  name: openehr
+  group: null flavours
+  code: "272"
+  id: 95
+  rubric: masked
+  mappings: "HL7_NullFlavor::17932 "
+  lang: en
+  description: "The value has not been provided due to privacy settings. "
+terminology_00067: 
+  name: openehr
+  group: participation mode
+  code: "219"
+  id: 67
+  rubric: physically present
+  mappings: "HL7_ParticipationMode::16556 "
+  lang: en
+  description: "Participation by actions  where the participant is physically present. "
+terminology_00122: 
+  name: openehr
+  group: property
+  code: "365"
+  id: 122
+  rubric: "Energy per area "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00180: 
+  name: openehr
+  group: Instruction transitions
+  code: "546"
+  id: 180
+  rubric: resume
+  mappings: ""
+  lang: en
+  description: "Resume the Instruction from the suspended state. "
+terminology_00068: 
+  name: openehr
+  group: participation mode
+  code: "220"
+  id: 68
+  rubric: physically remote
+  mappings: "HL7_ParticipationMode::16557 "
+  lang: en
+  description: "Participation by actions  where the participant is not physically present  and the actions are transmitted by electronic means. "
+terminology_00096: 
+  name: openehr
+  group: null flavours
+  code: "273"
+  id: 96
+  rubric: not applicable
+  mappings: "HL7_NullFlavor::10611 "
+  lang: en
+  description: "No valid value exists for this data item. "
+terminology_00123: 
+  name: openehr
+  group: property
+  code: "366"
+  id: 123
+  rubric: "Energy density "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00151: 
+  name: openehr
+  group: property
+  code: "506"
+  id: 151
+  rubric: "Radioactivity "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00152: 
+  name: openehr
+  group: property
+  code: "507"
+  id: 152
+  rubric: "Proportion "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00124: 
+  name: openehr
+  group: property
+  code: "367"
+  id: 124
+  rubric: "Power  linear "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00010: 
+  name: openehr
+  group: subject relationship
+  code: "24"
+  id: 10
+  rubric: sister
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of sister to subject of EHR "
+terminology_00097: 
+  name: openehr
+  group: property
+  code: "334"
+  id: 97
+  rubric: "Electrical current "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00069: 
+  name: openehr
+  group: participation mode
+  code: "221"
+  id: 69
+  rubric: translated text
+  mappings: "HL7_ParticipationMode::V16549 "
+  lang: en
+  description: "Non-interactive written communication requiring translation "
+terminology_00181: 
+  name: openehr
+  group: Instruction transitions
+  code: "547"
+  id: 181
+  rubric: abort
+  mappings: ""
+  lang: en
+  description: "Abort the Instruction  i.e. stop its execution permanently after it has started. "
+terminology_00182: 
+  name: openehr
+  group: Instruction transitions
+  code: "548"
+  id: 182
+  rubric: finish
+  mappings: ""
+  lang: en
+  description: "Finish performing the Instruction  taking it to the completed state. "
+terminology_00098: 
+  name: openehr
+  group: property
+  code: "335"
+  id: 98
+  rubric: "Area "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00011: 
+  name: openehr
+  group: subject relationship
+  code: "25"
+  id: 11
+  rubric: step or half brother
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of step or half brother to subject of EHR "
+terminology_00125: 
+  name: openehr
+  group: property
+  code: "368"
+  id: 125
+  rubric: "Power flux "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00153: 
+  name: openehr
+  group: property
+  code: "508"
+  id: 153
+  rubric: "Energy dose "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00154: 
+  name: openehr
+  group: event math function
+  code: "521"
+  id: 154
+  rubric: decrease
+  mappings: ""
+  lang: en
+  description: "This is a change - as in 147 - except indicates that the value  while a positive number  is actually a negative change. Typically used for negative changes like weight loss: 5kgor blood pressure postural drop of 10 mm[Hg]\xE2\x80\x9D. "
+terminology_00126: 
+  name: openehr
+  group: property
+  code: "369"
+  id: 126
+  rubric: "Power density "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00099: 
+  name: openehr
+  group: property
+  code: "336"
+  id: 99
+  rubric: "Specific volume "
+  mappings: ""
+  lang: en
+  description: ""
+terminology_00012: 
+  name: openehr
+  group: subject relationship
+  code: "26"
+  id: 12
+  rubric: step or half sister
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of step or half sister to subject of EHR "
+terminology_00040: 
+  name: openehr
+  group: subject relationship
+  code: "189"
+  id: 40
+  rubric: neonate
+  mappings: "HL7: CEN: "
+  lang: en
+  description: "Relationship of neonate to subject of EHR "
Index: /ruby/tags/release-0.5.0/test/functional/terminology_controller_test.rb
===================================================================
--- /ruby/tags/release-0.5.0/test/functional/terminology_controller_test.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/test/functional/terminology_controller_test.rb	(revision 367)
@@ -0,0 +1,27 @@
+require 'test_helper'
+
+class TerminologyControllerTest < ActionController::TestCase
+  fixtures :terminologies
+
+#  def setup
+#    @controller = TerminologyController.new
+#    @request = ActionController::TestRequest.new
+#    @response = ActionController::TestResponse.new
+#  end
+
+  def test_generate_get_route
+    assert_generates('/terminology/openehr/en/1', :controller => 'terminology',
+                     :action => 'show', :name => 'openehr', :lang => 'en',
+                     :code => '1')
+  end
+
+  def test_should_get
+    get :show, :name => 'openehr', :lang => 'en', :code => '0'
+    assert_select 'rubric', 'self'
+  end
+
+  def test_shoud_get_not_found
+    get :show, :name => 'openehr', :lang => 'en', :code => '1'
+    assert_response :missing
+  end
+end
Index: /ruby/tags/release-0.5.0/test/test_helper.rb
===================================================================
--- /ruby/tags/release-0.5.0/test/test_helper.rb	(revision 367)
+++ /ruby/tags/release-0.5.0/test/test_helper.rb	(revision 367)
@@ -0,0 +1,38 @@
+ENV["RAILS_ENV"] = "test"
+require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
+require 'test_help'
+
+class ActiveSupport::TestCase
+  # Transactional fixtures accelerate your tests by wrapping each test method
+  # in a transaction that's rolled back on completion.  This ensures that the
+  # test database remains unchanged so your fixtures don't have to be reloaded
+  # between every test method.  Fewer database queries means faster tests.
+  #
+  # Read Mike Clark's excellent walkthrough at
+  #   http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting
+  #
+  # Every Active Record database supports transactions except MyISAM tables
+  # in MySQL.  Turn off transactional fixtures in this case; however, if you
+  # don't care one way or the other, switching from MyISAM to InnoDB tables
+  # is recommended.
+  #
+  # The only drawback to using transactional fixtures is when you actually 
+  # need to test transactions.  Since your test is bracketed by a transaction,
+  # any transactions started in your code will be automatically rolled back.
+  self.use_transactional_fixtures = true
+
+  # Instantiated fixtures are slow, but give you @david where otherwise you
+  # would need people(:david).  If you don't want to migrate your existing
+  # test cases which use the @david style and don't mind the speed hit (each
+  # instantiated fixtures translates to a database query per test method),
+  # then set this back to true.
+  self.use_instantiated_fixtures  = false
+
+  # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
+  #
+  # Note: You'll currently still have to declare fixtures explicitly in integration tests
+  # -- they do not yet inherit this setting
+  fixtures :all
+
+  # Add more helper methods to be used by all tests here...
+end
