I am in the implementation process for CWS (Community Wide Scheduling). We are to the point where we need to input the appointment types, there are over 1000 appointment types and I surely don't want to be the one to key them in. We have a scripting program
Macro Express it is a very nice scripting program for the windows environment, but we all know Meditech Magic is not exactly the windows environment.
I had just received the granting of my request for
Iatric System's Scriptlink+ standard. It is a very nice scripting program to use with Magic. Scriptlink communicates directly with the Meditech terminal, and not with windows so you can actually use other programs at the same time the script is running. This also helps, but not eliminates, timing issues. To download and activate Scriptlink+ standard which is free, you must fill out a request form on
Iatric's website. It only took 2 business days to receive the download link.
I downloaded from NPR all of our OE procedures then in excel I manipulated the data to make some changes to the mnemonics to fit our CWS strategy. Then I saved the file as a comma delimited you can download my entire script
here, but here is a break down of the script.
Actual script code will be in
green.
€OPEN FILE "C:\cws.err" FOR REPLACE AS OutFile
This replaces a file for a specific error output I want to track.
€MERGE BLOCK "c:\cws.csv"
€MERGE READ TO Mnemonic AS TEXT€MERGE READ TO Description AS TEXT€MERGE READ TO Group AS TEXT€MERGE READ TO Dur AS TEXT€MERGE READ TO OECat AS TEXT€MERGE READ TO OEProc AS TEXTMerge block starts a loop on the file specified and reads the six filed and puts them in to named variables.
The comma delimited file is laid out like this:
Mnemonic,description,group,duration,OE Category,OE Procedure
€PAUSE 1€REM * * * Mnemonic * * *€SEND Mnemonic€WAIT WINDOW "Yes/No Confirmation" 30 1YHere we wait for 1 second then send the data stored in the variable Mnemonic to Meditech. Then we wait for the Yes/No window to pop up because this is a new appointment type. Notice the remark, this is both useful if someone else uses your script and also the separate sections of your script so it is easier to find a specific place while you are writing it and fixing any problems.
Then we do about the same with description, group and duration.
€REM * * * OE order * * *€CHR 147€WAIT WINDOW "SCH Appointment Type Enter/Edit Screens" 30 1€CHR 8
5
€SEND OeCat
€SEND OeProc
The CHR 147 is
F12, the help in the program has a list of all the useful key codes that you will send. We again wait for a window to
pop up then we send CHR 8 which is backspace. 5 to go to page 5, and send the OeCategory
and OeProcedure.
€IF WINDOW "Error" 5 1
€REM * * * ERROR * * *
€PRINT TO OutFile Mnemonic
€CHR 10
€ELSE
€END IF
We wait for 5 seconds for an error window, some of the OE procedures downloaded are not order able from scheduling so we get an error.
If we do get that error, we print that mnemonic to our error file and send an F10 to clear out the procedure. If there is no error, we send an Enter.
€REM * * * File * * *
€CHR 147
€PAUSE 1
Now we are ready to file the appointment type. CHR 147 is F12, and we wait 1 second for the file procedure to complete.
€END MERGE
This is the end of the loop.
This script will take approximately 50 minutes for 100 Appointment types, but unlike MacroExpress, I don't have to sit and watch it waiting on some anomaly that I could not account for. I will submit that the problems I have with MacroExpress could very much be due to my inexperience with the product.
If you have any experience or question with regards to Macro Express or
Scriptlink+ let me know your thoughts.
Labels: cws, link, script, scripting, scriptlink, scriptlink+