@Controller
public class VisitFormController
extends java.lang.Object
Constructor and Description |
---|
VisitFormController() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
endVisit(Visit visit,
java.lang.String stopDate,
javax.servlet.http.HttpServletRequest request)
Processes requests to end a visit
|
java.lang.String |
endVisitNow(Visit visit,
javax.servlet.http.HttpSession session) |
Visit |
getVisit(java.lang.Integer visitId,
java.lang.Integer patientId,
org.springframework.ui.ModelMap model) |
java.util.List<VisitAttributeType> |
getVisitAttributeTypes() |
java.util.List<VisitType> |
getVisitTypes() |
java.lang.String |
purgeVisit(org.springframework.web.context.request.WebRequest request,
Visit visit,
org.springframework.web.bind.support.SessionStatus status,
org.springframework.ui.ModelMap model)
Processes requests to purge a visit
|
java.lang.String |
saveVisit(javax.servlet.http.HttpServletRequest request,
Visit visit,
org.springframework.validation.BindingResult result,
org.springframework.ui.ModelMap model)
Processes requests to save/update a visit
|
java.util.List<Encounter> |
setEncounterDetails(Visit visit) |
java.lang.String |
showForm(Visit visit,
java.lang.Boolean startNow,
org.springframework.ui.ModelMap model)
Processes requests to display the form
|
java.lang.String |
unvoidVisit(org.springframework.web.context.request.WebRequest request,
Visit visit,
org.springframework.web.bind.support.SessionStatus status,
org.springframework.ui.ModelMap model)
Processes requests to unvoid a visit
|
java.lang.String |
voidVisit(org.springframework.web.context.request.WebRequest request,
Visit visit,
java.lang.String voidReason,
org.springframework.web.bind.support.SessionStatus status,
org.springframework.ui.ModelMap model)
Processes requests to void a visit
|
@RequestMapping(method=GET, value="/admin/visits/visit") public java.lang.String showForm(@ModelAttribute(value="visit") Visit visit, @RequestParam(required=false,value="startNow") java.lang.Boolean startNow, org.springframework.ui.ModelMap model)
@ModelAttribute(value="visit") public Visit getVisit(@RequestParam(value="visitId",required=false) java.lang.Integer visitId, @RequestParam(value="patientId",required=false) java.lang.Integer patientId, org.springframework.ui.ModelMap model)
@RequestMapping(value="/admin/visits/visitEnd") public java.lang.String endVisitNow(@ModelAttribute(value="visit") Visit visit, javax.servlet.http.HttpSession session)
@RequestMapping(method=POST, value="/admin/visits/visit") public java.lang.String saveVisit(javax.servlet.http.HttpServletRequest request, @ModelAttribute(value="visit") Visit visit, org.springframework.validation.BindingResult result, org.springframework.ui.ModelMap model)
request
- the WebRequest
objectvisit
- the visit object to save/updateresult
- the BindingResult
objectmodel
- the ModelMap
object@RequestMapping(method=POST, value="/admin/visits/endVisit") public java.lang.String endVisit(@ModelAttribute(value="visit") Visit visit, @RequestParam(value="stopDate",required=false) java.lang.String stopDate, javax.servlet.http.HttpServletRequest request)
visit
- the visit object to updatedstopDate
- which contains the stopDate or null for current timerequest
- the WebRequest
object@RequestMapping(method=POST, value="/admin/visits/voidVisit") public java.lang.String voidVisit(org.springframework.web.context.request.WebRequest request, @ModelAttribute(value="visit") Visit visit, @RequestParam(required=false,value="voidReason") java.lang.String voidReason, org.springframework.web.bind.support.SessionStatus status, org.springframework.ui.ModelMap model)
request
- the WebRequest
objectvisit
- the visit object to voidvoidReason
- the reason why the visit is getting voidstatus
- the SessionStatus
model
- the ModelMap
object@RequestMapping(method=POST, value="/admin/visits/unvoidVisit") public java.lang.String unvoidVisit(org.springframework.web.context.request.WebRequest request, @ModelAttribute(value="visit") Visit visit, org.springframework.web.bind.support.SessionStatus status, org.springframework.ui.ModelMap model)
request
- the WebRequest
objectvisit
- the visit object to unvoidstatus
- the SessionStatus
model
- the ModelMap
object@RequestMapping(method=POST, value="/admin/visits/purgeVisit") public java.lang.String purgeVisit(org.springframework.web.context.request.WebRequest request, @ModelAttribute(value="visit") Visit visit, org.springframework.web.bind.support.SessionStatus status, org.springframework.ui.ModelMap model)
request
- the WebRequest
objectvisit
- the visit object to purgestatus
- the SessionStatus
model
- the ModelMap
object@ModelAttribute(value="visitTypes") public java.util.List<VisitType> getVisitTypes() throws java.lang.Exception
java.lang.Exception
@ModelAttribute(value="attributeTypes") public java.util.List<VisitAttributeType> getVisitAttributeTypes() throws java.lang.Exception
java.lang.Exception
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.