Sha256: 9ee757ed9160338cefedc691d923425d53e8171466f7db6d726d991de1fcb5a4

Contents?: true

Size: 636 Bytes

Versions: 25

Compression:

Stored size: 636 Bytes

Contents

module Clinical
  module Outcome

    def self.included(base)
      base.send(:include, InstanceMethods)
      base.class_eval do
        include InstanceMethods
        include HappyMapper
        element :measure, String
        element :time_frame, String
        element :safety_issue, String
      end
    end
    
    module InstanceMethods
      def primary?
        self.class.tag_name == "primary_outcome"
      end

      def to_s
        val = "#{measure}"
        val << ", TIME FRAME: #{time_frame}" if time_frame
        val << ",SAFETY ISSUE: #{safety_issue}" if safety_issue
        val
      end
    end
    
  end
end

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
dpickett-clinical-0.1.0 lib/clinical/outcome.rb
dpickett-clinical-0.1.1 lib/clinical/outcome.rb
dpickett-clinical-0.1.2 lib/clinical/outcome.rb
dpickett-clinical-0.1.3 lib/clinical/outcome.rb
dpickett-clinical-0.1.4 lib/clinical/outcome.rb
dpickett-clinical-0.1.5 lib/clinical/outcome.rb
dpickett-clinical-0.2.0 lib/clinical/outcome.rb
dpickett-clinical-0.2.1 lib/clinical/outcome.rb
dpickett-clinical-0.2.10 lib/clinical/outcome.rb
dpickett-clinical-0.2.3 lib/clinical/outcome.rb
dpickett-clinical-0.2.4 lib/clinical/outcome.rb
dpickett-clinical-0.2.5 lib/clinical/outcome.rb
dpickett-clinical-0.2.6 lib/clinical/outcome.rb
dpickett-clinical-0.2.7 lib/clinical/outcome.rb
dpickett-clinical-0.2.8 lib/clinical/outcome.rb
dpickett-clinical-0.2.9 lib/clinical/outcome.rb
clinical-0.2.11 lib/clinical/outcome.rb
clinical-0.2.10 lib/clinical/outcome.rb
clinical-0.2.9 lib/clinical/outcome.rb
clinical-0.2.8 lib/clinical/outcome.rb