- Create a JavaScript class that converts an xml document into an object.
- Inspired from Ruby’s XmlSimple.
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 | |
src_file = File.new 'soar_7-1-1.xml', 'r' | |
cln_file = File.new 'soar-cleaned_7-1-1.xml', 'w' | |
cleaned_data = '' | |
src_file.each_line do |line| | |
cleaned_data += line.gsub(/[^\20-\x7E\s]/, ' ') | |
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
h1. ${1:Meeting Title} - `date` | |
"PSR $2":$3 | |
${4:Meeting Description} | |
h2. Attendees: | |
h3. Siemens | |
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 | |
# http://github.com/mojombo/jekyll/tree/master | |
require 'rubygems' | |
require 'sqlite3' | |
db = SQLite3::Database.new( "blog.db3" ) | |
db.results_as_hash = true | |
db.execute( "select * from articles" ) do |row| | |
file_name = row['created_at'].split(" ")[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
#!/usr/bin/env ruby -wKU | |
puts "Begin Splitting - #{Time.now}" | |
header_line = "medical_record_number;encounter_number;encounter_start_date;patient_name;patient_birth_date;ip_op_indicator;encounter_type;doc_id;document_date;documnet_create_date;document_modify_date;doc_type_name;doc_type_description;page_number;signed;signatures;annotation_files;text_notes;file_path" | |
input = File.new('index.idx', 'r') | |
line_number = 0 | |
line_limit = 930 | |
file_count = 1 | |
threshold = line_limit |
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
# 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 |
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 | |
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| |
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 | |
#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 = [] |
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 | |
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 "" |
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
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 |