- 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 | |
| #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) |
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/124347 | |
| require 'rubygems' | |
| require 'fastercsv' | |
| require 'yaml' | |
| begin | |
| # Load the config file | |
| ops = YAML::load(File.new('config.yml')) |
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 | |
| 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 |
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
| -- 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 |
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 |
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
| #!/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 "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
| # 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 |