Changeset 5 for ruby/trunk/models/rm
- Timestamp:
- Feb 11, 2008, 10:03:27 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/trunk/models/rm/data_types/time_specification.rb
r4 r5 4 4 module Time_Specification 5 5 class DV_Time_Specification < OpenEHR::RM::Data_Types::Basic::Data_Value 6 attr_accessor :value7 6 def initialize(value) 8 7 @value = value … … 31 30 private 32 31 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 34 55 end 35 56 end
Note:
See TracChangeset
for help on using the changeset viewer.