Wiki Spaces

Documentation
Projects
Resources

Get Help from Others

Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack

Documentation

Page tree
Skip to end of metadata
Go to start of metadata

Adding a tab to the patient dashboard

The register module allows you to add a register view to the patient dashboard in its own tag.  This tab is a complete 'application', in that you can create, edit and delete rows from the table, where each row represents an encounter (or htmlformentry submission). Unlike the regular operation of the register module, the register table in the patient dashboard tab will only display encounters for that patient.   The significance of this new feature is that you can add clinically-meaningful, implementation-specific tabs to the patient dashboard just by making an htmlform and changing the value of a single global property.

Here's a screen-shot.  You'll recognize the Overview, Regimens, Encounters, etc... tabs.  The rest are tabs driven by htmlforms.  In this example, you're looking at the previous two primary care visits for the patient Dave Test.

Instructions

Setup is really easy:  all you have to do to add a tab to the patient dashboard is:

  1. download and install the register module, version 1.2 or greater.
  2. create an htmlform
  3. find the formId for the htmlform (not the htmlformId).  This is the id of the form under Administration/Manage Forms.
  4. add the formId (or the uuid of the form) to the global property register.showDashboardTabForHtmlForm.  If you want to add more than 1 tab to the patient dashboard, this global property takes a comma-delimited list of formIds (or form uuids).
  5. stop and start the register module, and wait 30 seconds.   The reason for this is that the patient dashboard extensions are added at module startup.  So, once you've change the global property, you MUST restart the register module to have openmrs re-load extension points.
  6. And that's it.  You can check the openmrs log to verify that the register module successfully loaded the patient dashboard extension points.

Required Privileges

//wrapped around all the RegisterService methods for retrieving Encounters to display in a register;
    View Register Entries

//wrapped around API call to delete an Encounter, Required to activate 'add/edit/delete' functionality in rendering of register
    Manage Register Entries

//needed to have tab render on patient dashboard for form specified in global property register.showDashboardTabForHtmlForm
    View Register Module Patient Dashboard Tabs

  • No labels