File Browser Module PHP Error

Hi everyone,

we are currently trying to use the file browser module( to display patient specific .pdf files from the server. As the module was lastly updated in 2013, the code for the Simple Directory Browsing PHP Script by David Wan is outdated as there is a new php version. So far, we tried to fix this line "Call-time pass-by-reference has been removed in …\SDL.php on line 2788, referer: " by deleting the “&” in: array_map(array(“Param”, “filter”), &$param); This gives us even more “strict standard” errors, but the file directory on the server is then displayed, though it is empty (and there are files on the server!).
We also tried downloading a newer version of the needed script, but this also throws only errors.

Does anyone know how to fix this? Or is there another way how to display .pdf files from the server? Maybe in html forms?

The module runs on OMRS Platform Version 1.93.

It might be worth asking the developer - @tgreensweig. However, since OpenMRS v1.9.x is no longer supported, I would recommend trying to upgrade to a supported version of the platform (e.g.v1.11.6 or v1.12.0).

Hi @maremo,

I mentioned a new module of ours under development here:

There was a special focus on images at first, but it is meant to remain flexible and PDF in particular will be no trouble at all.
I am about to make a big commit that will make this module virtually handle any type of file. I’m hoping before the weekend. This is a module that is still in its alpha stage, but feel free to try it out. Feedback would be very welcome, even before we come out about it with a first beta release.

It runs on Platform 1.11.6+ (Ref App 2.3+).

@mksd Thanks for sharing your module! It looks really nice and will be very helpful for the data upload. But is or will there be an option to display data, which already exists on the server in a separate patient folder? E.g. the .pdf files are transferred to the server via mirth connect and should be automatically displayed in the patients dashboard.

@pascal We are trying to upgrade our 1.93 to 1.11.x, but so far we have difficulties migrating the old patient data to the new database.

Let me try to understand your use case better. Would like OpenMRS to crawl through some patient remote documents to just display them? Or in fact you want to use OpenMRS to create/read/update/delete documents that are in fact stored elsewhere?

We have some files saved on our server in the var/ directory (there are no concepts in openmrs, in which they are stored) and we want to display them as the doctors should see them in the patient dashboard. This was our first idea. Technically this is what the file browser module does. We do not necessarily need to create or delete them, but maybe add some comments in a text field.

But for the future it would also be great to have these files directly imported to openmrs maybe in complex obs.

I hope you understand, what I mean :slight_smile:

I think our module could definitely be used for the latter. But note that our module handles complex obs only, its realm is those obs that are coded through a concept complex.

Nevertheless a new complex obs handler should be implemented: the one knowing how to CRUD on the remote location. Is this a Mirth Connect server then?

Regarding your former remark: browsing the remote location to build missing complex obs… well that was definitely not on the roadmap. And I think it is out of the scope of the VDUI module to be honest.

Yes, we are getting the .pdf files via mirth connect to our server.

Finally, we fixed the SDL.php so that it runs now without errors (at least we haven’t noticed any). So @tgreensweig, if you want to, we can upload the new SDL.php working for PHP Version 5.5.3 on the wiki page. Just let us know :slight_smile: