Launching weasis from command line and the like

330 views
Skip to first unread message

Kirill K

unread,
Mar 10, 2020, 6:24:05 AM3/10/20
to dcm4che
Hi
Trying to launch weasis from command line 
Only way i found working is like this:
start "weasis://%24dicom%3Ars%20--url%20%22http%3A%2F%2Fpacsrack.belroza.local%3A8080%2Fdcm4chee-arc%2Faets%2FDCM4CHEE%2Frs%22%20-r%20%22%26patientID%3D2%22%20%20--query-ext%20%22%26includedefaults%3Dfalse%22"

Problem is our HIS treating % as special symbols
Is there any way to avoid URL encoding, particulary % symbols?

At the moment i cal it from HIS like: 
http://pacsrack.belroza.local:8080/weasis-pacs-connector/weasis?&patientID=%AF_CURRENT_PATIENT%&target=_self
which works fine, but pops up default browser, and that is a bit annoying

Weasis 3.5.4, dcm4chee-arc 5.21-not-secure

Nicolas Roduit

unread,
Mar 10, 2020, 10:20:25 AM3/10/20
to dcm...@googlegroups.com
It is not required to quote the URL. Could you active the debug log in Weasis to see what are the URL requests to dcm4chee.

URL encoding is mandatory to manipulate the URL but it should not be an issue if you use this symbol. I don't understand your workflow. Who is building the URL? and who needs to execute it?

1) Get images directly from dcm4chee (without weasis-pacs-connector)
$dicom:rs --url "http://pacsrack.belroza.local:8080/dcm4chee-arc/aets/DCM4CHEE/rs" -r "&patientID=2"  --query-ext "&includedefaults=false"
weasis://%24dicom%3Ars%20--url%20%22http%3A%2F%2Fpacsrack.belroza.local%3A8080%2Fdcm4chee-arc%2Faets%2FDCM4CHEE%2Frs%22%20-r%20%22%26patientID%3D2%22%20%20--query-ext%20%22%26includedefaults%3Dfalse%22

2) Get images with weasis-pacs-connector
weasis://%24dicom%3Aget%20-w%20http%3A%2F%2Fpacsrack.belroza.local%3A8080%2Fweasis-pacs-connector%2Fmanifest%3F%26patientID%3D2

Kirill K

unread,
Mar 11, 2020, 5:32:50 AM3/11/20
to dcm4che
Our HIS calls weasis just like windows command line, but it is uses percent symbol for its own purposes, thats why i asked if it's possible to avoid using it.

вторник, 10 марта 2020 г., 17:20:25 UTC+3 пользователь Nicolas Roduit написал:

Nicolas Roduit

unread,
Mar 11, 2020, 1:06:45 PM3/11/20
to dcm4che
If HIS is a web app, so simply make a button with a javascript that encodes the URL after the id is replaced: weasis:// + encodeURIComponent(command)

Otherwise, if it is a native app, run the command according to the system into a script. On windows see this post.

Kirill K

unread,
Mar 18, 2020, 6:16:27 AM3/18/20
to dcm4che
So, in case anyone interested, i ended up with the following powershell script, which works as i need:
Param(
    [Parameter(Mandatory=$true)]
    [Int32]
    $PatientID
)

$RSPath='$dicom:rs --url "http://pacsrack.belroza.local:8080/dcm4chee-arc/aets/DCM4CHEE/rs" -r "&patientID='+$PatientID+'"  --query-ext "&includedefaults=false"'

$RSStart = "weasis://"+[uri]::EscapeDataString($RSPath)

start $RSStart



среда, 11 марта 2020 г., 20:06:45 UTC+3 пользователь Nicolas Roduit написал:

Nicolas Roduit

unread,
Mar 21, 2020, 12:45:33 PM3/21/20
to dcm4che
Thanks, it could be useful for others
Reply all
Reply to author
Forward
0 new messages