Changeset 3440
- Timestamp:
- 02/20/08 21:11:56 (11 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
openmrs/trunk/src/api/org/openmrs/api/ProgramWorkflowService.java
r2965 r3440 14 14 import org.openmrs.ProgramWorkflow; 15 15 import org.openmrs.ProgramWorkflowState; 16 import org.openmrs.User; 16 17 import org.openmrs.api.db.ProgramWorkflowDAO; 17 18 import org.springframework.transaction.annotation.Transactional; … … 73 74 74 75 public void enrollPatientInProgram(Patient patient, Program program, 75 Date enrollmentDate, Date completionDate );76 Date enrollmentDate, Date completionDate, User creator); 76 77 77 78 public void voidPatientProgram(PatientProgram p, String reason); openmrs/trunk/src/api/org/openmrs/api/impl/ProgramWorkflowServiceImpl.java
r2965 r3440 18 18 import org.openmrs.ProgramWorkflow; 19 19 import org.openmrs.ProgramWorkflowState; 20 import org.openmrs.User; 20 21 import org.openmrs.api.APIAuthenticationException; 21 22 import org.openmrs.api.APIException; … … 330 331 * @see org.openmrs.api.impl.ProgramWorkflowService#enrollPatientInProgram(org.openmrs.Patient, org.openmrs.Program, java.util.Date, java.util.Date) 331 332 */ 332 public void enrollPatientInProgram(Patient patient, Program program, Date enrollmentDate, Date completionDate ) {333 public void enrollPatientInProgram(Patient patient, Program program, Date enrollmentDate, Date completionDate, User creator) { 333 334 if (!Context.getUserContext().hasPrivilege(OpenmrsConstants.PRIV_EDIT_PATIENT_PROGRAMS)) 334 335 throw new APIAuthenticationException("Privilege required: " + OpenmrsConstants.PRIV_EDIT_PATIENT_PROGRAMS); … … 341 342 p.setProgram(program); 342 343 p.setDateEnrolled(enrollmentDate); 344 if (null != creator) { 345 p.setCreator(creator); 346 } 343 347 createPatientProgram(p); 344 348 } openmrs/trunk/src/web/org/openmrs/web/controller/program/PatientProgramFormController.java
r1776 r3440 59 59 request.getSession().setAttribute(WebConstants.OPENMRS_ERROR_ATTR, "Program.error.already"); 60 60 else 61 Context.getProgramWorkflowService().enrollPatientInProgram(patient, program, enrollmentDate, completionDate );61 Context.getProgramWorkflowService().enrollPatientInProgram(patient, program, enrollmentDate, completionDate, null); 62 62 63 63 return new ModelAndView(new RedirectView(returnPage));