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 Email | |
| attr_accessor :is_set, :alert_name, :from, :to, :subject, :priority, :include_trigger, :include_trigger_time, | |
| :report_server_enabled, :inline, :send_results, :use_ns_subject | |
| def initialize(is_set: "1", alert_name: "no-reply@email", from: "no-reply@email", to: "no-reply@email", | |
| priority: "2", include_trigger: "1", include_trigger_time: "1", report_server_enabled: "0", inline: "1", | |
| send_results: "1", use_ns_subject: "1") | |
| @is_set = is_set | |
| @alert_name = alert_name | |
| @from = "\" " + alert_name + " \"" + from |
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 Email | |
| attr_accessor :is_set, :alertname, :from, :to, :subject, :priority, :include_trigger, :include_trigger_time, :reportServerEnabled, :inline, :sendresults, :useNSSubject | |
| def initialize(is_set: "1", alertname: "no-reply@email", from: "no-reply@email", to: "no-reply@email", priority: "2", include_trigger: "1", include_trigger_time: "1", reportServerEnabled: "0", inline: "1", sendresults: "1", useNSSubject: "1") | |
| @is_set = is_set | |
| @alertname = alertname | |
| @from = "\" " + alertname + " \"" + from | |
| @to = to | |
| @subject = alertname | |
| @priority = priority |
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
| require 'spreadsheet' | |
| class Claim | |
| @@no_of_claims = 0 | |
| attr_accessor :payor | |
| attr_accessor :patient | |
| attr_accessor :total | |
| attr_accessor :date_range | |
| attr_accessor :sent_date | |
| attr_accessor :comments |
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
| Error: | |
| === Will include all ruby core libraries | |
| C:/Ruby22/lib/ruby/2.2.0/Win32API.rb:16:in `initialize': no implicit conversion | |
| from nil to integer (TypeError) | |
| from C:/Ruby22/lib/ruby/2.2.0/Win32API.rb:16:in `new' | |
| from C:/Ruby22/lib/ruby/2.2.0/Win32API.rb:16:in `initialize' | |
| from C:/Ruby22/lib/ruby/gems/2.2.0/gems/ocra-1.3.4/bin/ocra:951:in `new' | |
| from C:/Ruby22/lib/ruby/gems/2.2.0/gems/ocra-1.3.4/bin/ocra:951:in `load |
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
| require 'spreadsheet' | |
| def help | |
| print " | |
| You must pass in the path to the file to launch. | |
| Usage: ruby #{__FILE__} path/to/target_file | |
| " | |
| end | |
| class Claim |
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
| require 'spreadsheet' | |
| def help | |
| print " | |
| You must pass in the path to the file to launch. | |
| Usage: ruby #{__FILE__} path/to/target_file | |
| " | |
| end | |
| class Claim |
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 file_operation | |
| dir = Dir.open(__dir__) | |
| newbook = Spreadsheet::Workbook.new | |
| newsheet1 = newbook.create_worksheet | |
| dir.each do |file| | |
| if File.extname(file) != '.ub4' | |
| next if File.extname(file) != '.npi' | |
| end | |
| claim_array = File.readlines(file).map(&:chomp) | |
| if File.extname(file) == '.ub4' |
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
| if ARGV == 'help' | |
| help | |
| exit | |
| else | |
| file_operation | |
| move | |
| 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
| def ub04 | |
| book = RubyXL::Parser.parse('ub04.xlsx') | |
| newbook = RubyXL::Workbook.new | |
| newsheet1 = newbook[0] | |
| # THIS CODE IS FINE | |
| print newsheet1[0][2] | |
| sheet1 = book[0] | |
| sheet1.each_with_index() { |row, index | | |
| break if row[0].value == nil | |
| next if index == 0 |
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
| book = RubyXL::Parser.parse('ub04.xlsx') | |
| newbook = RubyXL::Workbook.new | |
| newsheet1 = newbook[0] | |
| sheet1 = book[0] | |
| sheet1.each_with_index() { |row, index | | |
| break if row[0] == nil | |
| next if index == 0 | |
| # Column 3 | |
| col_3 = row[104] | |
| # this just prints a bunch of <RubyXL::Cell:0x007fcb4ea12900> |