Index: ruby/trunk/adl_parser/tests/openEHR-EHR-ACTION.imaging.v1.adl
===================================================================
--- ruby/trunk/adl_parser/tests/openEHR-EHR-ACTION.imaging.v1.adl	(revision 15)
+++ ruby/trunk/adl_parser/tests/openEHR-EHR-ACTION.imaging.v1.adl	(revision 15)
@@ -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/trunk/adl_parser/tests/openEHR-EHR-COMPOSITION.discharge.v1draft.adl
===================================================================
--- ruby/trunk/adl_parser/tests/openEHR-EHR-COMPOSITION.discharge.v1draft.adl	(revision 15)
+++ ruby/trunk/adl_parser/tests/openEHR-EHR-COMPOSITION.discharge.v1draft.adl	(revision 15)
@@ -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/trunk/adl_parser/tests/openEHR-EHR-COMPOSITION.encounter.v1draft.adl
===================================================================
--- ruby/trunk/adl_parser/tests/openEHR-EHR-COMPOSITION.encounter.v1draft.adl	(revision 15)
+++ ruby/trunk/adl_parser/tests/openEHR-EHR-COMPOSITION.encounter.v1draft.adl	(revision 15)
@@ -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"] = <"2005-10-10">
+	>
+	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/trunk/adl_parser/tests/openEHR-EHR-EVALUATION.adverse.v1.adl
===================================================================
--- ruby/trunk/adl_parser/tests/openEHR-EHR-EVALUATION.adverse.v1.adl	(revision 15)
+++ ruby/trunk/adl_parser/tests/openEHR-EHR-EVALUATION.adverse.v1.adl	(revision 15)
@@ -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/trunk/adl_parser/tests/openEHR-EHR-OBSERVATION.apgar.v1.adl
===================================================================
--- ruby/trunk/adl_parser/tests/openEHR-EHR-OBSERVATION.apgar.v1.adl	(revision 15)
+++ ruby/trunk/adl_parser/tests/openEHR-EHR-OBSERVATION.apgar.v1.adl	(revision 15)
@@ -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"] = <"2004-05-18">
+        ["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/trunk/adl_parser/tests/parser_test.rb
===================================================================
--- ruby/trunk/adl_parser/tests/parser_test.rb	(revision 14)
+++ ruby/trunk/adl_parser/tests/parser_test.rb	(revision 15)
@@ -84,28 +84,48 @@
     end
 
-     dimensions_circumference = File.read('tests/openEHR-EHR-CLUSTER.dimensions.v1.adl')
+    dimensions_circumference = File.read('tests/openEHR-EHR-CLUSTER.dimensions.v1.adl')
+    assert_nothing_raised do
+      @parser.parse(dimensions_circumference, 'openEHR-EHR-CLUSTER.dimensions.v1.adl')
+    end
+    discharge = File.read('tests/openEHR-EHR-COMPOSITION.discharge.v1draft.adl')
+    assert_nothing_raised do
+      @parser.parse(discharge, 'openEHR-EHR-COMPOSITION.discharge.v1draft.adl')
+    end
+    imaging = File.read('tests/openEHR-EHR-ACTION.imaging.v1.adl')
+    assert_nothing_raised do
+      @parser.parse(imaging, 'openEHR-EHR-ACTION.imaging.v1.adl')
+    end
+    apgar = File.read('tests/openEHR-EHR-OBSERVATION.apgar.v1.adl')
+    assert_nothing_raised do
+      @parser.parse(apgar, 'openEHR-EHR-OBSERVATION.apgar.v1.adl')
+    end
+#     evaluation = File.read('tests/openEHR-EHR-EVALUATION.adverse.v1.adl')
+#     assert_nothing_raised do
+#       @parser.parse(evaluation, 'openEHR-EHR-EVALUATION.adverse.v1.adl')
+#     end
+#     encounter = File.read('tests/openEHR-EHR-COMPOSITION.encounter.v1draft.adl')
+#     assert_nothing_raised do
+#       @parser.parse(encounter, 'openEHR-EHR-COMPOSITION.encounter.v1draft.adl')
+#     end
+#       medication = File.read('tests/openEHR-EHR-ITEM_TREE.medication.v1.adl')
+#       assert_nothing_raised do
+#         @parser.parse(medication, 'openEHR-EHR-ITEM_TREE.medication.v1.adl')
+#       end
+#      referral = File.read('tests/openEHR-EHR-ITEM_TREE.referral.v1.adl')
+#      assert_nothing_raised do
+#        @parser.parse(referral, 'openEHR-EHR-ITEM_TREE.referral.v1.adl')
+#      end
+     laboratory_request = File.read('tests/openEHR-EHR-ITEM_TREE.Laboratory_request.v1.adl')
      assert_nothing_raised do
-       @parser.parse(dimensions_circumference, 'openEHR-EHR-CLUSTER.dimensions.v1.adl')
+       @parser.parse(laboratory_request, 'openEHR-EHR-ITEM_TREE.Laboratory_request.v1.adl')
      end
-#     medication = File.read('tests/openEHR-EHR-ITEM_TREE.medication.v1.adl')
-#     assert_nothing_raised do
-#       @parser.parse(medication, 'openEHR-EHR-ITEM_TREE.medication.v1.adl')
-#     end
-#     referral = File.read('tests/openEHR-EHR-ITEM_TREE.referral.v1.adl')
-#     assert_nothing_raised do
-#       @parser.parse(referral, 'openEHR-EHR-ITEM_TREE.referral.v1.adl')
-#     end
-#     laboratory_request = File.read('tests/openEHR-EHR-ITEM_TREE.Laboratory_request.v1.adl')
-#     assert_nothing_raised do
-#       @parser.parse(laboratory_request, 'openEHR-EHR-ITEM_TREE.Laboratory_request.v1.adl')
-#     end
-#     exam_fetus = File.read('tests/openEHR-EHR-CLUSTER.exam-fetus.v1.adl')
-#     assert_nothing_raised do
-#       @parser.parse(exam_fetus, 'openEHR-EHR-CLUSTER.exam-fetus.v1.adl')
-#     end
-#     exam_uterine_cervix = File.read('tests/openEHR-EHR-CLUSTER.exam-uterine_cervix.v1.adl')
-#     assert_nothing_raised do
-#       @parser.parse(exam_uterine_cervix, 'openEHR-EHR-CLUSTER.exam-uterine_cervix.v1.adl')
-#     end
+#      exam_fetus = File.read('tests/openEHR-EHR-CLUSTER.exam-fetus.v1.adl')
+#      assert_nothing_raised do
+#        @parser.parse(exam_fetus, 'openEHR-EHR-CLUSTER.exam-fetus.v1.adl')
+#      end
+#      exam_uterine_cervix = File.read('tests/openEHR-EHR-CLUSTER.exam-uterine_cervix.v1.adl')
+#      assert_nothing_raised do
+#        @parser.parse(exam_uterine_cervix, 'openEHR-EHR-CLUSTER.exam-uterine_cervix.v1.adl')
+#      end
 
   end
