Macros: make your computer do the work!

Home > System 6000 > Macros

Search

How to free up your time by getting your computer to carry out repetitivetasks for you.

When you find yourself typing the same thing over and over again, stop andask yourself whether your computer could do it for you. Computers are excellentfor performing repetitive tasks, so why waste time and energy doing themyourself? Using macros to perform these jobs will speed up your data entry and,by saving time, will enhance the time available for you to interact with thepatient during the consultation.

A macro is a series of keystrokes or mouse clicks which are recorded, thenautomatically played back when required so that, for example, during aconsultation for a simple urinary infection, one simple keystroke could add aRead code entry, some free text, and generate a prescription, just by hitting,ALT-F7 (i.e. holding down ALT and pressing F1) – assuming of course that you’vepreviously set up the macro editor to carry out these precise tasks when ALT-F7is pressed. Microsoft Windows itself has a simple macro recorder, but itrequires a much more sophisticated macro program to obtain the greatest benefitfrom the macro approach to data entry. An example is Macro Express 2000,a refined, stable and flexible macro editor that also gives excellent value formoney. A demonstration version of this program is available on the web at http://www.macros.com.

Examples

Here are some examples of macros for System 6000 that can be performed withone keystroke:

  • Discontinue a medication item.
  • Initiate a physiotherapy referral including the printing of the request form!
  • Provide a picking list of referral codes with a popup menu.
  • Provide a picking list of practice-specific or difficult-to-find Read codes.
  • Provide a picking list of different reminders to be automatically entered for, say, a year ahead.
  • Enter a new current problem, associated notes, free text and prescription if required for common GP consultations such as backache, URTI, cystitis or otitis media.

The possibilities are limited only by your needs, the use of your computersystem and your imagination. Why limit yourself to macros for the clinicalsystem? Networked practices could have macros for winpopup messages or to sendinternal e-mails to administrative or reception staff. You could switch on thescreensaver; use timed macros; or set up Short Keys: for example, in oursurgery, typing ‘##wcs’ automatically enters ourpractice name, address and telephone number in any program. The macro approachwill simplify data input, enhance the use of your system, reduce the number ofkeystrokes and mouse movements you have to carry out, and increase yoursatisfaction over using the computer as an accessory to clinical care.

Here I’m going to give examples of using Macro Express with System 6000,although the same principles can be applied to any Windows-based surgerysystem¾indeed, to any Windows-based program. The underlying principles alsoapply to the use of other macro editors.

Getting started

  • Download Macro Express from the website http://www.macros.com. (Download it as an .exe file. There is little point in downloading it as a zip file as the time saving is minimal.)
  • Close down all other running programs.
  • Go to the file you’ve downloaded macex.exe. (Exactly where it is located will depend upon what e-mail software you have.)
  • Using Windows Explorer find macex.exe and double-click on it to start the extraction process.
  • Then follow the instructions, placing the files where you want them.
  • Go to Start/Programs/Macro Express to run it (if that’s where you told the computer to place the files).
  • Macro Express can also be placed in the StartUp folder of Windows so that it automatically loads when you switch on your computer1.
  • Configure the settings on the ‘options’ menu so that the program sits in the background and can be seen in the system tray as a red M. (Fig.1.) Clicking this will load the macro editor which allows you to configure your macros.

Macro Express in the system tray

So now Macro Express has loaded. You can see what macros are alreadyavailable (including some demonstrations) by right-clicking on the M icon in thesystem tray, selecting ‘Open editor’ and clicking ‘Next’ until you come to thefinal Editor screen. Now click on the ‘Macros’ tab to see what’s there. Have aplay with the listed keyboard short-cuts to see what the existing macros can doand to get a feel for the potential of macros generally.

Organising your own macros

