KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Inconsistent command response
Topic Summary: sometimes it works, sometimes not
Created On: 12/15/2011 08:32 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 Inconsistent command response   - SJRockower - 12/15/2011 08:32 PM  
 Inconsistent command response   - Alan Cantor - 12/17/2011 04:31 PM  
 Inconsistent command response   - bk82 - 12/18/2011 11:46 AM  
 Inconsistent command response   - SJRockower - 12/18/2011 05:44 PM  
 Inconsistent command response   - bk82 - 12/18/2011 06:08 PM  
Keyword
 12/15/2011 08:32 PM
User is offline View Users Profile Print this message

Author Icon
SJRockower
Senior Member

Posts: 106
Joined: 10/02/2006

I have a command to look up ICD9 diagnosis codes, "Diagnosis <0to9><0to9><0to9>point<0to9>", which is very inconsistent in its response.  Sometimes it works correctly, sometimes I get the words "Diagnosis 715.16", and sometimes it closes Dragon or my Access program or opens a printer box or other weird stuff.  It doesn't seem to be the same command sequence.  It gets somewhat better if I hold down the CTRL key when I say the command, but not always.  If it doesn't work correctly, the next time I try it will.  Does anyone have any ideas?

 

Sub Main
'5.27.03  Latest attempt

'added ref to Access 9.0

'11.27.11 Ref to Access 14  (Office 2010)

Dim DxNum As StringDim diagnosis As String
Dim appAccess As Access.Application
Set appAccess = CreateObject("Access.Application.14"
appAccess.OpenCurrentDatabase "X:\Access\DictData.mdb", False

DxNum= ListVar1 & ListVar2 & ListVar3 & "." & ListVar4

diagnosis=appAccess.DLookup("Diagnosis", "NewICD9", "[ICD9]='" & DxNum & "'" 

SendKeys diagnosis & " {(}" & DxNum & "{)}"        'or, use senddragonkeys, per Larry Allen 5/28/03
Set appAccess=Nothing

End Sub
 



-------------------------

Stephen J. Rockower, MD


Capitol Orthopaedics & Rehabilitation, LLC


Rockville, Maryland, USA


www.cordocs.com


@DrBonesMD

 12/17/2011 04:31 PM
User is offline View Users Profile Print this message


Alan Cantor
Top-Tier Member

Posts: 1488
Joined: 12/08/2007

I would begin by adding a delay between these two steps:

 

diagnosis=appAccess.DLookup("Diagnosis", "NewICD9", "[ICD9]='" & DxNum & "'" 

SendKeys diagnosis & " {(}" & DxNum & "{)}"   

... just in case the lookup needs time to complete before sendkeys is processed.

 

 12/18/2011 11:46 AM
User is offline View Users Profile Print this message


bk82
Top-Tier Member

Posts: 215
Joined: 08/04/2007

It's hard to say what causes the trouble. You seem to have used this script for quite some time. Did the trouble start recently or have you had the problem since the beginning?

You might want to try and vary the naming of your command. Add some more words in between the numbers.

Diagnosis <0to9><0to9>and<0to9>point<0to9>

Or create an input box where you can insert the code by voice command once it's focused. This would be slower, but more reliable.



-------------------------

DNS 12 Pro, Medical, Premium - German, English, French - Dragon Dictate 3.0, dns.comfort


 


Core i7 950, Windows 7 Ultimate 64-bit, Intel Core i7 950, 12 GB RAM, L2 2MB; Mic: Jabra Chromo NC 2400 USB.


 


www.in2comp.ch 

 12/18/2011 05:44 PM
User is offline View Users Profile Print this message

Author Icon
SJRockower
Senior Member

Posts: 106
Joined: 10/02/2006

As you can see, I have been using this script since at least 2003.  It has worked for a number of years.  The current problem began as I "upgraded" to DNS11 Medical AND Office 2010 (from 2000).  I'm not completely sure this is a DNS problem or a Microsoft problem.  It is weird, however, that a particular diagnosis code ("Diagnosis 722.52" for example, using a variation with 5 variables) will sometimes work correctly and sometimes work wildly wrong.  The yellow recognition box and Recognition History are always correct, however. 

Does anyone know a way to step through a script other than using MsgBox at various places???

 

bk82, why would adding words to the name of the command help?



-------------------------

Stephen J. Rockower, MD


Capitol Orthopaedics & Rehabilitation, LLC


Rockville, Maryland, USA


www.cordocs.com


@DrBonesMD

 12/18/2011 06:08 PM
User is offline View Users Profile Print this message


bk82
Top-Tier Member

Posts: 215
Joined: 08/04/2007

My suggestion to add words to the command should help Dragon distinguish the commands from "normal" numbers. I presumed that part of the command recognition problem stems from confusing numbers like 715 with command elements from a list. By making the single numbers more distinct from standard dictation, you should be able - in theory - to improve command recognition reliability. Therefore I've suggested adding words.

If the assumption is false - as it seems to be, since the recognition history and the results box suggest that Dragon recognizes the commands correctly - there may be a problem in the way Dragon handles commands. I have also noted that some Advanced Scripting commands start behaving erratically, stop working altogether or do work on one PC, but not on another,  after upgrading. There is not much an end user can do about this but change the way the command works.

I suggested breaking the command down into two steps to make it more reliable. The thinking is: If Dragon (or Windows, or Access) cannot handle the spoken command properly, they may be able to handle a string of text - Such as the one that is passed from the inputbox.

The first part would be using an input box where you can verify your entry. Then you pass the contents of the input box on to Access as you did before.

Sub Main
'5.27.03  Latest attempt

'added ref to Access 9.0

'11.27.11 Ref to Access 14  (Office 2010)

Dim DxNum As StringDim diagnosis As String
Dim appAccess As Access.Application
Set appAccess = CreateObject("Access.Application.14"
appAccess.OpenCurrentDatabase "X:\Access\DictData.mdb", False

' I have commented your old command out to show the difference
' DxNum= ListVar1 & ListVar2 & ListVar3 & "." & ListVar4

DxNum = InputBox ("ICD Code query", "Enter your ICD9 code here", ListVar1 & ListVar2 & ListVar3 & "." & ListVar4) ' Note: the part after the last comma is  the default value, which corresponds to your variable.

diagnosis=appAccess.DLookup("Diagnosis", "NewICD9", "[ICD9]='" & DxNum & "'"

SendKeys diagnosis & " {(}" & DxNum & "{)}"        'or, use senddragonkeys, per Larry Allen 5/28/03
Set appAccess=Nothing

End Sub

 As I have no means of testing this, I would be grateful for feed back.

 

Does anyone know a way to step through a script other than using MsgBox at various places???

 Apart from MsgBox you can use wait times of several seconds (e.g. Wait 2). 



-------------------------

DNS 12 Pro, Medical, Premium - German, English, French - Dragon Dictate 3.0, dns.comfort


 


Core i7 950, Windows 7 Ultimate 64-bit, Intel Core i7 950, 12 GB RAM, L2 2MB; Mic: Jabra Chromo NC 2400 USB.


 


www.in2comp.ch 

Statistics
27374 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 1 users logged in.
The most users ever online was 2028 on 04/05/2013 at 07:36 PM.
There are currently 125 guests browsing this forum, which makes a total of 126 users using this forum.

FuseTalk Standard Edition v4.0 - © 1999-2013 FuseTalk™ Inc. All rights reserved.