Ignore:
Timestamp:
Apr 30, 2008, 8:34:43 PM (16 years ago)
Author:
Tatsukawa, Akimichi
Message:

created an experimental openehr_models gem package

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ruby/trunk/models/am/archetype/archetype.rb

    r4 r21  
    99        CURRENT_ADL_VERSION = "2.0"
    1010      end
    11       class Archetype < OpenEHR::RM::Common::Resource::Authored_Resource
     11
     12      class ARCHETYPE < OpenEHR::RM::Common::Resource::Authored_Resource
    1213        include ADL_Definition
    1314        attr_accessor :archetype_id, :concept_code, :is_controlled, :original_language, :parent_archtype_id, :uid
     
    1819        attr_accessor :revision_history, :translation
    1920
    20         def initialize(parent_id, concept,
    21                        description, revision_history, is_controled,
    22                        definition, ontology, adl_version,
    23                        id = nil , original_language = nil, translation = nil)
     21        def initialize(args = {})
     22#         def initialize(parent_id, concept,
     23#                        description, revision_history, is_controled,
     24#                        definition, ontology, adl_version,
     25#                        id = nil , original_language = nil, translation = nil)
    2426#          raise Exception.new("illegal argument error, id == nil") unless id
    2527#          raise Exception.new("illegal argument error, originalLanguage == nil") unless origina_language
    2628
    2729#          raise Exception.new("illegal argument error, translation == nil") unless translation
    28           @adl_version = adl_version
    29           @id = id
    30           @parent_id = parent_id
    31           @concept = concept
    32           @original_language = original_language
    33           @translation = translation
    34           @description = description
    35           @revision_history = revision_history
    36           @is_controled = is_controled
    37           @definition = definition
    38           @ontology = ontology
     30          @adl_version = args[:adl_version] if args[:adl_version]
     31          @id = args[:id] ? args[:id] : nil
     32          @parent_id = args[:parent_id] if args[:parent_id]
     33          @concept = args[:concept] if args[:concept]
     34          @original_language = args[:original_language] ? args[:original_language] : nil
     35          @translation = args[:translation] ? args[:translation] : nil
     36          @description = args[:description] if args[:description]
     37          @revision_history = args[:revision_history] if args[:revision_history]
     38          @is_controled = args[:is_controled] if args[:is_controled]
     39          @definition = args[:definition] if args[:definition]
     40          @ontology = args[:ontology] if args[:ontology]
    3941 #         loadMaps(definition)
    4042        end
Note: See TracChangeset for help on using the changeset viewer.