Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package org.openmrs.module.coreapps.page.controller.conditionlist;
- /**
- * The contents of this file are subject to the OpenMRS Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://license.openmrs.org
- * <p>
- * Software distributed under the License is distributed on an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific language governing rights and limitations
- * under the License.
- * <p>
- * Copyright (C) OpenMRS, LLC. All Rights Reserved.
- */
- import org.openmrs.ui.framework.page.PageModel;
- import org.springframework.web.bind.annotation.RequestParam;
- import org.apache.commons.lang.StringUtils;
- import org.openmrs.Patient;
- import org.openmrs.api.context.Context;
- import org.openmrs.module.coreapps.CoreAppsConstants;
- import org.openmrs.ui.framework.UiUtils;
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpSession;
- import org.openmrs.ui.framework.annotation.SpringBean;
- import org.springframework.validation.BeanPropertyBindingResult;
- import org.springframework.validation.Errors;
- import org.springframework.validation.ObjectError;
- import org.openmrs.Condition;
- import java.util.Collections;
- public class EditConditionPageController {
- public void controller(PageModel model, @RequestParam(value = "returnUrl", required = false) String returnUrl) {
- model.addAttribute("returnUrl", returnUrl);
- }
- public String post(@RequestParam("patientId") Patient patient,
- @RequestParam(value = "returnUrl", required = false) String returnUrl,
- @RequestParam("condition") Condition condition,
- PageModel model,UiUtils ui,
- HttpSession session) {
- System.out.println("EditConditionController");
- System.out.println(condition);
- return "redirect:coreapps/conditionlist/editCondition.page?patientId=" + patient.getPatientId() + "&returnUrl=" + ui.urlEncode(returnUrl);
- }
- }
Add Comment
Please, Sign In to add comment