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
/****************************************************************************** | |
* Script to copy indexes from the old table to a new one * | |
* Created By Ed Botzum * | |
* Created on 10/27/2010 * | |
*******************************************************************************/ | |
Declare @table_name as nvarchar(100) | |
Declare @new_table_name as nvarchar(100) | |
Declare @index_name as nvarchar(100) | |
Declare @column_name as nvarchar(100) |
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
#!/usr/bin/env ruby | |
require "mongo" | |
connection = Mongo::Connection.new | |
connection.database_names.each do |name| | |
if name.include?('icd_') | |
puts "#{DateTime.now} - #{name}" | |
adhocs = connection.db(name).collection('adhocs') | |
scheduled = adhocs.find( { "schedule" => /.*/ } ) |
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
-- DELETE THE BabyInformation DUPLICATES | |
BEGIN | |
SELECT [PA-PT-NO-WOSCD], [PA-ACCT-TYPE], [PA-CTL-PAA-XFER-DATE], | |
COUNT([PA-PT-NO-WOSCD]) AS dupes, MAX([PA-REC-CREATE-DATE]) AS last_occurance, | |
MIN([PA-REC-CREATE-DATE]) AS first_occurance | |
INTO #BabyInformation_dupes | |
FROM BabyInformation | |
GROUP BY [PA-PT-NO-WOSCD], [PA-ACCT-TYPE], [PA-CTL-PAA-XFER-DATE] | |
DELETE FROM BabyInformation |
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
#!/usr/bin/env ruby -wKU | |
input = File.new 'input.txt' | |
output = File.new 'output.txt', 'w' | |
input.each_line do |line| | |
account = line.split '-' | |
puts " #{"%011d" % account[0]}#{account[1]}" | |
output << " #{"%011d" % account[0]}#{account[1]}" | |
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
To fix server permissions | |
=========================== | |
In httpd.conf (/etc/apache2) | |
* Comment out User and Group | |
* Add User <name of admin user> | |
Create App Entries | |
==================== |
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
#!/usr/bin/env ruby -wKU | |
input = File.new 'generic_doc_labels.csv' | |
output = File.new 'generic_document_labels.csv', 'w' | |
line_number = 0 | |
input.each_line do |line| | |
unless line_number == 0 | |
fields = line.split '","' |
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
#!/usr/bin/env ruby -wKU | |
job_ids = [ '9555141D-0728-473C-9C98-F62E2D944F2F', | |
'C8AB8CF9-1A1D-45D8-A6E0-D65C3F6D7DBB', | |
'C8531ECE-E771-432C-8D24-86E1881EEA41', | |
'3531688C-BD89-4394-A786-DCF6FEE4753B', | |
'3C8890BE-4D24-4521-A780-1E896A3BB49B', | |
'D4A2B1D7-3ABE-4CA2-B22E-720552936D7D', | |
'309B2CD2-4277-45ED-870D-E7AC2CC51700', | |
'20B56A51-6D47-4207-AD34-8C0EAE49C6F9', |
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
# Initialize the var | |
dupe_docs = {} | |
# In your loop/routine | |
dupe_docs[doc_id] = [] if dupe_docs[doc_id].nil? | |
dupe_docs[doc_id] << encounter_number | |
# At the bottom, output the totals | |
puts "There were #{dupe_docs.count} duplicate documents:" | |
dupe_docs.each do |doc, encounters| |
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
gem: --local --no-rdoc --no-ri |
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
#!/usr/bin/env ruby -wKU | |
# Non Leap Year Download Script | |
# Create By Ed Botzum | |
# Last Updated 2011-08-12 | |
# Code maintained at https://gist.github.com/1142420 | |
# | |
# This script will download the specified files on March 1 in years when | |
# February has only twenty eight days, b/c the normal monthly job is scheduled | |
# to run on the twenty ninth of each month. This custom job will run on the | |
# first of each month. Yay rediculous waste! |