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 OwnerTypeName AS Folder, | |
EncounterNo, EncntrStartDate, | |
EnrolleeName, | |
DocTypeName, d.DocId, ModifyDateTime | |
FROM DocTypes AS dt | |
INNER JOIN documents AS d ON dt.DocType = d.DocType | |
INNER JOIN docsowners AS do ON d.DocId = do.DOcId | |
INNER JOIN Owners AS o ON do.OwnerId = o.OwnerId | |
INNER JOIN OwnerTypes AS ot ON o.OwnerType = ot.OwnerType | |
INNER JOIN Encounters AS e ON do.OwnerId = e.EncntrOwnerId |
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
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<title>ICD Threat Level</title> | |
<style type="text/css" media="screen"> | |
/* line 93, /var/www/rails/adhocs/app/assets/stylesheets/adhocs.scss */ | |
.threat { | |
width: 100px; | |
background-color: green; | |
padding: 4px 45px 4px 45px; |
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 | |
out = File.new 'delete.csv', 'w' | |
encounters = [] | |
doc_dates = [] | |
doc_types = [] | |
Dir.glob('*.tag').each do |tag| | |
input = File.new tag, 'r' | |
input.each_line do |line| | |
val = line.split(':')[1].strip |
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 e.EncounterNo, e.EncntrStartDate as old_encounter, e2.EncntrStartDate as new_encounter | |
From DocTypes as dt | |
Inner Join documents as d on dt.DocType = d.DocType | |
Inner Join DocsOwners as do on d.DocId = do.DocId | |
Inner Join Encounters as e on do.OwnerId = e.EncntrOwnerId | |
Inner Join Encounters as e2 on e.EncounterNo = e2.EncounterNo | |
Where DocTypeName in ( 'SNGRPT', 'SNGRPTR' ) | |
And e.EncntrOwnerId <> e2.EncntrOwnerId | |
And e2.EncntrStartDate > '1/1/2005' | |
And (Select Count(*) From Documents as d2 |
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
http = require("http") | |
uname = "uname" | |
pword = "pword" | |
options = | |
host: "server_name_or_ip" | |
port: 80 | |
path: "/path/to/page.aspx" | |
headers: |
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 'accounts.txt', 'r' | |
output = File.new 'additions.txt', 'w' | |
input.each_line do |line| | |
line = line.chomp.strip | |
enc = line.split '-' | |
output << " #{'%011d' % enc[0]}#{enc[1]}\n" unless line.nil? | |
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
require 'fastercsv' | |
require 'fileutils' | |
require 'date' | |
docs = {} | |
rename = {} | |
FasterCSV.foreach( 'dupe_docs.txt', :headers => true, :col_sep => ';' ) do |row| | |
begin | |
fname = "#{row['OwnerFolderDate'].split(' ')[0]}_#{row['OwnerTypeName'].strip}_#{row['DocTypeName'].strip}_#{row['file_name']}" | |
folder = "#{DateTime.parse( row['OwnerFolderDate']).strftime('%Y')}-data" |
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 'nokogiri' | |
# Read the csv and check each file listed like so | |
doc = File.read 'file_name.xml' | |
check_marks = doc.xpath("/ClinicalDocument/StructuredBody/section/title[starts-with(text(), 'CHECK')]/../text/text()").collect(&:text) | |
add_to_report if check_marks.nil? |
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 'faster_csv' | |
puts "Reading the Iron Mountain CSVs" | |
encounters = Hash.new | |
error_text = '' | |
enc_no = '' # Include information from a specific encounter | |
lines = 0 | |
Dir.glob( '*.csv' ).each do |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
public class Recursion { | |
private String sentence; | |
public Recursion(String sentence) { | |
this.sentence = sentence; | |
} | |
public String getSentence() { | |
return sentence; | |
} |