public class DWRProgramWorkflowService extends Object
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
log |
| Constructor and Description |
|---|
DWRProgramWorkflowService() |
| Modifier and Type | Method and Description |
|---|---|
void |
changeToState(Integer patientProgramId,
Integer programWorkflowId,
Integer programWorkflowStateId,
String onDateDMY) |
void |
deletePatientProgram(Integer patientProgramId,
String reason) |
PatientProgramItem |
getPatientProgram(Integer patientProgramId) |
Vector<PatientStateItem> |
getPatientStates(Integer patientProgramId,
Integer programWorkflowId) |
Vector<ListItem> |
getPossibleNextStates(Integer patientProgramId,
Integer programWorkflowId) |
Vector<ListItem> |
getStatesByWorkflow(Integer programWorkflowId) |
Vector<ListItem> |
getWorkflowsByProgram(Integer programId) |
void |
updatePatientProgram(Integer patientProgramId,
String enrollmentDateYmd,
String completionDateYmd)
Deprecated.
|
void |
updatePatientProgram(Integer patientProgramId,
String enrollmentDateYmd,
String completionDateYmd,
Integer locationId)
Updates enrollment date, completion date, and location for a PatientProgram.
|
void |
voidLastState(Integer patientProgramId,
Integer programWorkflowId,
String voidReason) |
public PatientProgramItem getPatientProgram(Integer patientProgramId)
public Vector<PatientStateItem> getPatientStates(Integer patientProgramId, Integer programWorkflowId)
@Deprecated public void updatePatientProgram(Integer patientProgramId, String enrollmentDateYmd, String completionDateYmd) throws ParseException
updatePatientProgram(Integer, String, String, Integer)PatientProgram.getDateEnrolled() and compares @param
completionDateYmd with PatientProgram.getDateCompleted() . At least one of these
comparisons must return true in order to update the PatientProgram. In other words, if
neither the @param enrollmentDateYmd or the @param completionDateYmd match with the persisted
object, then the PatientProgram will not be updated. Also, if the enrollment date comes after
the completion date, the PatientProgram will not be updated.patientProgramId - enrollmentDateYmd - completionDateYmd - ParseExceptionpublic void updatePatientProgram(Integer patientProgramId, String enrollmentDateYmd, String completionDateYmd, Integer locationId) throws ParseException
PatientProgram.getDateEnrolled()
compares @param completionDateYmd with PatientProgram.getDateCompleted(),
compares @param locationId with PatientProgram.getLocation().
At least one of these comparisons must indicate a change in order to update the PatientProgram.
In other words, if neither the @param enrollmentDateYmd, the @param completionDateYmd, or thelocationId - match with the persisted object, then the PatientProgram will not be updated.
Also, if the enrollment date comes after the completion date, the PatientProgram will not be updated.patientProgramId - enrollmentDateYmd - completionDateYmd - locationId - ParseExceptionpublic Vector<ListItem> getPossibleNextStates(Integer patientProgramId, Integer programWorkflowId)
public void changeToState(Integer patientProgramId, Integer programWorkflowId, Integer programWorkflowStateId, String onDateDMY) throws ParseException
ParseExceptionCopyright © 2018 OpenMRS LLC.. All Rights Reserved.