Why is complex value of complex obs empty

Hi all

I added a concept of type Complex and handler, TextHanlder. I used this concept to save a complex obs from the admin UI. After uploading and saving a file with no error. I get a link to download the saved file. After downloading the file, I opened it an its empty. It did not have the contents of the original file. Also the link that says view in another window also displays a blank page.

When clicking on that link, can you confirm that you indeed enter the fetching part of TextHandler, so the getObs(Obs obs, String view) method?

Furthermore, you may already look for more clues here under.

So you mean that in the admin UI, it is just blank on the right hand side of ‘Complex Value*’? (see screenshot below) <img src="/uploads/default/original/2X/e/e30e79bfce0e5aaebe6022e325cab13ee2f4815b.png" width=“400” ">

If yes, can you try to debug this in TextHandler upon saving a complex obs?

When debugging please note the exact file path that has been used and the valueComplex that was saved for the obs:

  1. Here for the file path.
  2. And here for the valueComplex value.

If all this happens how it should, this may just be that the legacy admin UI simply doesn’t know how to render the complex data. In that case the VDUI module could be really useful for troubleshooting as it would let you access your obs again (but it would have to be attached to a visit, so to an encounter within a visit). But the fact that the ‘Complex Value*’ field may show as empty/blank is really suspicious. My screenshot for instance illustrates what you would see with an image. And note that in my case I am also unable to render it in another window with the provided link, but I get some other error message than yours though. However all is fine through using VDUI, the image is displayed as expected.

From the snapshot it shows that the value is actually an image but you’re using a text handler, you need to set the handler to ImageHandler

@mksd the problem am having has nothing to do with my code. I downloaded platform 2.0 and legacyui module. Here is a snapshot

From the screenshot, when I click on the view link, i get a blank page. When I click on download it downloads an empty file.

@wyclif am using html files.

I didn’t say it had anything to do with your code, possibly the text handler got broken when things were moved to the legacyui module

I did not say you did. I was reading the replies from my phone and @mksd response was kind of suggesting that I look at the code. Thats why I said It has nothing to do with my code, what I was trying to say is that, I don’t have access to the code for that section as I download both platform 2.0 and legacyui package webapps.

I think it’s a bug in the text handler, , even the URL to view the text in a window seems broken, do you mind creating a ticket to get it fixed?

If you read again what I wrote, you will see that I was asking you to debug TextHandler, not your own code. I was suggesting that the problem could be coming from the handler that you were using. It seems that it is @wyclif’s feeling too.

1 Like

Hi @ivange94,

Did you get this to work, could you confirm whether TextHandler is working correctly?

Hi @mksd

Sorry for no feedback on this. This did not work(I did not try to debug it either). My mentor reported similar issues with the text handler, so I guess there is a bug with it. But due to the tight deadline for my gsoc project I did not get the time to look into this. My mentor proposed another solution that will not need to use the complex obs. Its darius response on this thread Help with embedding complex obs inside RadiologyReport.java

One of the reasons for this was due to the argument that darius provided on the thread.