Ui.springmvc module

Overview

The ui.springmvc module allows you to rapidly compose new UIs out of re-usable components.

In order to use this module you would write another module that depends on it, and configures the way it wants to use the ui.springmvc's widgets via it's webModuleApplicationContext.xml.

The goal of this module is to make development and reuse of widgets quick and easy, without changing OpenMRS's underlying MVC paradigms. (The module's code does not intend to be elegant.)

Additional widgets are most welcome.

Available Components

Homepage with list of "Apps"

<bean id="rwandamohHomepage" class="org.openmrs.module.ui.springmvc.web.HomepageController"> <property name="logoUrl" value="/moduleResources/rwandamoh/images/rwanda300.png"/> </bean>

"App" with an icon and a homepage

<bean id="dataentryApp" class="org.openmrs.module.ui.springmvc.App"> <property name="parentHomepageUrl" value="/module/rwandamoh/homepage.form"/> <property name="name" value="HIV Flowsheet"/> <property name="homepageUrl" value="/module/rwandamoh/dataentry/homepage.form"/> <property name="iconFilename" value="/moduleResources/ui/springmvc/images/application64.png"/> </bean>

Create Patient page

<bean id="dataentryCreatePatientController" class="org.openmrs.module.ui.springmvc.web.dataentry.CreatePatientController"> <property name="returnUrl" value="/module/rwandamoh/dataentry/patient.form"/> <property name="app"><ref local="dataentryApp"/></property> </bean>

Patient Dashboard with Tabs, each containing Widgets

Available Widgets

"Anywhere" Widgets

Patient Search Widget

An AJAX find-patient widget.

Patient Viewed History Widget

Shows a list of the patients the current user has viewed during this session

Button Widget

A button

Patient Widgets

These widgets are only usable in a patient-centric context, like on a patient dashboard

Program Enrollment Widget

Allows you to enroll the patient in, and exit them from a specific program. You may specify an html forms to use to enroll the patient, otherwise a generic date + workflow-statuses will be used.

Form Table Widget

Shows one-row-per-encounter, based on a form or an encounter type, and lets you add more via an html form.

Obs Group Table Widget

Shows one-row-per-obs-group

Obs Graph Widget

Shows a graph (over time) of numeric obs of the specified concept

Active Problems Widget

A simple list of active problems for a patient, e.g. what you'd get if you integrate across PROBLEM ADDED and PROBLEM REMOVED obs for a patient.

Regimen Widget

Shows a regimen view of drugs orders whose generic drug is in the specified drug set

Visit List Widget

A widget that shows all the patient's visits, where a visit is defined as all encounters at the same location on the same day

Utility classes

Columns

SingleConceptColumn

Column

TextDisplayItem

String html

ConceptDisplayItem

Integer conceptId

Download

Screenshots

Overall homepage

App homepage

Patient dashboard

Release Notes

Version 0.1

  • Initial alpha release

Basic Example

This would be the webModuleApplicationContext.xml file for a simple module that uses ui.springmvc to create one app. It uses the patient search widget, the recently-viewed-history widget, and the create-patient page. It also includes a patient dashboard with a few tabs