Page 1 of 1

Program Link Optional Command Line

Posted: Tue Sep 07, 2021 4:26 pm
by PDCsupport
Hello,
I have written a quick Java application that, when launched on the workstation given a patient number, reads that patient's demographic information and writes that data into a communication web application we use among our 14 different practices.
I have created a new Program Link that will launch the java program. It does launch the application but I cannot seem to include the PatNum as an argument.

Path of file to open is correct (the application launches but without data)
[PatNum] is in Optional command line.
As far as I can tell the link does not provide the PatNum argument

I can launch the app without an argument and get the same blank behavior.

Have run an output file and included [PatNum]. It writes the correct patient number to the the file every time.

What am I doing wrong? Would love to take advantage of this simple added button to avoid retyping all of the patient demographics.

Thanks in advance for your help.

Re: Program Link Optional Command Line

Posted: Wed Sep 08, 2021 10:32 am
by jordansparks
My guess is that it is getting sent and that you are not capturing it properly. I'm assuming you are selecting a patient in Open Dental before trying to use your button. If you can't get it, then the next step would be for one of our programmers to write a small C# app proving that it is getting sent. The app would basically just be a window that shows any CLA string sent in.

Re: Program Link Optional Command Line

Posted: Wed Sep 08, 2021 3:17 pm
by PDCsupport
Can you give me an example of the command it sends?
My application is called pwexport.jar and I'm trying to pass an argument of patient number [PatNum]
I'm looking for
pwexport.jar 19

Is that how it is passed? are there any other characters included
Thank you

Re: Program Link Optional Command Line

Posted: Wed Sep 08, 2021 3:59 pm
by PDCsupport
I wrote a routine to inspect the passed argument
It was indeed just a number as expected.
The problem turned out to be that it was trying to run in the wrong folder. I wrote a batch file to launch the java script with the passed argument.
calling the batch file made it work
Thank you for your help.

Re: Program Link Optional Command Line

Posted: Thu Sep 09, 2021 8:58 am
by jordansparks
You can include other characters if you want. For example, you could set up your command line argument in OD as follows:
PatNum=[PatNum]
Or, you can just send the number.