Skip to content

Instantly share code, notes, and snippets.

View jdee's full-sized avatar
🏳️‍🌈

Jimmy Dee jdee

🏳️‍🌈
View GitHub Profile
@jdee
jdee / seqnum.rb
Created September 15, 2010 20:06
#!/usr/bin/env ruby
class A
class << self
def next_sequence_number
@next_sequence_number += 1
end
end
@next_sequence_number = 0
jdee@fatman:~/github/csinitiative/trisano/webapp$ script/runner vttest.rb
arup_1: LOINC=13954-3 (scale Ord) ST [Positive]
unknown_observation_value: LOINC=13954-3 (scale Ord) ST [Scary]
arup_2: LOINC=5221-7 (scale <nil>) ST [Sick]
arup_2: LOINC=13954-3 (scale Ord) ST [Very sick]
arup_3: LOINC=5221-7 (scale <nil>) ST [Sick]
arup_3: LOINC=13954-3 (scale Ord) ST [Very sick]
ihc_1: LOINC=00000-0 (scale <nil>) TM [200902250930Z]
ihc_1: LOINC=00000-0 (scale <nil>) PN [PETERSEN^FINN^B.]
ihc_1: LOINC=00000-0 (scale <nil>) TN [8014081819]
@jdee
jdee / vttest.rb
Created September 14, 2010 22:23
#!/usr/bin/env ruby
require 'features/support/hl7_messages'
vt_results = {}
HL7MESSAGES.each do |name, msg|
begin
hl7_msg = HL7::Message.parse msg
hl7_msg.observation_requests.each do |obr|
*** Running Perinatal Hep B specs ***
** Invoke db:test:prepare
** Execute trisano:perinatal_hep_b:spec
/home/jdee/.rvm/gems/jruby-1.5.2/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
/home/jdee/.rvm/gems/jruby-1.5.2/gems/polyglot-0.3.1/lib/polyglot.rb:64:in `require': load error: action_controller/integration -- java.lang.OutOfMemoryError: GC overhead limit exceeded (LoadError)
from /home/jdee/.rvm/gems/jruby-1.5.2/gems/polyglot-0.3.1/lib/polyglot.rb:64:in `require'
from /home/jdee/.rvm/gems/jruby-1.5.2/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require'
from /home/jdee/.rvm/gems/jruby-1.5.2/gems/rspec-rails-1.3.2/lib/spec/rails.rb:9
from /home/jdee/.rvm/gems/jruby-1.5.2/gems/rspec-rails-1.3.2/lib/spec/rails.rb:64:in `require'
from /home/jdee/.rvm/gems/jruby-1.5.2/gems/polyglot-0.3.1/lib/polyglot.rb:64:in `require'
bundle exec cucumber -p enhanced features/enhanced/attachments.feature:7
Using the enhanced profile...
/home/jdee/.rvm/gems/jruby-1.5.2/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
Features: Attaching documents to an Event.
To support better documenting of cases
Correspondence and images files can be attached to an event.
Scenario: Delete an attachment from the add attachment screen # features/enhanced/attachments.feature:7
Connection refused - Connection refused (Errno::ECONNREFUSED)
Failing Scenarios:
cucumber -p enhanced features/enhanced/attachments.feature:7 # Scenario: Delete an attachment from the add attachment screen
cucumber -p enhanced features/enhanced/attachments.feature:18 # Scenario: Delete an attachment from the event show screen
cucumber -p enhanced features/enhanced/cmr_filter_list.feature:7 # Scenario: Filtering the CMR list by one disease
cucumber -p enhanced features/enhanced/cmr_filter_list.feature:22 # Scenario: Filtering the CMR list by multiple diseases
cucumber -p enhanced features/enhanced/common_test_type_delete.feature:24 # Scenario: Deleting a common test type from show mode
cucumber -p enhanced features/enhanced/common_test_type_delete.feature:35 # Scenario: Deleting a common test type referenced by a lab result
cucumber -p enhanced features/enhanced/contact_fields_help_text.feature:7 # Scenario: Viewing contact event help text
cucumber -p enhanced features/enhanced/event_clinicians.feature:6 # Scenario: Adding and removing clinicians in new mode
cucumber -p
#!/usr/bin/env ruby
class Fixnum
def is_perfect
(1...self).select { |x| self % x == 0 }.inject(:+) == self
end
end
def first_perfect
j = 2
Failing Scenarios:
cucumber -p standard features/standard/core_field_help_text.feature:6 # Scenario: Viewing help text on morbidity event core fields
cucumber -p standard features/standard/core_field_help_text.feature:13 # Scenario: Viewing help text on contact event core fields
cucumber -p standard features/standard/fb_contact_core_field_configs.feature:6 # Scenario: Contact event core field configs
cucumber -p standard features/standard/fb_morb_core_field_configs.feature:6 # Scenario: Morbidity event core field configs
cucumber -p standard vendor/trisano/trisano_ee/features/standard/google_api.feature:6 # Scenario: Include states in javascript file
cucumber -p standard vendor/trisano/trisano_ee/features/standard/show_cmr.feature:3 # Scenario: Showing a morbidity event
cucumber -p standard vendor/trisano/trisano_ee/features/standard/show_contact_event.feature:3 # Scenario: Showing a contact event
329 scenarios (7 failed, 322 passed)
jdee@fatman:~/github/csinitiative/trisano/webapp$ bundle show webrat
/home/jdee/.rvm/gems/jruby-1.5.2/bundler/gems/webrat-d8a7140456fa
@jdee
jdee / failure
Created September 7, 2010 17:21
bundle exec cucumber -p standard features/standard/web_api_cmrs_client.feature:7
Using the standard profile...
/home/jdee/.rvm/gems/jruby-1.5.2/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
/home/jdee/github/csinitiative/trisano/webapp/features/support/hl7_messages.rb:18 warning: already initialized constant HL7MESSAGES
Feature: Web API Cmrs Client
To create and modify morbidity reports programmatically
An interface is needed that can be integrated into code
@ignore_plugin_renderers