Back to main page
Programs by Mike
Technical Writing by Mike
Graphic design by Mike
E-mail Mike

Template macros for WP51

I know that many people use templates in WP51 for their transcription. Usually these templates consist of canned text saved into a separate file with some sort of stop code (??, *, ^C, etc.) where the MT will jump to in order to insert text at that place. This article will teach you a better way to accomplish the same thing.

First things first

Even though we won't be using a canned template in a separately saved file we still need to use a template of some sort. So the first step is to record a macro that will recreate your desired report format. To start recording a WP51 macro press Ctrl-F10. Give the macro a name, I usually use the name of the account. We'll call it VUC for Valley Urgent Care. Press Enter. Give it a description if you want. Press Enter again. You should see Macro Define at the bottom left corner of your WP51 screen. All your keystrokes from here on will be recorded.

As you create the template make sure to leave place holders in the areas where you want fill-in information to go. For example you might use "ptname" where the patient's name would go in the report or you would type "dtime" as a place to put the dictated time. Press Ctrl-F10 again to stop recording the macro.

Once you have your template made it might look something like this:

Valley Urgent Care

Patient Name: ptname whitespace whitespace whitespace Date: dtofvisit

S: *

O: *

A: *

P: *

                _______________________

                docname

D: dtime

T: ttime

#jobno

The place holders in this format are ptname, dtofvisit, docname, dtime, ttime, and jobno. The asterisks can be used as standard fill-ins that we can move between with a find and replace jump macro.

The macro we've recorded to create this template could look something like this:

{DISPLAY OFF}
{Center}Valley.Urgent.Care{Enter}
{Enter}
Patient.Name:..ptname{Tab}{Tab}{Tab}{Tab}{Tab}Date:..dtofvisit
{Enter}{Enter}
S:{Indent}*{Enter}{Enter}
O:{Indent}*{Enter}{Enter}
A:{Indent}*{Enter}{Enter}
P:{Indent}*{Enter}{Enter}
{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}_________________________
{Enter}
{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}docname{Enter}
{Enter}
D:..dtime{Enter}
T:..ttime{Enter}#jobno

Putting text into variables

Now all we need to do is figure out an easy to get those place holders filled with the correct information. Good thing WP's macro language gave us the TEXT command.

To use the TEXT command you have to edit the macro. Do this now by pressing Ctrl-F10 and typing the name of the macro you want to edit, VUC in my case. Press Enter and then 2 to Edit. If all goes well you should be looking at macro code similar to what is shown above. Position your cursor right after {DISPLAY OFF}. (Pressing Enter a few times will improve the readability of your macro.) Press Ctrl-PgUp to access the macro programming commands. Scroll down until the TEXT command is highlighted. It will look like this:

{TEXT}var~message~

When this line is highlighted pressing enter will insert {TEXT} into the macro code. Now you have to supply a variable (var~) and a message (message~) that will appear on the WP screen and wait for the user to type some text. Once the text is on the screen, the user will press Enter to assign that text to the variable.

Let's take it from the top

We are editing the macro. We press Ctrl-PgUp and scroll down so that {TEXT}var~message~ is highlighted. We press Enter to bring that into our macro code at the current position of the cursor.

Once we have {TEXT} in the macro code we have to name a variable and a message to be displayed. Let's start with the first place holder in the template, ptname. The finished {TEXT} command to assign user input to the variable "ptname" would look like this:

{TEXT}ptname~Type patient name, press Enter: ~

"Type patient name, press Enter: " is what will be displayed on the WP screen to the user. Go ahead and make one {TEXT} command for each of the remaining place holders. When you finish your macro should look similar to this:

DISPLAY OFF}

{TEXT}ptname~Type patient name, press Enter: ~
{TEXT}dtofvisit~Type date of visit, press Enter: ~
{TEXT}docname~Type doctor name, press Enter: ~
{TEXT}dtime~Type dictation time, press Enter: ~
{TEXT}ttime~Type transcription time, press Enter: ~
{TEXT}jobno~Type job number, press Enter: ~

{Center}Valley.Urgent.Care{Enter}
{Enter}
Patient.Name:..ptname{Tab}{Tab}{Tab}{Tab}{Tab}Date:..dtofvisit
{Enter}{Enter}
S:{Indent}*{Enter}{Enter}
O:{Indent}*{Enter}{Enter}
A:{Indent}*{Enter}{Enter}
P:{Indent}*{Enter}{Enter}
{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}_________________________
{Enter}
{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}docname{Enter}
{Enter}
D:..dtime{Enter}
T:..ttime{Enter}
#jobno


Getting variables into the document

At this point the macro will get the demographic information from the user and store it in variables named ptname, docname, jobno, etc. Once the user has entered the demographics the macro will print the template we created back at the beginning. Not what we want. We need our demographic information placed into the right spots in the report and we need our macro to do that for us.

You should still be editing the macro. Position the cursor at the beginning of the first placeholder, ptname. The cursor should be right underneath the first letter of the place holder. Next we need to pull in another command from our macro command list. Press Ctrl-PgUp and scroll down until {VARIABLE}var~

is highlighted. Press Enter to insert {VARIABLE} into the macro code. Then go to the end of the place holder and add a tilde(~). Do this for the remaining place holders.

The completed macro should look like this:

DISPLAY OFF}

{TEXT}ptname~Type patient name, press Enter: ~
{TEXT}dtofvisit~Type date of visit, press Enter: ~
{TEXT}docname~Type doctor name, press Enter: ~
{TEXT}dtime~Type dictation time, press Enter: ~
{TEXT}ttime~Type transcription time, press Enter: ~
{TEXT}jobno~Type job number, press Enter: ~

{Center}Valley.Urgent.Care{Enter}
{Enter}
Patient.Name:..{VARIABLE}ptname~{Tab}{Tab}{Tab}{Tab}{Tab}Date:..{VARIABLE}dtofvisit~
{Enter}{Enter}
S:{Indent}*{Enter}{Enter}
O:{Indent}*{Enter}{Enter}
A:{Indent}*{Enter}{Enter}
P:{Indent}*{Enter}{Enter}
{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}_________________________
{Enter}
{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{VARIABLE}docname~{Enter}
{Enter}
D:..{VARIABLE}dtime~{Enter}
T:..{VARIABLE}ttime~{Enter}
#{VARIABLE}jobno~

We're done!! Test it and make sure it works the way you want it to. You might need to tweak it a little here and there but for the most part we are finished.

Finishing touches

There are a few things we could do to improve this macro. The first one would be to get rid of the ttime text line and the associated variable. Replace it with:

{Date/Outline}3%2/%1/5

This will automatically place the current date/time in the place of ttime. The format for the command as I've given it above is: mm/dd/yy hh:mm am/pm. You can edit this to suit your needs by playing around in the Date/Outline settings (Shift-F5, 3).

You can also have the current date of dictation programmed into a PRD entry. Of course, you can have doctor names programmed into PRD too. They will be stored in variables in their expanded state when you press Enter.

This method of using templates will not only speed you up but also makes it very simple to get MTs that are new to an account up and running. All you have to do is give them the macro. No more faxing people a format and then having to field endless "what if" questions while the new MT struggles with recreating the basic form you've provided. Just give them a copy of your macro and everything is put in the right place automatically.

Copyright 1999 by Mike DeTuri (reprinted from Computer Solutions Vol. 1, Issue 3)