@Controller public class VisitFormController extends Object
Constructor and Description |
---|
VisitFormController() |
Modifier and Type | Method and Description |
---|---|
String |
endVisit(Visit visit,
String stopDate,
javax.servlet.http.HttpServletRequest request)
Processes requests to end a visit
|
String |
endVisitNow(Visit visit,
javax.servlet.http.HttpSession session) |
Visit |
getVisit(Integer visitId,
Integer patientId,
org.springframework.ui.ModelMap model) |
List<VisitAttributeType> |
getVisitAttributeTypes() |
List<VisitType> |
getVisitTypes() |
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
|
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
|
List<Encounter> |
setEncounterDetails(Visit visit) |
String |
showForm(Visit visit,
Boolean startNow,
org.springframework.ui.ModelMap model)
Processes requests to display the form
|
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
|
String |
voidVisit(org.springframework.web.context.request.WebRequest request,
Visit visit,
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 String showForm(@ModelAttribute(value="visit") Visit visit, @RequestParam(required=false,value="startNow") Boolean startNow, org.springframework.ui.ModelMap model)
@ModelAttribute(value="visit") public Visit getVisit(@RequestParam(value="visitId",required=false) Integer visitId, @RequestParam(value="patientId",required=false) Integer patientId, org.springframework.ui.ModelMap model)
@RequestMapping(value="/admin/visits/visitEnd") public String endVisitNow(@ModelAttribute(value="visit") Visit visit, javax.servlet.http.HttpSession session)
@RequestMapping(method=POST, value="/admin/visits/visit") public 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 String endVisit(@ModelAttribute(value="visit") Visit visit, @RequestParam(value="stopDate",required=false) 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 String voidVisit(org.springframework.web.context.request.WebRequest request, @ModelAttribute(value="visit") Visit visit, @RequestParam(required=false,value="voidReason") 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 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 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 List<VisitType> getVisitTypes() throws Exception
Exception
@ModelAttribute(value="attributeTypes") public List<VisitAttributeType> getVisitAttributeTypes() throws Exception
Exception
Copyright © 2015 OpenMRS Inc.. All rights reserved.