Home > System 6000 > Macros

Search

Macros: make your computer do the work!

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

When you find yourself typing the same thing over and over again, stop and ask yourself whether your computer could do it for you. Computers are excellent for performing repetitive tasks, so why waste time and energy doing them yourself? 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 the patient during the consultation. 

A macro is a series of keystrokes or mouse clicks which are recorded, then automatically played back when required so that, for example, during a consultation for a simple urinary infection, one simple keystroke could add a Read 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've previously set up the macro editor to carry out these precise tasks when ALT-F7 is pressed. Microsoft Windows itself has a simple macro recorder, but it requires a much more sophisticated macro program to obtain the greatest benefit from the macro approach to data entry. An example is Macro Express 2000, a refined, stable and flexible macro editor that also gives excellent value for money. 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 with one keystroke: 

The possibilities are limited only by your needs, the use of your computer system and your imagination. Why limit yourself to macros for the clinical system? Networked practices could have macros for winpopup messages or to send internal e-mails to administrative or reception staff. You could switch on the screensaver; use timed macros; or set up Short Keys: for example, in our surgery, typing '##wcs' automatically enters our practice name, address and telephone number in any program. The macro approach will simplify data input, enhance the use of your system, reduce the number of keystrokes and mouse movements you have to carry out, and increase your satisfaction 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 surgery systemžindeed, to any Windows-based program. The underlying principles also apply to the use of other macro editors. 

Getting started 

Macro Express in the system tray

Macro Express in the system tray

So now Macro Express has loaded. You can see what macros are already available (including some demonstrations) by right-clicking on the M icon in the system tray, selecting 'Open editor' and clicking 'Next' until you come to the final Editor screen. Now click on the 'Macros' tab to see what's there. Have a play with the listed keyboard short-cuts to see what the existing macros can do and 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. 

Remembering what does what

All this generates a problem of its own: how to remember all the different keystrokes! Torex have a 'Toblerone' for System 6000 - a printed cardboard prism that sits above the function keys on the keyboard. This aide-memoire labels the function keys, showing the action performed when you press the key, for example LOCK for F2. We have produced our own version of this device that includes prompts for ALT, CTRL and CTRL-ALT function key actions. At a glance this gives instant labelling of over thirty function-key macros. Fig, 2. A floating menu bar (floating.bmp) 

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

 It will allow the configuration of a floating menu bar, which sits on the desktop on top of all windows: it is therefore always visible. We use this to change the session encounter with one clickžour icon buttons perform Administration, 'Seen in surgery', Phone, Visit and Casualty encounter macros. 

A floating menu bar

A floating menu bar

 

Macro Express can produce popup menus. These are user-configurable lists of macros that can be grouped together. These popup menus can also be displayed and accessed via a mouse click in the system tray: the C, M, R and S icons in the system tray picture (Fig.1) refer respectively to popup menus for Read 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 accessed by a specific keystroke). Having called up this window, a double click on, say, 'Contraception SOPHIE', or alternatively pressing '7' on the keyboard, will automatically load and start our custom contraception SOPHIE for that patient. Setting up your own macros Setting up macros in the configuration editor is not difficult. Before you start, visit the Options/Settings of Macro Express and activate 'Show in system tray' and 'Make "Modify Directly" the default editor'. These settings will make Macro Express easier to use.

A popup menu

A popup menu

Importing macros 

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

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

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

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 this sequence in the 'Modify directly editor'. Having entered the macro itself, we have to say how and where it can be called. Click the Properties tab in the Editor. Here you assign a specific keypress to start the macro - let's make it CTRL-F12. You can also make the macro available to run only in a specific program. Click the Program button, then Select. A new window appears. If System 6000 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 try it 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'

The 'Modify Directly editor'

Capturing keypresses and mouse clicks

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

To make Macro Express record keypresses and mouse clicks, set up System 6000 at the place where you would normally want to start your new macro. Now go to the Editor, press the 'Quick Wizards' tab, then the large button labelled 'Capture a Macro'. You will be asked a few, self-evident questions: the most important answer is to minimise Macro Express before recording the macro, so as to make sure that it doesn't get in the way. Now you will find that you are put back in System 6000 at just the place to start recording the macro. Carefully press 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 planned macro. And that's all there is to it! If you make a mistake, you can use the Macro 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 simple mistake during the recording of a directly captured macro; it's also helpful when you want to change some text within the macro. For example, you may have a macro to enter flu jabs, but you need to change the lot number. There's no need to go to the trouble of recording the whole macro again (and risk making a mistake): 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 the popup menu or floating menu button. This produces a new window that looks vaguely familiar! It works like the issue medication box in System 6000, so clicking on a macro in the top box will select it and drop it down to the second box. The order of the macros in the bottom box can be altered by moving an individual macro up or down the list. The Properties tab will allow you to choose 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 Macro Express to define more complex macros which will perform calculations, If... Then... macros, combine macros together, run programs in certain situations or even devise SOPHIE-like interactive macros. The limit is only your imagination.

Organising your macros

You can explore in detail how Macro Express can be used in the surgery with downloads of a macro file ready configured for using System 6000 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 macro in order to gain its desired effect.