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 run | |
check_environment | |
Daemons.run_proc('main.rb', daemon_options) do | |
server.listen_to_port(&process_msg) | |
end | |
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
namespace :labco do | |
desc 'Start Interface' | |
task :start do | |
puts `ruby -e "load 'interfaces/labco/main.rb'; | |
HL7Engine::Interfaces::LabCo::Main.new(4481).run" start` | |
end | |
desc 'Stop Interface' | |
task :stop do | |
puts `ruby -e "load 'interfaces/labco/main.rb'; |
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
New: | |
class BaseNotifier | |
def initialize(attributes={}) | |
@client_ip, @ec2_instance_id, @environment, @hl7_message, | |
@hl7_response, @queue_response, @stats, @title = %i( | |
client_ip ec2_instance_id environment hl7_message | |
hl7_response queue_response stats title | |
).map do |key| | |
attributes.fetch(key, '') | |
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
From this... | |
def status | |
if @pass | |
:info | |
else | |
:error | |
end | |
end | |
To this... |
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
describe '#event' do | |
it 'submits a custom event to data dog' do | |
datadog = HL7Engine::Interfaces::Labs2Go::DataDog.new( | |
env: ENV, pass: true, response: 'AA', stat: '[email protected]', title: 'T' | |
) | |
dog = double | |
event = double | |
time = double | |
allow(Time).to receive(:now).and_return(time) |
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
Dogapi::Event.new( | |
message, | |
msg_title: title, | |
date_happened: Time.now, | |
alert_type: status, | |
tags: tag | |
) |
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
DECLARE STATUS_S15 INTEGER 0; | |
IF (ref_I_InputRootRef_PARM. XML.MRM ."NS1:CIM" ."NS1:MSH" ."NS1:MessageType" ."NS1:TheMessageType" = 'SIU' AND | |
COALESCE(ref_I_InputRootRef_PARM .XML .MRM ."NS1:CIM" ."NS1:MSH" ."NS1:MessageType" ."NS1:TriggerEvent" ,'' ) <> 'S15' AND | |
NOT(UTILS .FUNC_IsAbsoluteNull (ref_I_InputRootRef_PARM .XML .MRM ."NS1:CIM" ."NS1:AIL" ."NS1:LocationResourceID" ."NS1:PointOfCare" ))) THEN | |
IF ( COALESCE(ref_I_InputRootRef_PARM .XML .MRM ."NS1:CIM" ."NS1:SCH" ."NS1:FillerStatusCode" ."NS1:Identifier" ,'' ) <> 'C' AND | |
COALESCE(ref_I_InputRootRef_PARM .XML .MRM ."NS1:CIM" ."NS1:SCH" ."NS1:FillerStatusCode" ."NS1:Identifier" ,'' ) <> 'B' ) THEN | |
SET STATUS_S15 = 1; | |
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
app.cm.checkChanList = function(Params,D){ | |
for (var i=0;i < D.name.length; i++){ | |
if (D.name[i] === Params.With){ | |
return [D.name[i], true]; | |
} | |
} | |
} | |
// Clicked on Import. Receives Channel name to check for existing and, | |
// site + credentials for the server to send to |