26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/openehr/parser/adl_parser.rb', line 26
def parse
archetype_id = OpenEHR::RM::Support::Identification::ArchetypeID.new(:value => @result.archetype_id)
ontology = @result.ontology
original_language = nil
if @result.original_language
original_language = @result.original_language
else
terminology_id = OpenEHR::RM::Support::Identification::TerminologyID.new(:value => 'ISO639-1')
original_language = OpenEHR::RM::DataTypes::Text::CodePhrase.new(:terminology_id => terminology_id,
:code_string =>ontology.primary_language)
end
archetype = OpenEHR::AM::Archetype::Archetype.new(:archetype_id => archetype_id,
:adl_version => @result.adl_version,
:concept => @result.concept,
:original_language => original_language,
:translations => @result.translations,
:description => @result.description,
:definition => @result.definition,
:ontology => @result.ontology)
return archetype
end
|