OpenMRS Swing Frontend

Hi, Is there any Swing OpenMRS available. If not can we start developing one.

Reason we need this:

  1. Using Bio metric / Chip Reader for many different use cases.
  2. A thin client front end which will work o low bandwidth.
  3. Integrate OpenMRS with medical hardware’s in future.

Do you mean a swing application for only finger print capturing? Or one which duplicates all the web interface functionality?

Hi Daniel, My thinking was to duplicate entire web interface functionality in a Swing Application, Since we have fully functional rest api available.

That is a very big amount of work. Do you have a special use case to justify investing all that time in it?


We have a family running free hospital in Bangladesh they asked me a while ago for a software. Its in very rural area where internet bandwidth is very limited. I have to host OpenMRS in a data center in UK for support. So a thin client desktop application would have been better. Also using Biometric and Chip and PIN security card could be implemented and make this hospital a fully computerized “Model Hospital” where others can be encouraged.

Last week I got another call to develop MRS for a commercial private hospital. Since I have two queries now I was doing some research online and came across OpenMRS. According to their scenario they were asking me something they have seen in Belgium where Belgian GP’s give newly registered patient a chip card which they need to bring to GP every time they visit. In both cases a desktop application is preferable.

Would you be able to estimate how many weeks or months it might take if I work almost full time in this project. My only problem is I dont know much of OpenMRS functionality. I can take care of Swing bit comfortably.

For context, OpenMRS has been built by the combined effort of hundreds of people over the course of 10 years. I can’t give a real answer to this, but I’d guess it’s closer to years than it is to weeks.

Regardless I would strongly advise you against writing a whole new UI yourself.

If you’re targeting rural Bangladesh you might look into the Bahmni distribution of OpenMRS. In fact the system is already in use in some hospitals and subcenters, so you might be able to just copy that configuration.

And in general I would prefer to install a server at the hospital, and invest in backups and some sort of connectivity for remote support.


@dkayiwa Thank you Darius. Just for clarification, I was thinking to implement only frontend using rest webservice. Swing will consume rest web service from open-mrs-core, exactly like android app. Is only swing presentation layer going take years.

What I understood so far reading documentations backend logic remains in web and front end can be implemented using various technology and purpose of introducing rest web service is organisations can implement their own UI without worrying to backend business logic.

I did not see Bahmni distro, I am going thru it now.

@jaks80 even if the hospital was patient enough to wait for as long as it will take you to complete the Swing UI, it is generally more sustainable to use something that has support from many other developers, instead of just you alone.


You can implement everything that you want in a web application, I still don’t see any conceivable advantage a swing application will give you over a web application given the tons of work you have to do, if you just don’t want to wait for pages to load you might as well do it with something like angular.

Also Swing is almost dead.

I’m not sure about that, at work we still use applets for things like scanning, electronic signature and Word editing. We’re aware that applets can be discontinued in the future but we have no options.

Browser is not the problem. Main concern is attaching many types of devices with the application. Will java script be able to handle it

There is a popular architecture implementing these days. Main business logic is completely decoupled from presentation layer. It remains in server and presentation layer applications consumes web services. So that user interface could be Android/IOS/Web,Desktop anything. Without touching business logic, any types of front ends can be implemented.

OpenMRS architecture is already great for this purpose. Its fully functional rest web service opens this opportunity to implement desktop application. And many organisations might not want for their staff to logon to system outside work environment.

I have no idea. Maybe there’s no language with a standard fingerprint API.

@lluismf the applets run inside a web page which itself is part of the web application. @jaks80 you can still limit staff access to the web application by not exposing it on the public internet. I still don’t see any real advantage you are going to get from a swing application. The only difference is that they run in different desktop applications i.e. one is inside a browser while the other is your swing application but the rest remains the same. Responsiveness would be the only difference which you can negate with javascript.

1 Like

I know, but in Chrome no longer run

FF and IE still support applets, but who knows for how much time.

@jaks80 there is nothing technically wrong with implementing a Swing client application on top of the OpenMRS REST API. People are objecting to it because it’s a duplication of effort.

Device integration is in fact problematic in web applications. Besides applets, another approach is to write a browser plugin.

1 Like

As mentioned above, re-implementing the work of hundreds of people over the past decade is not a good idea for many reasons. However, you do have a valid use case. In the past, your problems have been solved by running the server and client on the same machine. This solves the low bandwidth issue, and allows you to plug hardware (e.g. barcode scanner/printer, fingerprint scanner and/or medical devices) directly into the server and access their functionality via the OpenMRS web application.

@jaks80, If internet is the issue, then you can host the OpenMRS locally. I am implementing OpenMRS in a local hospital. I have local network inside the hospital and from all department the application is accessible and they use it.

@hpardess @pascal @darius @lluismf @wyclif @dkayiwa It was great to have a healthy discussion over swing front end. Lots of new Ideas came out of this discussion. Thank you very much those who participated in this discussion.

1 Like