Text Replacement Command:
Download Ready-Made Command
This command is designed to perform a multiple "find and replace" sequence from the edit menu of a word processor, using a specified text termed "ProviderName" as the target text and substituting spoken or typed text in it's place. The author has found this particularly helpful in a medical setting when creating a clinical note to be linked to a specific resident, attending of mid-level provider whose name will be mentioned several times in the course of the note. Examples are shown below.
This command can be altered to use a term other than "ProviderName" if desired and this is explained below. It has been tested in DragonPad, WordPad and Microsoft Word. It's use has not been confirmed in WordPerfechimt.
Download Command Now
Instructions for importing commands into NaturallySpeaking |
About this command:
Command Type: This is a Dragon Advanced Scripting command that utilizes a simple dialog box
Command Availability: Global
Learn How to Make the Command and How it Works:
In my own medical practice, it is often the case that my clinical notes are "linked" to the note by a mid-level provider, resident or fellow and who's note is often more detailed than my own. In order to keep my own note legal it is necessary to specifically state the name of the provider to which my note is attached and potentially in several places. This command is designed to insert the name of a specific trainee or mid-level provider in pre-specified locations doing a simple find and replace. It uses a dialog box into which the key name is inserted. It only makes sense to use a command of this nature if the text to be replaced occurs in several places, since it does a "replace all" function.
As an example, this is the note template I use for a linked fellow consult note:
CARDIOLOGY CONSULTATION
Requesting Physician: [01]
Clinical History: The Cardiology Service was asked to evaluate this patient regarding: [02].
The patient was seen in conjunction with Dr. ProviderName. I have independently interviewed and examined the patient and reviewed pertinent historical, laboratory, and other data. Please refer to Dr. ProviderName's note for details of this patient's presentation, findings, and recommendations. I have reviewed Dr. ProviderName's note and concur fully with documented findings.
In brief, [03]
Physical Examination: [04]
Pertinent Data: [05]
Assessment: [06]
Recommendations:
1. I have discussed the results of my cardiovascular overview and impressions with the patient and/or appropriate family
2. Options for management were reviewed
3. [07]
Thank you for allowing me to assist in the care of this patient. For questions or to discuss the case further, please contact me at my Lebanon DHMC office (603-650-7840) or through pager 2528.
Notice that in several places the term "ProviderName" shows up. This is the term that will be replaced when using the "replace" command.
The advanced scripting code appears as follows:
Sub Main
Begin Dialog UserDialog 380,133 ' %GRID:10,7,1,1
Text 20,28,140,28,"Say or type name or text to be inserted:",.Text1
TextBox 170,35,180,21,.TextBox1
PushButton 30,84,110,28,"Replace",.PushButton1
PushButton 190,84,130,28,"Cancel Command",.PushButton2
End Dialog
Dim dlg As UserDialog
result=Dialog(dlg)
If result = 1 Then
SendKeys "^{home}"
SendKeys "^h"
SendKeys "ProviderName"
SendKeys "{tab}"
SendKeys dlg.TextBox1
SendKeys "%a"
SendKeys "{esc}"
SendKeys "{esc}"
End If
If result = 2 Then
TTSPlayString "Command Cancelled"
End If
End Sub
Function dialogfunc(DlgItem$, Action%, SuppValue%) _
As Boolean
Select Case Action%
Case 1 ' Dialog box initialization
Case 2 ' Value changing or button pressed
Case 3 ' TextBox or ComboBox text changed
Case 4 ' Focus changed
Case 5 ' Idle
Case 6 ' Function key
End Select
End Function
Upon initiating the command, the following dialog box pops up:

When a term is typed in the text box and "Replace" button clicked, a quick find and replace takes place in which every instance of "ProviderName" is replaced with the name typed in the text box, i.e. "Smith", "Jones", "Kildare", etc. Needless to say you can use a term other than "ProviderName" but to do so, you must change this term in the advanced scripting (indicated in a red font).
Obviously this is a very simple command, but one which I have found useful and which may be of benefit to you as well.