![]() |
DECS Word Add-Ins 1.2.0.1
Creates custom buttons in Word to automate DECS tasks.
|
Useful methods. More...
Static Package Functions | |
static string | AllText (Document doc) |
Pull together ALL the Document's text. | |
static string | CleanText (string text) |
Convert/remove stuff so later Regexs don't have to allow for them. | |
static string | CleanNameForSql (string condition_name) |
Turn a free-text description of a condition (like "Interstitial lung disease") into a string suitable for use as a SQL column name ("Interstitial_Lung_Disease"). | |
static string | GetUserName () |
Uses system utility to get the name of the user. | |
static string | FormOutputFilename (string filename, string filetype=".sql", bool short_version=false) |
Turn the statement of work filename into a .sql filename. | |
static bool | IsJustListOfCodes (string name, MatchCollection matches) |
Detects when a name (which should be like "Hypertension") is actually just a list of codes ("J42", "J43", "J44"). | |
static StreamWriter string openedFilename | OpenOutput (string input_filename, string filetype=".sql") |
static string | PrependWithHypens (string conditionName, string separator="") |
If condition name isn't empty, return it prepended with "---". | |
static Dictionary< string, string > | ReadUserNamesFile () |
From a text file, build a dictionary of login names, nice names. Example: gwashington, George Washington. | |
static string | ReplaceUntilNoMore (string text, string pattern, string replacement, bool isRegex=false) |
Run a string replacement again & again until it stops matching. Can be either straight string .Replace or Regex. | |
static string | SalutationFromName (string name) |
Turn a name like "Prof. Able Baker Charlie, MD" into "Prof. Charlie". | |
static List< string > | SelectedText (Document doc) |
Returns the user-selected portion of the document. | |
Static Package Attributes | |
static StreamWriter | writer |
Open the output StreamWriter object, understanding that we might have to substitute a shorter version of the output filename if the default filename is too long. | |
Static Private Member Functions | |
static List< string > | SplitAtBlankLines (string text) |
Splits text into List<string>, split at blank lines. | |
Useful methods.
|
staticpackage |
Pull together ALL the Document's text.
doc | Word Document object |
|
staticpackage |
Turn a free-text description of a condition (like "Interstitial lung disease") into a string suitable for use as a SQL column name ("Interstitial_Lung_Disease").
condition_name | string |
|
staticpackage |
Convert/remove stuff so later Regexs don't have to allow for them.
text | input text |
|
staticpackage |
Turn the statement of work filename into a .sql filename.
filename | SoW filename |
filetype | type of file to create (default = ".sql") |
short_version | bool: Just filename.type? (default = false) |
|
staticpackage |
Uses system utility to get the name of the user.
|
staticpackage |
Detects when a name (which should be like "Hypertension") is actually just a list of codes ("J42", "J43", "J44").
name | string to parse |
matches | MatchColllection object |
|
staticpackage |
If condition name isn't empty, return it prepended with "---".
conditionName | string to process |
separator | string between previous text & hyphens (default = "") |
|
staticpackage |
From a text file, build a dictionary of login names, nice names. Example: gwashington, George Washington.
|
staticpackage |
Run a string replacement again & again until it stops matching. Can be either straight string .Replace or Regex.
text | string to process |
pattern | string: Regex pattern |
replacement | string: what to replace matches with |
isRegex | bool: is this a Regex? (default = false) |
|
staticpackage |
Turn a name like "Prof. Able Baker Charlie, MD" into "Prof. Charlie".
name | string to parse |
|
staticpackage |
Returns the user-selected portion of the document.
doc | Word Document object |
|
staticprivate |
Splits text into List<string>, split at blank lines.
text | string to parse |
|
staticpackage |
Open the output StreamWriter object, understanding that we might have to substitute a shorter version of the output filename if the default filename is too long.
input_filename | SoW filename |
filetype | type of file to create (default = ".sql") |