Platform Version: 1.11.3 OpenMRS Version: 2.2
Is it possible to remove vitals and appointments fragments from the patient dashboard page? If yes, please help me how should I go about achieving it.
Platform Version: 1.11.3 OpenMRS Version: 2.2
Is it possible to remove vitals and appointments fragments from the patient dashboard page? If yes, please help me how should I go about achieving it.
I was able to remove the appointments fragment from the patient dashboard page by stopping appointment module in my test installation.
I doubt I could do the same for vitals and diagnosis because they are part of core modules. Can anyone please suggest a better way to not show vitals and diagnosis in the patient dashboard page.
Hi, did you find a way?
If so please share
If it is just a UI requirement there is no need to get rid of the ad-hoc module altogether to achieve this kind of thing.
Hereunder I will take the example of the ‘capture vitals’ that is shipped with the Ref App distro. And I will assume that you are customising the Ref App distro through your own module (read through the end of this post if you don’t have a custom module yet.)
###1) To remove it from the visit actions menu on the Clinician Facing Patient Dashboard:
In the started()
method of your module’s activator:
AppFrameworkService service = Context.getService(AppFrameworkService.class);
service.disableExtension("referenceapplication.realTime.vitals");
###2) To remove the default vitals widget from the first column of the Clinician Facing Patient Dashboard:
Still in the started()
method of your module’s activator, and still using the same service as above:
service.disableExtension("coreapps.mostRecentVitals.clinicianDashboardFirstColumn");
All these UI customisations are identified by a unique ‘extension ID’. And as you could see here above, the idea is to disable the extension by providing its ID to AppFrameworkService#disableExtension(..)
.
The one million dollar question is: how to figure out the ID of the visual extension that I want to disable?
Unfortunately that may not be totally straightforward. I would say that there are 3 routes:
By the way, if you don’t have a custom module yet, just uses the Ref App module within the distro. That’s what it is for right in the middle of it: to be the place where to configure the distro the way you want it to look like. Better just fork that module rather than bringing in a brand new module to do so.
Further reading: ‘No extensions listed for built-in forms?’
Thank you very much!