lib/openehr/rm/data_structures/history.rb in openehr-1.2.8 vs lib/openehr/rm/data_structures/history.rb in openehr-1.2.9
- old
+ new
@@ -1,21 +1,21 @@
-$:.unshift(File.dirname(__FILE__)) unless
- $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
# rm::data_structures::history
# history module
# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109157527311_729550_7234Report.html
# refs #55
require 'time'
require 'active_support/core_ext'
-include OpenEHR::RM::DataStructures
-include OpenEHR::RM::Common::Archetyped
+require_relative '../common/archetyped'
+require_relative '../data_structures'
+require_relative '../data_types/quantity/date_time'
+
module OpenEHR
module RM
module DataStructures
module History
- class History < DataStructure
+ class History < OpenEHR::RM::DataStructures::DataStructure
attr_reader :origin, :events
attr_accessor :duration, :period, :summary
def initialize(args = { })
super(args)
@@ -41,11 +41,11 @@
def is_periodic?
return !@period.nil?
end
end
- class Event < Locatable
+ class Event < OpenEHR::RM::Common::Archetyped::Locatable
attr_reader :data, :time
attr_accessor :state
def initialize(args = { })
super(args)
@@ -106,10 +106,10 @@
seconds = @width.seconds
unless @width.fractional_second.nil?
seconds += @width.fractional_second
end
start_time = seconds.ago start_time
- return DvDateTime.new(:value => start_time.iso8601)
+ return OpenEHR::RM::DataTypes::Quantity::DateTime::DvDateTime.new(:value => start_time.iso8601)
end
end
end # end of History
end # end of DataStructure
end # end of RM