nroduit / weasis-pacs-connector

Connect Weasis to any PACS supporting WADO
Other
52 stars 55 forks source link

Error launching /IHEInvokeImageDisplay with HTTP HEAD #10

Closed bgeVam closed 6 years ago

bgeVam commented 7 years ago

Hi!

I am currently trying to integrate weasis-pacs-connector (v 5.0.1) with the Bahmni EMR. I already did succeed with a little workaround, but I want to overcome the issue I am having. By default the Bahmni EMR calls a prepared link to a viewer as HTTP HEAD:

"pacsImageUrl":"https://10.181.135.102:8443/weasis-pacs-connector/IHEInvokeImageDisplay?requestType=STUDY&accessionNumber={{orderNumber}"

Unfortunatley, this HTTP HEAD request results in an error 404 from /weasis-pacs-connector/jnlpBuilder

Changing the HTTP type to GET works fine, but this is not supported by Bahmni.

So in my opinion, the issue must be in WeasisLauncher.java, where the HTTP GET, POST and HEAD are treated different. Could you explain what the intention behind this is?

For more information see my thread in the Bahmni discussion.

nroduit commented 7 years ago

The http HEAD was intended to check if the jnlp template is available as it is possible tor provide a custom one. I'm not sure it's still working correctly because some names has changed.

For your type of requests, there is no implementation of HEAD because it would be the same of doing the whole process.

I would recommend to use at least the version 6.1.3 which is up to date (e.g. for supporting Java 9, for having the jnlp proptocol).

bgeVam commented 7 years ago

Thank you for your quick reply. I updated to version 6.1.3 without success.

because it would be the same of doing the whole process.

Could you explain that?

nroduit commented 7 years ago

I'm not familiar with http HEAD, but generally you request it to check if the resource is available. What I mean is that it will be the same of the GET in terms of processing but without the result. So it seems useless.

Why do you need to use http HEAD?

bgeVam commented 7 years ago

Because the script that calls the URL does this with HEAD. A Bahmni developer states as follows:

The use of HEAD is actually intention, so as to get only the header of the resource, without fetching the content, and allowing the client (say OVIYAM viewer) to subsequently make appropriate requests by inspecting the headers (e.g Content-Type).

The code in this commit fixes the issue for me. Anyway, I was wondering what steps we could take to fix this on your repository (as the 404 should definitley not happen)?

nroduit commented 6 years ago

The fix has been applied in 6.1.4 and 7.0.0