This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jdee@fatman:webapp$ bundle exec cucumber -r features/support/env.rb -r features/support/standard.rb -r features/shared_step_definitions -r features/standard_step_definitions --tags @pending features/standard/staging_area.feature:213 | |
Feature: Staging Electronic Messages | |
To process electonically submitted messages | |
A user needs to be able to view messages and assign them to CMRs | |
@pending | |
Scenario: Assigning a staged message with a home phone number # features/standard/staging_area.feature:213 | |
Given I am logged in as a super user # features/standard_step_definitions/common_helper_steps.rb:22 | |
And I have the staged message "realm_campylobacter_jejuni" # features/standard_step_definitions/accept_staged_messages_as_hl7_steps.rb:19 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
== GeocodeForCsv: migrating ================================================== | |
rake trisano:ee:load_defaults | |
(in /home/jdee/github/csinitiative/trisano/webapp) | |
Loading EE defaults | |
Loading addiitonal EE privileges | |
Adding EE privs to existing roles | |
Load geocode csv fields | |
rake aborted! | |
PGError: ERROR: relation "csv_field_translations" does not exist | |
LINE 1: INSERT INTO csv_field_translations (id, csv_fi... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jdee@fatman:~/github/csinitiative/trisano/client-web-api/ruby/staged_messages$ export TRISANO_BASE_URL=http://localhost:3000 | |
jdee@fatman:~/github/csinitiative/trisano/client-web-api/ruby/staged_messages$ export TRISANO_API_CONTENT_TYPE=application/edi-hl7v2 | |
jdee@fatman:~/github/csinitiative/trisano/client-web-api/ruby/staged_messages$ ruby staged_messages.rb ../../../webapp/lib/hl7/samples/realm-minimal-message.hl7 | |
Using the following custom headers: | |
{"Content-Type"=>"application/edi-hl7v2"} | |
Processing message 1 | |
Message number 1 could not be processed due to the following errors (TrisanoWebError): | |
* HL7 Message is missing the header | |
* HL7 Message is missing the header | |
* HL7 Message is missing the header |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from my little java app: | |
request.env['CONTENT_TYPE']="application/edi-hl7v2" | |
request.env['Content-Type']=nil | |
request['CONTENT_TYPE']=nil | |
request['Content-Type']=nil | |
request.format=#<Mime::Type:0x453e22ee @synonyms=["application/edi-hl7"], @string="application/edi-hl7v2", @symbol=:hl7> | |
from the ruby API script: | |
request.env['CONTENT_TYPE']="application/edi-hl7v2" | |
request.env['Content-Type']=nil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def check_contents | |
@staged_message = StagedMessage.new params[:staged_message] | |
@staged_message.hl7_message ||= request.body.read.chomp | |
puts "CONTENT_TYPE=#{request.env['CONTENT_TYPE']}" # <<<< line 183 | |
puts "Content-Type=#{request['Content-Type']}" # <<<< | |
puts "format=#{request.format}" # <<<< |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from the API script | |
CONTENT_TYPE=application/edi-hl7v2 | |
Content-Type= | |
format=*/* # <<<<< huh??? | |
in before_filter :check_contents: @staged_message.hl7_message.is_a String | |
# from my Java client | |
CONTENT_TYPE=application/edi-hl7v2 | |
Content-Type= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jdee@fatman:~/github/csinitiative/trisano/webapp$ cat check_cr.rb | |
#!/usr/bin/env ruby | |
require File.join(File.dirname(__FILE__), 'features', 'support', | |
'hl7_messages') | |
puts "a CR character in a here doc becomes " + | |
HL7MESSAGES[:empty_batch].slice(96,1).inspect | |
jdee@fatman:~/github/csinitiative/trisano/webapp$ rvm list |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
** Execute features | |
/home/jdee/.rvm/rubies/jruby-1.5.2/bin/jruby -I "/home/jdee/.rvm/gems/jruby-1.5.2/gems/cucumber-0.6.3/lib:lib" "/home/jdee/.rvm/gems/jruby-1.5.2/gems/cucumber-0.6.3/bin/cucumber" --format pretty -p standard --tags ~@pending | |
Using the standard profile... | |
undefined method `add_path_to' for main:Object (NoMethodError) | |
/home/jdee/github/csinitiative/trisano-ee/plugins/trisano_ee/features/support/paths.rb:1 | |
/home/jdee/github/csinitiative/trisano-ee/plugins/trisano_ee/features/support/paths.rb:64:in `require' | |
/home/jdee/.rvm/gems/jruby-1.5.2/gems/polyglot-0.3.1/lib/polyglot.rb:64:in `require' | |
/home/jdee/.rvm/gems/jruby-1.5.2/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require' | |
/home/jdee/.rvm/gems/jruby-1.5.2/gems/cucumber-0.6.3/bin/../lib/cucumber/rb_support/rb_language.rb:124:in `load_code_file' | |
/home/jdee/.rvm/gems/jruby-1.5.2/gems/cucumber-0.6.3/bin/../lib/cucumber/step_mother.rb:85:in `load_code_file' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MessageBatch < ActiveRecord::Base | |
has_many :staged_messages, :dependent => :nullify, :after_remove => :message_removed | |
def message_removed(message) | |
destroy if staged_messages.empty? | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
LEAST LIKELY TO COMPILE SUCCESSFULLY: | |
IanPhillipps, Cambridge Consultants Ltd., Cambridge, England | |
A appropriate program for December 25th, this consists primarily of | |
calls to main() combined by a lot of the ternary conditional (?:) | |
opators. Have you ever seen a more forceful return? The judges note | |
that this program looked like what you would get by pounding on the keys | |
of a type writer at random. |