source: ruby/trunk/models/rm/data_types/quantity.rb@ 4

Last change on this file since 4 was 4, checked in by KOBAYASHI, Shinji, 16 years ago

restructuring repository tree

File size: 1.3 KB
Line 
1module OpenEHR
2 module RM
3 module Data_Types
4 module Quantity
5 module DV_Ordered < OpenEHR::RM::Data_Types::Basic::Data_Value
6 include Comparable
7 attr_accessor :other_refference_ranges, :normal_range
8 attr_accessor :normal_status
9 def initialize(normal_range, other_reference_ranges,
10 normal_status = nil)
11 other_reference_ranges_validity(other_reference_ranges)
12 @normal_range = normal_range
13 @other_reference_ranges = other_reference_ranges
14 @normal_status = normal_status
15 end
16 def is_normal?
17 normal_range != nil or normal_status != nil
18 end
19 def is_simple?
20 normal_status == nil and other_refference_ranges == nil
21 end
22 private
23 def other_reference_ranges_validity(other_reference_ranges)
24 if other_reference_ranges != null or other_reference_ranges.is_empty?
25 raise ArgumentError, "Other reference ranges validity error"
26 end
27 end
28 end
29 module DV_Quantified
30 include DV_Ordered
31 def magnitude
32 end
33 def valid_magnitude_status(s)
34 end
35 end
36 end # of Quantity
37 end # of Data_Types
38 end # of RM
39end # of OpenEHR
Note: See TracBrowser for help on using the repository browser.