Changeset 7


Ignore:
Timestamp:
2008/02/13 08時31分25秒 (4 years ago)
Author:
skoba
Message:

demographic class added

Location:
ruby/trunk/models
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ruby/trunk/models/rm.rb

    r4 r7  
    1212module OpenEHR 
    1313  module RM 
     14    autoload :Demographic, "rm/demographic.rb" 
    1415    module Common 
    1516      autoload :Resource, "rm/common/resource.rb" 
  • ruby/trunk/models/rm/common/archetyped.rb

    r4 r7  
    3030            raise NotImplementError, "path_unique must be implemented" 
    3131          end 
    32         module 
     32        end 
    3333        class Locatable < Pathable 
    3434          include Locater_Constants 
     
    3838                         feeder_audit, links, parent) 
    3939            super(parent) 
    40             if archetype_node_id == nil 
     40            if archetype_node_id.nil? 
    4141              raise ArgumentError, "null archetype_node_id" 
    4242            end 
    43             if name == nil 
     43            if name.nil? 
    4444              raise ArgumentError, "name is empty" 
    4545            end 
    46             if links == nil 
     46            if links.nil? 
    4747              raise ArgumentError, "links is empty" 
    4848            end 
     
    5454          end 
    5555          def item_at_path(path) 
    56             if @path == nil 
    57  
     56            if !@path.nil? 
     57              if @path == "" 
     58                raise ArgumentError, "path is not valid" 
     59              end 
     60            end 
    5861          end 
    59           def items_at_path 
     62          def items_at_path(path) 
    6063            raise NotImplementError, "items_at_path must be implemented" 
    6164          end 
     
    6972          end 
    7073          def is_archetype_root? 
    71             archetype_details != nil 
     74            !archetype_details.nil? 
    7275          end 
    7376        end 
  • ruby/trunk/models/rm/demographic.rb

    r6 r7  
    22  module RM 
    33    module Demogrphic 
    4  
     4      class Party < OpenEHR::RM::Common::Archetyped::Locatable 
     5        attr_reader :details, :reverse_relationships, :uid 
     6        attr_reader :idetities, :contacts, :relationships 
     7        def type 
     8        end 
     9      end 
    510    end # of Demographic 
    611  end # of RM 
Note: See TracChangeset for help on using the changeset viewer.