public class PortletController extends Object implements org.springframework.web.servlet.mvc.Controller
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
log |
| Constructor and Description |
|---|
PortletController() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.web.servlet.ModelAndView |
handleRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This method produces a model containing the following mappings:
|
protected void |
populateModel(javax.servlet.http.HttpServletRequest request,
Map<String,Object> model)
Subclasses should override this to put more data into the model.
|
public org.springframework.web.servlet.ModelAndView handleRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
(always)
(java.util.Date) now
(String) size
(Locale) locale
(String) portletUUID // unique for each instance of any portlet
(other parameters)
(if there's currently an authenticated user)
(User) authenticatedUser
(if the request has a patientId attribute)
(Integer) patientId
(Patient) patient
(List<Obs>) patientObs
(List<Encounter>) patientEncounters
(List<Visit>) patientVisits
(List<Visit>) activeVisits
(Obs) patientWeight // most recent weight obs
(Obs) patientHeight // most recent height obs
(Double) patientBmi // BMI derived from most recent weight and most recent height
(String) patientBmiAsString // BMI rounded to one decimal place, or "?" if unknown
(Integer) personId
(if the request has a personId or patientId attribute)
(Person) person
(List<Relationship>) personRelationships
(Map<RelationshipType, List<Relationship>>) personRelationshipsByType
(if the request has an encounterId attribute)
(Integer) encounterId
(Encounter) encounter
(Set<Obs>) encounterObs
(if the request has a userId attribute)
(Integer) userId
(User) user
(if the request has a patientIds attribute, which should be a (String) comma-separated list of patientIds)
(PatientSet) patientSet
(String) patientIds
(if the request has a conceptIds attribute, which should be a (String) commas-separated list of conceptIds)
(Map<Integer, Concept>) conceptMap
(Map<String, Concept>) conceptMapByStringIds
handleRequest in interface org.springframework.web.servlet.mvc.Controllerjavax.servlet.ServletExceptionIOExceptionprotected void populateModel(javax.servlet.http.HttpServletRequest request,
Map<String,Object> model)
Copyright © 2015 OpenMRS Inc.. All rights reserved.