Skip to content

Instantly share code, notes, and snippets.

@ebot
ebot / gist:146431
Created July 13, 2009 20:27
cch-alphasys move script
#!/usr/bin/env ruby -wKU
#http://gist.github.com/gists/146431
require 'fileutils'
tif_dir = "\\\\EDMC0D0a\\C0D0\\OlcReports"
tag_dir = "\\\\EDMC0D0a\\C0D0\\Upload\\Alpha"
begin
Dir.glob("data/*.tif").each do |file|
file_name = File.basename(file)
@ebot
ebot / gist:124347
Created June 5, 2009 16:04
ADD0 exit script for streamline
#!/usr/bin/env ruby -wKU
#http://gist.github.com/124347
require 'rubygems'
require 'fastercsv'
require 'yaml'
begin
# Load the config file
ops = YAML::load(File.new('config.yml'))
@ebot
ebot / gist:122521
Created June 2, 2009 19:37
batch acquire log file stat maker
#!/usr/bin/env ruby -wKU
total_files = 0
# Looop through each yml file
d = Dir.new(".")
Dir.glob( '*.yml' ) do |file|
file_count = 0
log_file = File.new file, 'r'
log_text = log_file.read
@ebot
ebot / gist:108163
Created May 7, 2009 15:31
Audit Report Sample SQL
-- For each user run this query:
Select d.DocId, DocTypeName, OwnerTypeName, CreateDateTime,
EncounterNo, MedRecNo, EnrolleeName
From Documents as d
Inner Join DocTypes as dt on
d.DocType = dt.DocType
Inner Join DocsOwners as do on
d.DocId = do.DocId
Inner Join Owners as o on
do.OwnerId = o.OwnerId
@ebot
ebot / idea.textile
Created April 30, 2009 20:01
Ideas for Professor: JavaScript XML Object

The Big Idea

  • Create a JavaScript class that converts an xml document into an object.
  • Inspired from Ruby’s XmlSimple.
@ebot
ebot / gist:99233
Created April 21, 2009 16:43
Nag Sample Deficiency Report Query
Select docs.DocId, DocTypeName, DocTypeDesc,DocStatus, DefStatusName, OwnerTypeName,
EnrolleeName, docs.CreateDateTime, ModifyDateTime, DocDateTime
From Documents as docs
Inner Join DocsOwners as do on
docs.DocId = do.DocId
Inner Join Encounters as enc on
do.OwnerId = enc.EncntrOwnerId
Inner Join DocTypes as dt on
docs.DocType = dt.DocType
left outer join deficiencies as def on
@ebot
ebot / audit_process.rb
Created April 7, 2009 18:46
Sample audit config file
#!/usr/bin/env ruby -wKU
require 'yaml'
config = YAML::load( File.open( 'config.yml' ) )
execution_time = config["Execution Time"]
doc_types = config["Document Types"]
user_groups = config["User Groups"]
puts ""
@ebot
ebot / rename_files.rb
Created March 17, 2009 19:06
P0MB - Summit Rename Exit Script
#!/usr/bin/env ruby -wKU
#http://gist.github.com/80716
require 'rubygems'
require 'fastercsv'
begin
csv_options = {:col_sep => ';', :headers => :first_row, :write_headers => true}
index_file = FasterCSV.open '../index.txt', csv_options
new_index = []
@ebot
ebot / cobius_pat_info.rb
Created February 26, 2009 13:14
script to pull patient info from cobius xml files.
#!/usr/bin/env ruby -wKU
require "rexml/document"
require 'FileUtils'
out = File.new 'patient_list.csv', 'w'
out << "medical_record_number,encounter_number,patient_last_name,"
out << "patient_middle_name,patient_first_name\n"
Dir.glob( File.join( '.', '*.XML' ) ) do |cobius_file|
@ebot
ebot / .htaccess
Created February 20, 2009 03:09
Default compression and expires settings for performance and YSlow
# Default compression and expires settings for performance and YSlow
# Set compression
SetOutputFilter DEFLATE
AddOutputFilter DEFLATE css js
AddType text/javascript .js
AddType text/css .css
### turn on the Expires engine
ExpiresActive On
### default expires after a month in the client's cache