Ignore:
Timestamp:
Apr 25, 2010, 5:21:15 PM (14 years ago)
Author:
KOBAYASHI, Shinji
Message:

implemented adl_serializer ontology spec

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ruby/trunk/lib/open_ehr/serializer.rb

    r411 r412  
    105105        ontology = 'ontology'+NL
    106106        ontology << INDENT + 'term_definitions = <' + NL
    107         ao.term_codes.each do |term, items|
    108           ontology << INDENT*2 + "[\"#{term}\"] = <" + NL
     107        ao.term_definitions.each do |lang, items|
     108          ontology << INDENT*2 + "[\"#{lang}\"] = <" + NL
    109109          ontology << INDENT*3 + 'items = <'  + NL
    110           items.each do |code, attribute|
    111             ontology << INDENT*4 + "[\"#{code}\] = <" + NL
    112             terms.each do |name, description|
    113               ontology << INDENT*5 + "#{name} = <\"#{description}\">" +NL
     110          items.each do |item|
     111            ontology << INDENT*4 + "[\"#{item.code}\"] = <" + NL           
     112            item.items.each do |name, desc|
     113              ontology << INDENT*5 + "#{name} = <\"#{desc}\">" +NL
    114114            end
    115115            ontology << INDENT*4 + '>'+NL
    116116          end
    117           ontogoly << INDENT*3 + '>' + NL
     117          ontology << INDENT*3 + '>' + NL
    118118          ontology << INDENT*2 + '>' + NL
    119119        end
Note: See TracChangeset for help on using the changeset viewer.