Now you can begin to think about adding your own macros.

  • At any one time you can have a large number of different macros available, each triggered by a different combination of keypresses (Alt-F1, Alt-SHIFT-F1, CTRL-ALT F1 etc).
  • But macros aren’t limited to the function keys. CTRL-SHIFT-M is just as valid a keystroke (‘hot key’) to trigger a macro. A hot key can be any combination of ALT, CTRL and SHIFT plus a character key, though you should use combinations of CTRL and alphabetical keys with great care, as many of these combinations already have functions within Windows and Word. (For example, CTRL-C and CTRL-V are the Windows and Word key combinations for Copy and Paste)
  • You can also trigger macros by the use of ‘Short keys’. These are key sequences which are captured and expanded – such as ##wcs which in our surgery expands to give our full address.If you’re using Short Keys, make sure that the key sequence that automatically triggers the macro isn’t likely to occur in unwanted situations e.g. although you might decide to use ‘add’ as a short key to trigger the insertion of your address, typing in ‘addition’ or ‘addendum’ will then have unfortunate consequences! To get round this problem, go to the Options/Shortkeys menu of Macro Express and activate the ‘Use prefix keys’ button, then in the box below set your prefix keys to something such as ##. This then means that a ShortKeys macro will only function if ## is typed first. You could then use ##add to trigger your address.
  • If required, a macro can be set to operate only when a specific window or program is active, which allows a keystroke such as ALT-F1 to perform different macros in different programs. This allows almost limitless keystroke combinations, tailored to the differing needs of the user of each program..
  • In addition to the huge range of key combinations and Short Keys, you can save and load completely different files of macros for different sets of circumstances. For example, you might have one macro file for use during surgery consultations; a completely different one for your diabetic clinic, and a third for use during e-mail sessions. (You can also set up a macro to allow you to swap between these files with minimum fuss.)

Remembering what does what

All this generates a problem of its own: how to remember all the differentkeystrokes! Torex have a ‘Toblerone’ for System 6000 – a printed cardboard prismthat sits above the function keys on the keyboard. This aide-memoire labels thefunction keys, showing the action performed when you press the key, for exampleLOCK for F2. We have produced our own version of thisdevice that includes prompts for ALT, CTRL and CTRL-ALT function keyactions. At a glance this gives instant labelling of over thirty function-keymacros. Fig, 2. A floating menu bar (floating.bmp)

Macro Express provides some neat solutions to the problem of knowing whichmacro does what.

It will allow the configuration of a floating menu bar, whichsits on the desktop on top of all windows: it is therefore always visible. Weuse this to change the session encounter with one click¾our icon buttonsperform Administration, ‘Seen in surgery’, Phone, Visit and Casualty encountermacros.

A floating menu bar

Macro Express can produce popup menus. These are user-configurablelists of macros that can be grouped together. These popup menus can also bedisplayed and accessed via a mouse click in the system tray: the C, M, R and Sicons in the system tray picture (Fig.1) refer respectively to popup menus forRead Codes, Medication, Reminders and SOPHIEs. The popup menu screenshot (Fig.3) shows our SOPHIE menu, triggered by clicking on the ‘S’ in the system tray(don’t forget that this popup menu is also a macro, so it can also be accessedby a specific keystroke). Having called up this window, a double click on, say,’Contraception SOPHIE’, or alternatively pressing ‘7’ on the keyboard, willautomatically load and start our custom contraception SOPHIE for that patient.Setting up your own macros Setting up macros in the configuration editor is notdifficult. Before you start, visit the Options/Settings of Macro Express andactivate ‘Show in system tray’ and ‘Make “Modify Directly” the defaulteditor’. These settings will make Macro Express easier to use.

A popup menu

Importing macros

Once you have had a look at how Macro Express works, it might be worthwhiledownloading the MACRO.MEX file  and importing thefile into Macro Express using the File/Open menu. You can then see on your owncomputer how the macros work in relation to System 6000. Similarly, once you’vebuilt your own macro set, you can export it as an XYZ .MEX file (fill in yourown filename) to the central server, then import it from there into otherworkstations: now everyone in the practice can have access to the same macroset. Build your own

To generate your first macro from Macro Express, open the Macro Expresseditor, hit the ‘Add Macro’ button, then type the hot key you wish to use. Bewary – some key combinations also perform Windows actions (eg.CTRL-F6), so avoidthese combinations. There are two directions to take now: ‘Scripting editor’ or’Enter directly’. Choose the latter, now – you may wish to explore the scriptingeditor yourself later.

Let’s build a specific macro – for example, the procedure used in System 6000to make a current problem dormant. Normally this requires several mouse clicks;it can also be performed (though more laboriously) by the followingkeystrokes:

