Ignore:
Timestamp:
Aug 6, 2009, 1:20:05 AM (15 years ago)
Author:
KOBAYASHI, Shinji
Message:

adjust for rails

Location:
ruby/branches/0.0/models/rm
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • ruby/branches/0.0/models/rm/common/archetyped.rb

    r8 r167  
    1 module OpenEHR
     1module OpenEhr
    22  module RM
    33    module Common
    44      module Archetyped
    5         module Locater_Constants
     5        module LocaterConstants
    66          CURRENT_TRANSACTION_ID = "current"
    77          FRAGMENT_SEPARATOR = "#"
     
    3232        end
    3333        class Locatable < Pathable
    34           include Locater_Constants
     34          include LocaterConstants
    3535          attr_accessor :uid, :archetype_node_id, :archetype_details
    3636          attr_accessor :feeder_audit, :links, :parent
  • ruby/branches/0.0/models/rm/common/generic.rb

    r4 r167  
    1 module OpenEHR
     1module OpenEhr
    22  module RM
    33    module Common
    44      module Generic
    5         class Revision_History
    6         end # of Revision_History
     5        class RevisionHistory
     6        end # of RevisionHistory
    77      end # of Generic
    88    end # of Common
  • ruby/branches/0.0/models/rm/common/resource.rb

    r24 r167  
    11require 'set'
    2 module OpenEHR
     2module OpenEhr
    33  module RM
    44    module Common
  • ruby/branches/0.0/models/rm/composition/content/entry.rb

    r4 r167  
    1 module OpenEHR
     1module OpenEhr
    22  module RM
    33    module Content
     
    55        class Entry < Content_Item
    66        end
    7         class Care_Entry < Entry
     7        class CareEntry < Entry
    88        end
    9         class Action < Care_Entry
     9        class Action < CareEntry
    1010          attr_accessor :description, :time
    1111          attr_accessor :ism_transition, :instruction_details
  • ruby/branches/0.0/models/rm/data_types/basic.rb

    r4 r167  
    1 module OpenEHR
     1module OpenEhr
    22  module RM
    3     module Data_Types
     3    module DataTypes
    44      module Basic
    5         module Canonical_Fragment
     5        module CanonicalFragment
    66        end
    77
    8         class Data_Value
    9           include OpenEHR::RM::Support::Definition::Basic_Definition
     8        class DataValue
     9          include OpenEhr::RM::Support::Definition::BasicDefinition
    1010        end
    1111
    12         class DV_Boolean < Data_Value
     12        class DvBoolean < DataValue
    1313          def initialize(value)
    1414            check_not_nil(value)
     
    3232            end
    3333          end
    34         end  # end of DV_Boolean
     34        end  # end of DvBoolean
    3535
    36         class DV_State < Data_Value
     36        class DvState < DataValue
    3737          attr_accessor :value
    3838          attr_writer :terminal
     
    4747            @terminal == true
    4848          end
    49         end # end of DV_State
     49        end # end of DvState
    5050
    51         class DV_Identifier
     51        class DvIdentifier
    5252          attr_accessor :issuer, :assigner, :id, :type
    5353          def initialize(assigner, id, issuer, type)
     
    6060            @type = type
    6161          end
    62         end #end of DV_Identifier
     62        end #end of DvIdentifier
    6363      end # end of Basic
    6464    end # end of Data_types
  • ruby/branches/0.0/models/rm/data_types/encapslated.rb

    r4 r167  
    1 module OpenEHR
     1module OpenEhr
    22  module RM
    3     module Data_Types
     3    module DataTypes
    44      module Encapsulated
    5         class DV_Encapsulated  < OpenEHR::RM::Data_Types::Basic::Data_Value
     5        class DvEncapsulated  < OpenEhr::RM::DataTypes::Basic::DataValue
    66          attr_accessor :charset, :language
    77          def size
     
    1313          end
    1414        end
    15         class DV_Multimedia < DV_Encapsulated
     15        class DvMultimedia < DvEncapsulated
    1616         
    1717        end
    18         class DV_Parsable < DV_Encapsulated
     18        class DvParsable < DvEncapsulated
    1919          attr_reader :value, :formalism
    2020          def initialize(value, formalism, charset = nil, language = nil)
  • ruby/branches/0.0/models/rm/data_types/quantity/data_time.rb

    r4 r167  
    1 module OpenEHR
     1module OpenEhr
    22  module RM
    3     module Data_Types
     3    module DataTypes
    44      module Quantity
    55        module Date_
  • ruby/branches/0.0/models/rm/data_types/text.rb

    r4 r167  
    1 module OpenEHR
     1module OpenEhr
    22  module RM
    3     module Data_Types
     3    module DataTypes
    44      module Text
    5         class Term_Mapping
     5        class TermMapping
    66          attr_reader :match, :purpose, :target
    77          def initialize(match, purpose, target)
     
    2323            match == '?'
    2424          end
    25           def Term_Mapping.is_valid_mach_code?(c)
     25          def TermMapping.is_valid_mach_code?(c)
    2626            c == '>' or c == '=' or c == '<' or c == '?'
    2727          end
     
    3131          end
    3232          def purpose_valid(purpose)
    33             if !purpose.nil? and !purpose.instance_of? DV_Coded_Text
     33            if !purpose.nil? and !purpose.instance_of? DvCodedText
    3434              raise ArgumentError, "purpose is not valid"
    3535            end
     
    4141        end
    4242
    43         class Code_Phrase
     43        class CodePhrase
    4444          attr_reader :terminology_id, :code_string
    4545          def initialize(terminology_id, code_string)
     
    5050              raise Exception.new("empty codeString")
    5151            end
    52             if terminology_id.instance_of?(Terminology_ID)
     52            if terminology_id.instance_of?(TerminologyId)
    5353              @terminology_id = terminology_id
    5454            else
    55               @terminologyID = Terminology_ID.new(terminology_id)
     55              @terminologyID = TerminologyId.new(terminology_id)
    5656            end
    5757            @code_string = code_string
    5858          end
    59         end # of Code_Phrase
     59        end # of CodePhrase
    6060
    61         class DV_Text < OpenEHR::RM::Data_Types::Basic::Data_Value
     61        class DvText < OpenEhr::RM::DataTypes::Basic::DataValue
    6262          attr_reader :value, :formatting, :hyperlink, :mappings
    6363          attr_reader :language, :encoding
     
    6565                         mappings = nil, language = nil, encoding = nil)
    6666            value_valid(value)
    67             DV_Text.formatting_valid(formatting)
    68             DV_Text.encoding_valid(encoding)
    69             DV_Text.mapping_valid(mappings)
    70             DV_Text.language_valid(language)
     67            DvText.formatting_valid(formatting)
     68            DvText.encoding_valid(encoding)
     69            DvText.mapping_valid(mappings)
     70            DvText.language_valid(language)
    7171            @value, @formatting, @encoding = value, formatting, encoding
    7272            @mappings, @language = mappings, language
     
    7777          end
    7878          def formatting=(formatting)
    79             DV_Text.formatting_valid(formatting)
     79            DvText.formatting_valid(formatting)
    8080            @formatting = formatting
    8181          end
    8282          def encoding=(encoding)
    83             DV_Text.encoding_valid(encoding)
     83            DvText.encoding_valid(encoding)
    8484            @encoding = encoding
    8585          end
    8686          def mappings=(mappings)
    87             DV_Text.mapping_valid(mappings)
     87            DvText.mapping_valid(mappings)
    8888            @mappings = mappings
    8989          end
    9090          def language=(language)
    91             DV_Text.language_valid(language)
     91            DvText.language_valid(language)
    9292            @language = language
    9393          end
     
    9696            if value.nil? or value.empty? or value.include? CR or value.include? LF
    9797              raise ArgumentError, "value is not valid"
    98               # CR and LF are defined in Basic_Definition inherited Data_Value.
     98              # CR and LF are defined in Basic_Definition inherited DataValue.
    9999            end
    100100          end
     
    125125        end
    126126
    127         class DV_Coded_Text < DV_Text
     127        class DvCodedText < DvText
    128128          attr_reader :defining_code
    129129          def initialize(value, defining_code, formatting = nil,
     
    144144        end
    145145
    146         class DV_Paragraph < OpenEHR::RM::Data_Types::Basic::Data_Value
     146        class DvParagraph < OpenEhr::RM::DataTypes::Basic::DataValue
    147147          attr_reader :items
    148148          def initialize(items)
  • ruby/branches/0.0/models/rm/data_types/time_specification.rb

    r5 r167  
    1 module OpenEHR
     1module OpenEhr
    22  module RM
    3     module Data_Types
    4       module Time_Specification
    5         class DV_Time_Specification < OpenEHR::RM::Data_Types::Basic::Data_Value
     3    module DataTypes
     4      module TimeSpecification
     5        class DvTimeSpecification < OpenEhr::RM::DataTypes::Basic::DataValue
    66          def initialize(value)
    77            @value = value
     
    1818        end
    1919       
    20         class DV_General_Time_Specification < DV_Time_Specification
     20        class DvGeneralTimeSpecification < DvTimeSpecification
    2121          attr_reader :value
    2222          def initialize(value)
     
    3434        end
    3535
    36         class DV_Periodic_Time_Specification < DV_Time_Specification
     36        class DvPeriodicTimeSpecification < DvTimeSpecification
    3737          attr_reader :value
    3838          def initialize(value)
  • ruby/branches/0.0/models/rm/data_types/uri.rb

    r4 r167  
    11require 'uri'
    22#require 'uri/generic'
    3 module URI
    4   class EHR < ::URI::Generic
     3module Uri
     4  class Ehr < ::URI::Generic
    55    COMPONENT = [
    66      :scheme, :path, :fragment, :query
     
    1717    end
    1818  end
    19   @@schemes['EHR'] = EHR
     19  @@schemes['EHR'] = Ehr
    2020end
    21 module OpenEHR
     21module OpenEhr
    2222  module RM
    23     module Data_Types
    24       module URI
    25         class DV_URI < OpenEHR::RM::Data_Types::Basic::Data_Value
     23    module DataTypes
     24      module Uri
     25        class DvUri < OpenEhr::RM::DataTypes::Basic::DataValue
    2626          def initialize(value)
    2727            raise ArgumentError, "value is empty" if value.nil?
     
    5151          end
    5252        end
    53         class DV_EHR_URI < DV_URI
     53        class DvEhrUri < DvUri
    5454          def initialize(value)
    5555            check_value(value)
  • ruby/branches/0.0/models/rm/demographic.rb

    r10 r167  
    1 module OpenEHR
     1module OpenEhr
    22  module RM
    33    module Demogrphic
    4       class Party < OpenEHR::RM::Common::Archetyped::Locatable
     4      class Party < OpenEhr::RM::Common::Archetyped::Locatable
    55        attr_reader :details, :reverse_relationships, :uid
    66        attr_reader :idetities, :contacts, :relationships
  • ruby/branches/0.0/models/rm/support/assumed_types.rb

    r4 r167  
    1 module OpenEHR
     1module OpenEhr
    22  module RM
    33    module Support
    4       module Assumed_Types
     4      module AssumedTypes
    55        class Interval
    66          attr_accessor :lower, :upper
  • ruby/branches/0.0/models/rm/support/definition.rb

    r4 r167  
    1 module OpenEHR
     1module OpenEhr
    22  module RM
    33    module Support
    44      module Definition
    5         module Basic_Definition
     5        module BasicDefinition
    66          CR = "\015"
    77          LF = "\012"
    88        end
    9         class OpenEHR_Definitions
    10           include Basic_Definition         
     9        class OpenEHRDefinitions
     10          include BasicDefinition
    1111        end
    1212      end
  • ruby/branches/0.0/models/rm/support/identification.rb

    r26 r167  
    1 module OpenEHR
     1module OpenEhr
    22  module RM
    33    module Support
  • ruby/branches/0.0/models/rm/support/terminology.rb

    r4 r167  
    11
    2 module OpenEHR
     2module OpenEhr
    33  module RM
    44    module Support
    55      module Terminology
    6         class Code_Set_Access
     6        class CodeSetAccess
    77          def all_codes
    88            raise NotImplementedError, "all_codes must be implemented"
     
    1818          end
    1919        end
    20         module OpenEHR_Code_Set_Identifier
     20        module OpenEhrCodeSetIdentifier
    2121          CODE_SET_ID_CHARACER_SETS = "character sets".freeze
    2222          CODE_SET_ID_COMPRESSION_ALGORITHMS = "compression algorithms".freeze
     
    2929          end
    3030        end
    31         module OpenEHR_Terminology_Group_Identifiers
     31        module OpenEhrTerminologyGroupIdentifiers
    3232          GROUP_ID_ATTESTATION_REASON = "attestation reason".freeze
    3333          GROUP_ID_AUDIT_CHANGE_TYPE = "audit change type".freeze
     
    4646          TERMINOLOGY_ID = "openehr".freeze
    4747        end
    48         class Terminology_Access
     48        class TerminologyAccess
    4949          def all_codes
    5050            raise NotImplementedError, "all_codes is not implemented"
     
    7474          end
    7575        end
    76         class Terminology_Service
    77           include OpenEHR_Code_Set_Identifier, OpenEHR_Terminology_Group_Identifiers
     76        class TerminologyService
     77          include OpenEhrCodeSetIdentifier, OpenEhrTerminologyGroupIdentifiers
    7878          def code_set(name)
    7979            raise NotImplementedError, "code_set is not implemented"
Note: See TracChangeset for help on using the changeset viewer.