public class DWRProgramWorkflowService
extends java.lang.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(java.lang.Integer patientProgramId,
java.lang.Integer programWorkflowId,
java.lang.Integer programWorkflowStateId,
java.lang.String onDateDMY) |
void |
deletePatientProgram(java.lang.Integer patientProgramId,
java.lang.String reason) |
PatientProgramItem |
getPatientProgram(java.lang.Integer patientProgramId) |
java.util.Vector<PatientStateItem> |
getPatientStates(java.lang.Integer patientProgramId,
java.lang.Integer programWorkflowId) |
java.util.Vector<ListItem> |
getPossibleNextStates(java.lang.Integer patientProgramId,
java.lang.Integer programWorkflowId) |
java.util.Vector<ListItem> |
getPossibleOutcomes(java.lang.Integer programId) |
java.util.Vector<ListItem> |
getStatesByWorkflow(java.lang.Integer programWorkflowId) |
java.util.Vector<ListItem> |
getWorkflowsByProgram(java.lang.Integer programId) |
void |
updatePatientProgram(java.lang.Integer patientProgramId,
java.lang.String enrollmentDateYmd,
java.lang.String completionDateYmd,
java.lang.Integer locationId,
java.lang.Integer outcomeId)
Updates enrollment date, completion date, and location for a PatientProgram.
|
void |
voidLastState(java.lang.Integer patientProgramId,
java.lang.Integer programWorkflowId,
java.lang.String voidReason) |
public PatientProgramItem getPatientProgram(java.lang.Integer patientProgramId)
public java.util.Vector<ListItem> getPossibleOutcomes(java.lang.Integer programId)
public java.util.Vector<PatientStateItem> getPatientStates(java.lang.Integer patientProgramId, java.lang.Integer programWorkflowId)
public java.util.Vector<ListItem> getWorkflowsByProgram(java.lang.Integer programId)
public java.util.Vector<ListItem> getStatesByWorkflow(java.lang.Integer programWorkflowId)
public void updatePatientProgram(java.lang.Integer patientProgramId, java.lang.String enrollmentDateYmd, java.lang.String completionDateYmd, java.lang.Integer locationId, java.lang.Integer outcomeId) throws java.text.ParseException
PatientProgram.getDateEnrolled()
compares @param
completionDateYmd with PatientProgram.getDateCompleted()
, compares @param locationId
with PatientProgram.getLocation()
, compares @param outcomeId with PatientProgram.getOutcome()
.
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 the @param locationId or the @param outcomeId
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
- outcomeId
- java.text.ParseException
public void deletePatientProgram(java.lang.Integer patientProgramId, java.lang.String reason)
public java.util.Vector<ListItem> getPossibleNextStates(java.lang.Integer patientProgramId, java.lang.Integer programWorkflowId)
public void changeToState(java.lang.Integer patientProgramId, java.lang.Integer programWorkflowId, java.lang.Integer programWorkflowStateId, java.lang.String onDateDMY) throws java.text.ParseException
java.text.ParseException
public void voidLastState(java.lang.Integer patientProgramId, java.lang.Integer programWorkflowId, java.lang.String voidReason)
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.