F7 <TAB> <TAB> <TAB> <TAB> – <TAB> <TAB> <TAB> <SHIFT TAB> <ENTER>

Try it in System 6000. (Don’t forget the minus sign in there!) Now enter thissequence in the ‘Modify directly editor’. Having entered the macro itself, wehave to say how and where it can be called. Click the Properties tab in theEditor. Here you assign a specific keypress to start the macro – let’s make itCTRL-F12. You can also make the macro available to run only in a specificprogram. Click the Program button, then Select. A new window appears. If System6000 is running on your computer, the program clinic.exe will be visible -select this. If not, enter clinic.exe in the top box. Save your macro. Now tryit out! With System 6000 and Macro Express running, highlight a current problem,hold down CTRL and dab F12. The current problem automatically becomes dormant!

The ‘Modify Directly editor’

Capturing keypresses and mouse clicks

It is also possible to ‘capture’ your macro directly by ‘recording’ thekeystrokes using Macro Express: this can sometimes be the easiest way for thebeginner to start learning how to use macros. As well as keystrokes it is alsopossible to capture mouse movements and clicks, but beware! If you use it at adifferent screen resolution (perhaps on a colleague’s workstation) then themacro won’t work properly because the position of the mouse will be differentfor different screen resolutions. Equally, if you work with a window that isless than full-screen, and move it, then a macro made up of mouse clicks may notwork. It is usually better to stick with keystrokes to avoid theseproblems.

To make Macro Express record keypresses and mouse clicks, set up System 6000at the place where you would normally want to start your new macro. Now go tothe Editor, press the ‘Quick Wizards’ tab, then the large button labelled’Capture a Macro’. You will be asked a few, self-evident questions: the mostimportant answer is to minimise Macro Express before recording the macro, so asto make sure that it doesn’t get in the way. Now you will find that you are putback in System 6000 at just the place to start recording the macro. Carefullypress the correct keys or use the mouse to carry out the required actions,remembering to stop the recording when you have come to the end of your plannedmacro. And that’s all there is to it! If you make a mistake, you can use theMacro Editor afterwards to edit your work.

Editing existing macros

Whatever method you used to create your macro, you can edit it using the’Modify Directly Editor’. This can be very useful if you’ve made a simplemistake during the recording of a directly captured macro; it’s also helpfulwhen you want to change some text within the macro. For example, you may have amacro to enter flu jabs, but you need to change the lot number. There’s no needto go to the trouble of recording the whole macro again (and risk making amistake): simply use the Editor to change the Lot number and away you go again!

Setting up floating menu bars and popup menus

To devise a popup menu or floating menu, click the Add Macro icon, then thepopup menu or floating menu button. This produces a new window that looksvaguely familiar! It works like the issue medication box in System 6000, soclicking on a macro in the top box will select it and drop it down to the secondbox. The order of the macros in the bottom box can be altered by moving anindividual macro up or down the list. The Properties tab will allow you tochoose to view the final menu either as icons or as text descriptors.

Combining macros together, like programs

More sophisticated users can use the simple programming language in MacroExpress to define more complex macros which will perform calculations, If…Then… macros, combine macros together, run programs in certain situationsor even devise SOPHIE-like interactive macros. The limit is only yourimagination.

Organising your macros

  • Plan groups of similar macros so that the initiating keystrokes are similar: e.g. Read codes, medication, SOPHIEs or medical software events.
  • Use coloured icons in the editor to differentiate between these groups so that adding further macros later will be intuitive and logical.
  • Name your macros logically and descriptively, and assign them to categories which make groups of macros easy to identify.
  • Macros can be recorded automatically, but it may be easier for the beginner to work out the keystrokes required, then enter them directly into the editor.
  • Macros can be workstation specific or networked around the whole practice. It may be useful to have different sets of macros for doctors, receptionists, nurses and administrative staff.
  • Having practice-specific macros on each type of workstation means that a user may move between workstations and initiate the same macro with the same keystrokes.

You can explore in detail how Macro Express can be used in the surgery withdownloads of a macro file ready configured for using System6000 with Macro Express, and a keyboard ‘Toblerone’template. When using our macros make sure you read the instructions,so that you know where you have to be in System 6000 when triggering each macroin order to gain its desired effect.

Exit mobile version