Ui.springmvc module
- 1 Overview
- 2 Available Components
- 3 Available Widgets
- 3.1 "Anywhere" Widgets
- 3.1.1 Patient Search Widget
- 3.1.2 Patient Viewed History Widget
- 3.1.3 Button Widget
- 3.2 Patient Widgets
- 3.2.1 Program Enrollment Widget
- 3.2.2 Form Table Widget
- 3.2.3 Obs Group Table Widget
- 3.2.4 Obs Graph Widget
- 3.2.5 Active Problems Widget
- 3.2.6 Regimen Widget
- 3.2.7 Visit List Widget
- 3.3 Utility classes
- 3.3.1 Columns
- 3.3.1.1 SingleConceptColumn
- 3.3.1.2 Column
- 3.3.1.3 TextDisplayItem
- 3.3.1.4 ConceptDisplayItem
- 3.3.1 Columns
- 3.1 "Anywhere" Widgets
- 4 Download
- 5 Screenshots
- 6 Release Notes
- 6.1 Version 0.1
- 7 Basic Example
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