Changeset 5


Ignore:
Timestamp:
Feb 11, 2008, 10:03:27 PM (13 years ago)
Author:
KOBAYASHI, Shinji
Message:

undetermined specification

File:
1 edited

Legend:

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

    r4 r5  
    44      module Time_Specification
    55        class DV_Time_Specification < OpenEHR::RM::Data_Types::Basic::Data_Value
    6           attr_accessor :value
    76          def initialize(value)
    87            @value = value
     
    3130          private
    3231          def value_valid(value)
    33             raise ArgumentError, "value is not valied" if value.formalism.is_equal?('HL7:GTS')
     32            raise ArgumentError, "value is not valied" if !value.formalism.is_equal?('HL7:GTS')
     33          end
     34        end
     35
     36        class DV_Periodic_Time_Specification < DV_Time_Specification
     37          attr_reader :value
     38          def initialize(value)
     39            value_valid(value)
     40            super(value)
     41          end
     42          def calender_alignment
     43          end
     44          def event_alignment
     45          end
     46          def institution_specified?
     47          end
     48          def period
     49          end
     50          private
     51          def value_valid(value)
     52            if !value.formalism.is_equal('HL7:PIVL') && value.formalism.is_equal('HL7:EIVL')
     53              raise ArgumentError, "value is not valid"
     54            end
    3455          end
    3556        end
Note: See TracChangeset for help on using the changeset viewer.