@RequestMapping(value = "show", method = RequestMethod.GET) public String show( @RequestParam("patientId") String patientId, Model uiModel, HttpServletRequest request) { Patient patient = patientService.findByPatientId(patientId); treatmentUpdateOrchestrator.updateDoseInterruptions(patient); setupDashboardModel(uiModel, request, patient); return "patient/show"; }
@RequestMapping(method = RequestMethod.POST, value = "/update/{patientId}") public String update( @PathVariable("patientId") String patientId, String remarks, WeeklyAdherenceForm weeklyAdherenceForm, HttpServletRequest httpServletRequest) { MotechUser authenticatedUser = loggedInUser(httpServletRequest); AuditParams auditParams = new AuditParams(authenticatedUser.getUserName(), AdherenceSource.WEB, remarks); treatmentUpdateOrchestrator.recordWeeklyAdherence( weeklyAdherenceSummary(weeklyAdherenceForm), patientId, auditParams); Flash.out( WHPConstants.NOTIFICATION_MESSAGE, "Adherence Saved For Patient : " + patientId, httpServletRequest); return "redirect:/"; }