A community of 30,000 US Transcriptionist serving Medical Transcription Industry
You know, transcribing lab values has always been a pain. I have been working on various and sundry macro ideas for quite a while trying to streamline this process and help with accuracy. Who knows, maybe next year I will have steamlined and debugged the utilities I have been working on so that I will actually have something useful, which I will publish. However, when I read your comment yesterday, I thought maybe I could write a quick-fix macro that would fix this particular problem most of the time. This macro, which I will post below, is written in word so if you are using a non-word platform it won't help but if you are, perhaps you might find it useful. In any case, you might that some of the code useful as examples if you are trying to write your own macros.
This is actually three macros which should be pasted into your normal dot. If you are using another attached template for macros (which you really should) than you can paste it in that template but you will need to change the line "CustomizationContext = NormalTemplate" to "CustomizationContext = ActiveDocument.AttachedTemplate"
These macros are assigned to the Alt-Delete Key. I put it on this key because I suspect that very few people use this key combination for anything.
To bind the macro LabEntries to the Alt-Delete key, you will need to run the macro called "LabEntriesHotKey." If you want to clear the key, run the macro "ClearLabEntriesHotKey." If you want to bind the macro "LabEntries" to another key, you can do so by recording a macro. In that case do not run either of these macros.
The macro "LabEntries" has a message box that pops up and you type in either the labvalue or the labname, whichever the doctor dictates first, and then in the 2nd box you type the following value (or name) so if the doctor says hemoglobin 12.2 you type hemoglobin in the first box and 12.2 in the 2nd, on the other hand if he says 12.2 hemoglobin you type it in that order.
You can type in your autocorrect abbreviation if you have one, for example if you have "WBC" for "wbc", and type in "wbc" the macro will look into autocorrect and see if there is an entry for wbc.
If you do not type in anything in the input box and the macro will stop and insert what you have typed, if anything, into your report. Also the macro assumes you are typing a sentence, so the first word will be capitalized and a period and 2 spaces inserted at the end. The macro will always type the lab name first and then the lab value (hemoglobin 12.2, hematocrit 35.8, etc.) If there is no number typed in the macro will insert in the order you type it in ("hemoglobin normal, normal hematocrit" -- unfortunately I have not yet figured out a logical way to fix this, but I might be able to come up with something in which case I will post a revision.)
I am pasting the macro into the post to follow.
I hope it heps you a little bit. Any feedback would be appreciated.
Sub LabEntriesHotKey()
' Macro created 8/18/2011 by WordExpressTranscriptions
CustomizationContext = NormalTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyAlt, wdKeyDelete), _
KeyCategory:=wdKeyCategoryMacro, Command:="LabEntries"
StatusBar = "LabEntries Macro HotKey (Alt-Delete) Enabled"
End Sub
Sub ClearLabEntriesHotKey()
' Macro created 8/18/2011 by WordExpressTranscriptions
CustomizationContext = NormalTemplate
FindKey(BuildKeyCode(wdKeyAlt, wdKeyDelete)).Disable
StatusBar = "LabEntries Macro HotKey (Alt-Delete) Disabled"
End Sub
Sub LabEntries()
' Macro created 8/18/2011 by WordExpressTranscriptions
' to organize lab names and values
Dim Text1, Text2, LabName, LabValue, Char As Variant
Dim A, L As Long: Dim LabString, Title, Message As String
Title = "WordExpress Transcriptions Utility"
Entries: StatusBar = LabString
Text1 = InputBox("Enter value #1:", Title): Text1 = Trim(Text1)
If Text1 = "" Then: GoTo TheEnd
On Error Resume Next: Text1 = AutoCorrect.Entries(Text1).Value: StatusBar = LabString
Message = "Value #1: " & Text1 & vbCr & "Enter value #2:"
Text2 = InputBox(Message, Title): Text2 = Trim(Text2)
If Text2 = "" Then GoTo TheEnd
On Error Resume Next: Text2 = AutoCorrect.Entries(Text2).Value: StatusBar = LabString
LabName = Trim(Text1): LabValue = Trim(Text2): Char = Mid(Text1, 1, 1): A = Asc(Char)
If A > 47 And A < 58 Then
LabName = Text2: LabValue = Text1
End If
LabString = LabString & LabName & " " & LabValue & ", "
GoTo Entries:
TheEnd:
LabString = Trim(LabString)
If (LabString) = "" Then: Exit Sub
L = Len(LabString): L = L - 1: LabString = Mid(LabString, 1, L) & ". "
L = Len(LabString): Char = Mid(LabString, 1, 1): A = Asc(Char)
If A > 96 Then: A = A - 32: LabString = Chr(A) & Mid(LabString, 2, L)
Selection.TypeText LabString
End Sub
First you need to copy the macro code. I think I titled the post "crazy labs macro." Unfortunately I can't check this while I am typing this message.
Then open MSWord. Press Alt-F8 to open your macro dialog box. Then click on edit. You will now be in the macro editor. It should say "Microsoft Visual Basic - Normal - New Macros" at the top. Now move your cursor to the very bottom of the screen and paste the macro code that you copied onto the screen. Now at the top of the screen, click on File, then click on Save, then click on Close and Return to Word.
Now Press Alt-F8 again to open the macro dialog box. High-light "LabEntriesHotKey," now click on "Run." This should return you to the main screen and you should get a message at the bottom of the word screen that the hot key (alt-delete) has been enabled.
Now when you want to run the lab macro all you need to do is press Alt-Delete and start the macro.
If you want to disable the macro key, then you need to follow the same procedure as above but high-light "ClearLabEntriesHotKey." That will un-bind the LabEntries macro from the Alt-Delete Key Combination.
I have an idea to make this macro more useful, by attaching a message to the lab names showing normal values using autocorrect entries, which would make it possible for the MT to customize but I don't know if people would be interested.
This macro as is written now, is pretty plain and doesn't do much. But it will put the labs on the screen in lab name/lab value order, and if you type in your autocorrect abbreviation for the lab name, it wlil find it in autocorrect and use it.
Also, you could print out my first post (I think it is called Crazy Labs) because it tells you how to use the macro and how it works.
If anyone tries this macro and finds it useful (or stupid) please write and tell me what you think and how it could be improved. As I said I have been working on this idea for some time (which will function differently than this macro) and any ideas about what would be helpful or to make it function better would be helpful for the real thing.
Thanks in advance for trying my macro and thanks for taking the time to give me your feedback.
That
I am posting two versions of my jump macro in the post below which I also put on alt-J because it is one of the easiest keys, and I use the macro more than any other.
Because I was a travelling MT, I used chartscript more than any other program, and my jump key searched for "??" but I did modify this to look for "*" instead.
One version of the macro (StarTraveler) leaves the * in place as you jump through the document so the doctor is dictating for example an op note but he does not dictate the headings in order you can move around the document to your headings. The macro will look backward for the macro if it does not find one forward.
The other macro (DeathStar) deletes the star as you jump to that star.
I am including two macros for the customization keyboard if you want to use that for Alt-J. You can follow the instructions I posted above to do that. I set it up for "DeathStar" so if you want to use "StarTraveler" instead, you will need to change the words DeathStar to StarTraveler.
I have a companion macro which I put on Alt-Z that moves backward through the document looking for "??" (which can be changed to "*") that works well the "StarTraveler" macro. If anybody is interested, I will post that macro as well. The only caveat of course is that you need to make sure you delete all of the stars before you return your document.
The way I solved that problem is that I created a macro that runs the spellchecker and saves the document, and also fixes little glitches in the document (such as an extra line) as well as makes sure there are no stars, etc., in the document.
Fortunately, this can be done as a keystroke recording macro.
Macro(s) to follow in next post.
Sub DeathStar()
'This macro deletes the stars as it moves through the document
Dim A As Long
A = Selection.MoveUntil(cset:="*", Count:=wdForward)
If A = 0 Then
With Selection
.TypeText "*"
.WholeStory:
.Collapse:
End With
End If
GoSub WarpDrive:
StatusBar = "StarHopper Utility created by WordExpress Transcriptions"
Exit Sub
WarpDrive:
With Selection
.MoveUntil cset:="*", Count:=wdForward ' find the next star
.Delete
.Font.Bold = False 'just in case
End With
Return
End Sub
Sub StarTraveler()
'This macro leaves the stars in place as it moves through the document
Dim A As Variant
A = Selection.MoveUntil(cset:="*", Count:=wdForward)
If A = 0 Then
GoSub StarChart
With Selection
.TypeText "*"
.WholeStory:
.Collapse:
End With
End If
GoSub WarpDrive:
StatusBar = "StarHopper Utility created by WordExpress Transcriptions"
Exit Sub
WarpDrive:
With Selection
.MoveUntil cset:="*", Count:=wdForward
.Delete
.Font.Bold = False 'just in case
.TypeText "*"
End With
Return
StarChart:
Selection.MoveLeft: A = Selection.Text
If A = "*" Then
Selection.Delete
Else: Selection.MoveRight
End If
Return
End Sub
Sub StarHopperHotKey()
' Macro created 8/21/2011 by WordExpressTranscriptions
CustomizationContext = NormalTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyAlt, wdKeyJ), _
KeyCategory:=wdKeyCategoryMacro, Command:="DeathStar"
StatusBar = "WordExpress StarHopper Macro HotKey (Alt-J) Enabled"
End Sub
Sub ClearStarHopperHotKey()
' Macro created 8/21/2011 by WordExpressTranscriptions
CustomizationContext = NormalTemplate
FindKey(BuildKeyCode(wdKeyAlt, wdKeyJ)).Disable
StatusBar = "WordExpress StarHopper Macro HotKey (Alt-J) Disabled"
End Sub