{'fraction_non_alphanumeric': 0.024409244352116333, 'fraction_numerical': 0.0025967281225655675, 'mean_word_length': 4.6647058823529415, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Software Tool to Assist Researchers in Coding Free Text Clinical Reports

Encoder is a Windows-based program that assists researchers and their staff in coding free text clinical reports into structured databases that are ready for analysis. This software represents approximately 5000 person-hours of programmer time. Researchers at the University of Pittsburgh have successfully used Encoder during the past two years, including a project that analyzed how clinical findings are expressed in narrative clinical reports, such as history and physical examination reports (H&Ps). The Encoder source code (C++) and executable code are freely available on the web, accompanied by user and programmer documentation (http://web.cbmi.pitt.edu/encoder). 
 
Encoder contains a graphical user interface with two main components. One component allows the user to define a data dictionary of variables to be coded. Variable types that are supported include integer, real, Boolean, nominal, date, and list formats. The user can assign to a variable a set of synonyms. The user can also enter a description and a unit of measurement for a variable. A data dictionary that represents this information is dynamically constructed as a set of Access tables. 
 
The second component of the Encoder interface supports coding free text clinical reports that are available for input in either an XML format or a simple ascii text-file format. Encoder assists the user in coding a given report. For example, the program highlights in color the text phrases in a report that match the names of variables in the data dictionary or one of their synonyms. For instance, the text phrase “CAD” might be highlighted for the Boolean variable history of coronary artery disease, which has the phrase “CAD” as a synonym in the data dictionary. Encoder also highlights in a different color the likely value of each variable, based on a heuristic matching algorithm. With a single click, the user can code the text according to Encoder’s suggestion; alternatively, the user can ignore the text or choose another value for the variable in question. For example, the phrase “temperature was 104” in a report might have “temperature” highlighted to match the variable temperature and “104” highlighted as the presumptive value of that variable. With a single click, the user can accept this coding of temperature for the current report. 
 
As a means of documenting an encoding, the user can associate text with the variable that codes the information in that text. This association is saved (and later can be viewed) along with the coded variable value. The user also can type a narrative explanation of any encoding. These features support the documentation of how and why variables were coded as they are in a given report. 
 
Encoder allows the user to tab through a report. Each tab causes the program to move to the next highlighted phrase in the report. The user also has the option to manually scan the report for relevant phrases that were missed by the program and then code those phrases within Encoder. 
 
Once a report is coded, Encoder takes the user to the next report. The program permits reports to be organized hierarchically (e.g., by patient, then date, then report type), and it displays this hierarchy graphically; the user can select any report in the hierarchy by pointing and clicking. 
 
When the user has completed the coding process for a set of reports, the variables and their coded values exist in an Access table. The user can readily export this data and then analyze it to investigate the research questions of interest. 
 
Potential applications of Encoder include coding narrative clinical reports as a step in clinical text analysis for research, chart review for quality assurance, and the construction of computer-based models from the coded data.