Ignore:
Timestamp:
Apr 23, 2010, 12:00:31 AM (14 years ago)
Author:
KOBAYASHI, Shinji
Message:

fixed archetype ontology bugs

File:
1 edited

Legend:

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

    r410 r411  
    102102
    103103      def ontology
     104        ao = @archetype.ontology
     105        ontology = 'ontology'+NL
     106        ontology << INDENT + 'term_definitions = <' + NL
     107        ao.term_codes.each do |term, items|
     108          ontology << INDENT*2 + "[\"#{term}\"] = <" + NL
     109          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
     114            end
     115            ontology << INDENT*4 + '>'+NL
     116          end
     117          ontogoly << INDENT*3 + '>' + NL
     118          ontology << INDENT*2 + '>' + NL
     119        end
     120        ontology << INDENT + '>' + NL
    104121      end
    105122
Note: See TracChangeset for help on using the changeset viewer.