Happy Friday!
Is running an executable from a button an option within GE.
I am trying to get my OB docs quick access to the Tyrer Cuzick Breast Cancer risk form. It's an executable that calculates the patient's risk after data entry.
Tried the RUNSHELLOPEN...but not sure this is the way.
Any help is appreciated.
Rebecca B.
To run an executable, you only need to make sure your filepaths are accurate. This can be a headache as MEL code and Centricity do weird things to \ used in filepaths. Maybe that is the problem you are running into.
I work around it, try this...
Modify my example to contain the actual executable name and file path where it is located.
Here is my example:
Put this code in a button, choose RUNPROCESS for the button type.
{
/* Example, if your executable is named: BCRA.exe
and located in folder (BCRAfiles) on a server (emrserver)
this would be the filepath: emrserver\BCRAfiles
But MEL and Centricity sometimes duplicate the \'s and this can mess up functions you pass to.
So instead, replace \ with numtoascii(92), which is a backslash in ascii code
*/
local theDIR=numtoascii(92) + numtoascii(92) + "emrserver" + numtoascii(92) + "BCRAfiles"
local theEXE="BCRA.exe"
// This should open the BRCA.exe program
RUNSHELLOPEN(str(theDIR + numtoascii(92) + theEXE),"","")
======
Does your Breast Cancer executable accept command line input arguments ?
Check your documentation. If it does accept parameters (such as patients age, weight, etc... any other patient data needed...) then you can pass those in too...
Here is an example of passing input parameters into the filecopy executable
(from the EMR Help on the RUNSHELLOPEN command...)
Invoke the filecopy program with arguments.
{
local progname = "filecopy.exe"
local argStr = "-i inputFile2Copy.txt –o Copied2ThisOutputFile.txt"
local dirStr = "c:/Program Files/TestIt"
status = RUNSHELLOPEN(progname, argStr, dirStr)
}
Hope this has not been too much 🙂
- Beverly
Oh, yes, and you could just try using forward slashes / instead of backslashes \
in your filepath names. That works too usually.
- Beverly
Rebecca,
Has your problem been solved ? If so, can you check the answer as solved ?
- B