public class ProgramWorkflowServiceImpl extends BaseOpenmrsService implements ProgramWorkflowService
ProgramWorkflowService
Modifier and Type | Field and Description |
---|---|
protected ProgramWorkflowDAO |
dao |
protected org.apache.commons.logging.Log |
log |
Constructor and Description |
---|
ProgramWorkflowServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
changeToState(PatientProgram patientProgram,
ProgramWorkflow workflow,
ProgramWorkflowState state,
java.util.Date onDate)
Deprecated.
|
void |
createConceptStateConversion(ConceptStateConversion csc)
Deprecated.
|
void |
createOrUpdateProgram(Program program)
Deprecated.
|
void |
createPatientProgram(PatientProgram patientProgram)
Deprecated.
|
void |
createWorkflow(ProgramWorkflow w)
Deprecated.
|
void |
deleteConceptStateConversion(ConceptStateConversion csc)
Deprecated.
|
void |
enrollPatientInProgram(Patient patient,
Program program,
java.util.Date enrollmentDate,
java.util.Date completionDate,
User creator)
Deprecated.
|
java.util.List<ConceptStateConversion> |
getAllConceptStateConversions()
Returns all conceptStateConversions
|
java.util.List<ConceptStateConversion> |
getAllConversions()
Deprecated.
|
java.util.List<Program> |
getAllPrograms()
Returns all programs, includes retired programs.
|
java.util.List<Program> |
getAllPrograms(boolean includeRetired)
Returns all programs
|
ConceptStateConversion |
getConceptStateConversion(java.lang.Integer id)
Returns a conceptStateConversion given that conceptStateConversions primary key
conceptStateConversionId A null value is returned if no conceptStateConversion
exists with this conceptStateConversionId. |
ConceptStateConversion |
getConceptStateConversion(ProgramWorkflow workflow,
Concept trigger)
Retrieves the ConceptStateConversion that matches the passed
ProgramWorkflow and
Concept |
ConceptStateConversion |
getConceptStateConversionByUuid(java.lang.String uuid)
Get a concept state conversion by its uuid.
|
java.util.Collection<PatientProgram> |
getCurrentPrograms(Patient patient,
java.util.Date onDate)
Deprecated.
|
java.util.Set<ProgramWorkflow> |
getCurrentWorkflowsByPatient(Patient patient)
Deprecated.
|
java.util.Set<ProgramWorkflow> |
getCurrentWorkflowsByPatientProgram(PatientProgram patientProgram)
Deprecated.
|
PatientState |
getLatestState(PatientProgram patientProgram,
ProgramWorkflow workflow)
Deprecated.
|
PatientProgram |
getPatientProgram(java.lang.Integer patientProgramId)
Returns a PatientProgram given that PatientPrograms primary key
patientProgramId
A null value is returned if no PatientProgram exists with this patientProgramId. |
PatientProgram |
getPatientProgramByUuid(java.lang.String uuid)
Get a patient program by its uuid.
|
java.util.List<PatientProgram> |
getPatientPrograms(Cohort cohort,
java.util.Collection<Program> programs)
TODO: refactor?
|
java.util.Collection<PatientProgram> |
getPatientPrograms(Patient patient)
Deprecated.
|
java.util.List<PatientProgram> |
getPatientPrograms(Patient patient,
Program program,
java.util.Date minEnrollmentDate,
java.util.Date maxEnrollmentDate,
java.util.Date minCompletionDate,
java.util.Date maxCompletionDate,
boolean includeVoided)
Returns PatientPrograms that match the input parameters.
|
PatientState |
getPatientState(java.lang.Integer patientStateId)
Deprecated.
|
PatientState |
getPatientStateByUuid(java.lang.String uuid)
Get a program state by its uuid.
|
java.util.List<ProgramWorkflowState> |
getPossibleNextStates(PatientProgram patientProgram,
ProgramWorkflow workflow)
Deprecated.
|
java.util.List<Concept> |
getPossibleOutcomes(java.lang.Integer programId)
Get all possible outcome concepts for a program.
|
Program |
getProgram(java.lang.Integer id)
Returns a program given that programs primary key
programId A null value is
returned if no program exists with this programId. |
Program |
getProgram(java.lang.String name) |
Program |
getProgramByName(java.lang.String name)
Returns a program given the program's exact
name A null value is returned if
there is no program with this name |
Program |
getProgramByUuid(java.lang.String uuid)
Get a program by its uuid.
|
java.util.List<Program> |
getPrograms()
Deprecated.
|
java.util.List<Program> |
getPrograms(java.lang.String nameFragment)
Returns programs that match the given string.
|
ProgramWorkflowState |
getState(java.lang.Integer id)
Deprecated.
|
ProgramWorkflowState |
getState(ProgramWorkflow programWorkflow,
java.lang.String name)
Deprecated.
|
ProgramWorkflowState |
getStateByUuid(java.lang.String uuid)
Get a state by its uuid.
|
java.util.List<ProgramWorkflowState> |
getStates()
Deprecated.
|
java.util.List<ProgramWorkflowState> |
getStates(boolean includeRetired)
Deprecated.
|
ProgramWorkflow |
getWorkflow(java.lang.Integer id)
Deprecated.
|
ProgramWorkflow |
getWorkflow(Program program,
java.lang.String name)
Deprecated.
|
ProgramWorkflow |
getWorkflowByUuid(java.lang.String uuid)
Get ProgramWorkflow by its UUID
|
boolean |
isInProgram(Patient patient,
Program program,
java.util.Date fromDate,
java.util.Date toDate)
Deprecated.
|
boolean |
isLegalTransition(ProgramWorkflowState fromState,
ProgramWorkflowState toState)
Deprecated.
|
java.util.Collection<java.lang.Integer> |
patientsInProgram(Program program,
java.util.Date fromDate,
java.util.Date toDate)
Deprecated.
|
void |
purgeConceptStateConversion(ConceptStateConversion conceptStateConversion)
Completely remove a conceptStateConversion from the database (not reversible) This method
delegates to #purgeConceptStateConversion(conceptStateConversion, boolean) method
|
void |
purgeConceptStateConversion(ConceptStateConversion conceptStateConversion,
boolean cascade)
Completely remove a conceptStateConversion from the database (not reversible)
|
void |
purgePatientProgram(PatientProgram patientProgram)
Completely remove a patientProgram from the database (not reversible) This method delegates
to #purgePatientProgram(patientProgram, boolean) method
|
void |
purgePatientProgram(PatientProgram patientProgram,
boolean cascade)
Completely remove a patientProgram from the database (not reversible)
|
void |
purgeProgram(Program program)
Completely remove a program from the database (not reversible) This method delegates to
#purgeProgram(program, boolean) method
|
void |
purgeProgram(Program program,
boolean cascade)
Completely remove a program from the database (not reversible)
|
Program |
retireProgram(Program program)
Retires the given program
|
ConceptStateConversion |
saveConceptStateConversion(ConceptStateConversion csc)
Save ConceptStateConversion to database (create if new or update if changed)
|
PatientProgram |
savePatientProgram(PatientProgram patientProgram)
Save patientProgram to database (create if new or update if changed)
|
Program |
saveProgram(Program program)
Save
program to database (create if new or update if changed) |
void |
setProgramWorkflowDAO(ProgramWorkflowDAO dao)
Setter for the ProgramWorkflow DataAccessObject (DAO).
|
void |
terminatePatientProgram(PatientProgram patientProgram,
ProgramWorkflowState finalState,
java.util.Date terminatedOn)
Deprecated.
|
void |
triggerStateConversion(Patient patient,
Concept trigger,
java.util.Date dateConverted)
Triggers any ConceptStateConversion that exists for the passed
reasonForExit
concept and any ProgramWorkflow in the PatientPrograms for the patient |
Program |
unRetireProgram(Program program)
Unretires the given program
|
PatientProgram |
unvoidPatientProgram(PatientProgram patientProgram)
Unvoids the given patientProgram
|
void |
updateConceptStateConversion(ConceptStateConversion csc)
Deprecated.
|
void |
updatePatientProgram(PatientProgram patientProgram)
Deprecated.
|
void |
updateWorkflow(ProgramWorkflow w)
Deprecated.
|
void |
voidLastState(PatientProgram patientProgram,
ProgramWorkflow workflow,
java.lang.String voidReason)
Deprecated.
|
PatientProgram |
voidPatientProgram(PatientProgram patientProgram,
java.lang.String reason)
Voids the given patientProgram
|
void |
voidWorkflow(ProgramWorkflow w,
java.lang.String reason)
Deprecated.
|
onShutdown, onStartup
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onShutdown, onStartup
protected final org.apache.commons.logging.Log log
protected ProgramWorkflowDAO dao
public void setProgramWorkflowDAO(ProgramWorkflowDAO dao)
ProgramWorkflowService
setProgramWorkflowDAO
in interface ProgramWorkflowService
dao
- - The DAO for this serviceProgramWorkflowService.setProgramWorkflowDAO(org.openmrs.api.db.ProgramWorkflowDAO)
public Program saveProgram(Program program) throws APIException
ProgramWorkflowService
program
to database (create if new or update if changed)saveProgram
in interface ProgramWorkflowService
program
- is the Program to be saved to the databaseAPIException
ProgramWorkflowService.saveProgram(org.openmrs.Program)
public Program getProgram(java.lang.Integer id)
ProgramWorkflowService
programId
A null value is
returned if no program exists with this programId.getProgram
in interface ProgramWorkflowService
id
- integer primary key of the program to findprogramId
passed in.ProgramWorkflowService.getProgram(java.lang.Integer)
public Program getProgram(java.lang.String name)
getProgram
in interface ProgramWorkflowService
ProgramWorkflowService.getProgram(java.lang.String)
public Program getProgramByName(java.lang.String name)
ProgramWorkflowService
name
A null value is returned if
there is no program with this namegetProgramByName
in interface ProgramWorkflowService
name
- the exact name of the program to match onname
to Program.nameProgramWorkflowService.getProgram(java.lang.String)
public java.util.List<Program> getAllPrograms() throws APIException
ProgramWorkflowService
getAllPrograms
in interface ProgramWorkflowService
APIException
ProgramWorkflowService.getAllPrograms()
public java.util.List<Program> getAllPrograms(boolean includeRetired) throws APIException
ProgramWorkflowService
getAllPrograms
in interface ProgramWorkflowService
includeRetired
- whether or not to include retired programsAPIException
ProgramWorkflowService.getAllPrograms(boolean)
public java.util.List<Program> getPrograms(java.lang.String nameFragment) throws APIException
ProgramWorkflowService
nameFragment
getPrograms
in interface ProgramWorkflowService
nameFragment
- is the string used to search for programsAPIException
ProgramWorkflowService.getPrograms(String)
public void purgeProgram(Program program) throws APIException
ProgramWorkflowService
purgeProgram
in interface ProgramWorkflowService
program
- the Program to clean out of the database.APIException
ProgramWorkflowService.purgeProgram(org.openmrs.Program)
public void purgeProgram(Program program, boolean cascade) throws APIException
ProgramWorkflowService
purgeProgram
in interface ProgramWorkflowService
cascade
- true
to delete related contentAPIException
ProgramWorkflowService.purgeProgram(org.openmrs.Program, boolean)
public Program retireProgram(Program program) throws APIException
ProgramWorkflowService
retireProgram
in interface ProgramWorkflowService
program
- Program to be retiredAPIException
ProgramWorkflowService.retireProgram(org.openmrs.Program)
public Program unRetireProgram(Program program) throws APIException
ProgramWorkflowService
unRetireProgram
in interface ProgramWorkflowService
program
- Program to be unretiredAPIException
ProgramWorkflowService.retireProgram(org.openmrs.Program)
public PatientProgram savePatientProgram(PatientProgram patientProgram) throws APIException
ProgramWorkflowService
savePatientProgram
in interface ProgramWorkflowService
patientProgram
- is the PatientProgram to be saved to the databaseAPIException
ProgramWorkflowService.savePatientProgram(org.openmrs.PatientProgram)
public PatientProgram getPatientProgram(java.lang.Integer patientProgramId)
ProgramWorkflowService
patientProgramId
A null value is returned if no PatientProgram exists with this patientProgramId.getPatientProgram
in interface ProgramWorkflowService
patientProgramId
- integer primary key of the PatientProgram to findpatientProgramId
passed in.ProgramWorkflowService.getPatientProgram(java.lang.Integer)
public java.util.List<PatientProgram> getPatientPrograms(Patient patient, Program program, java.util.Date minEnrollmentDate, java.util.Date maxEnrollmentDate, java.util.Date minCompletionDate, java.util.Date maxCompletionDate, boolean includeVoided) throws APIException
ProgramWorkflowService
getPatientPrograms
in interface ProgramWorkflowService
patient
- if supplied all PatientPrograms returned will be for this Patientprogram
- if supplied all PatientPrograms returned will be for this ProgramminEnrollmentDate
- if supplied will limit PatientPrograms to those with enrollments on
or after this DatemaxEnrollmentDate
- if supplied will limit PatientPrograms to those with enrollments on
or before this DateminCompletionDate
- if supplied will limit PatientPrograms to those completed on or
after this Date OR not yet completedmaxCompletionDate
- if supplied will limit PatientPrograms to those completed on or
before this DateincludeVoided
- if true, will also include voided PatientProgramsAPIException
ProgramWorkflowService.getPatientPrograms(Patient, Program, Date, Date,
Date, Date, boolean)
public java.util.List<PatientProgram> getPatientPrograms(Cohort cohort, java.util.Collection<Program> programs)
ProgramWorkflowService
getPatientPrograms
in interface ProgramWorkflowService
ProgramWorkflowService.getPatientPrograms(Cohort, Collection)
public void purgePatientProgram(PatientProgram patientProgram) throws APIException
ProgramWorkflowService
purgePatientProgram
in interface ProgramWorkflowService
patientProgram
- the PatientProgram to clean out of the database.APIException
ProgramWorkflowService.purgePatientProgram(org.openmrs.PatientProgram)
public void purgePatientProgram(PatientProgram patientProgram, boolean cascade) throws APIException
ProgramWorkflowService
purgePatientProgram
in interface ProgramWorkflowService
patientProgram
- the PatientProgram to clean out of the database.cascade
- true
to delete related contentAPIException
ProgramWorkflowService.purgePatientProgram(org.openmrs.PatientProgram,
boolean)
public PatientProgram voidPatientProgram(PatientProgram patientProgram, java.lang.String reason)
ProgramWorkflowService
voidPatientProgram
in interface ProgramWorkflowService
patientProgram
- patientProgram to be voidedreason
- is the reason why the patientProgram is being voidedProgramWorkflowService.voidPatientProgram(org.openmrs.PatientProgram,
java.lang.String)
public PatientProgram unvoidPatientProgram(PatientProgram patientProgram)
ProgramWorkflowService
unvoidPatientProgram
in interface ProgramWorkflowService
patientProgram
- patientProgram to be un-voidedProgramWorkflowService.voidPatientProgram(org.openmrs.PatientProgram,
java.lang.String)
public java.util.List<Concept> getPossibleOutcomes(java.lang.Integer programId)
ProgramWorkflowService
Concept.getAnswers()
if they exist, then all concept set members Concept.getSetMembers()
if they exist, then empty List.getPossibleOutcomes
in interface ProgramWorkflowService
ProgramWorkflowService.getPossibleOutcomes(Integer)
public ConceptStateConversion saveConceptStateConversion(ConceptStateConversion csc) throws APIException
ProgramWorkflowService
saveConceptStateConversion
in interface ProgramWorkflowService
csc
- - The ConceptStateConversion to saveAPIException
ProgramWorkflowService.saveConceptStateConversion(org.openmrs.ConceptStateConversion)
public ConceptStateConversion getConceptStateConversion(java.lang.Integer id)
ProgramWorkflowService
conceptStateConversionId
A null value is returned if no conceptStateConversion
exists with this conceptStateConversionId.getConceptStateConversion
in interface ProgramWorkflowService
id
- integer primary key of the conceptStateConversion to findconceptStateConversionId
passed in.ProgramWorkflowService.getConceptStateConversion(java.lang.Integer)
public java.util.List<ConceptStateConversion> getAllConceptStateConversions() throws APIException
ProgramWorkflowService
getAllConceptStateConversions
in interface ProgramWorkflowService
APIException
ProgramWorkflowService.getAllConceptStateConversions()
public void purgeConceptStateConversion(ConceptStateConversion conceptStateConversion) throws APIException
ProgramWorkflowService
purgeConceptStateConversion
in interface ProgramWorkflowService
conceptStateConversion
- the ConceptStateConversion to clean out of the database.APIException
ProgramWorkflowService.purgeConceptStateConversion(org.openmrs.ConceptStateConversion)
public void purgeConceptStateConversion(ConceptStateConversion conceptStateConversion, boolean cascade) throws APIException
ProgramWorkflowService
purgeConceptStateConversion
in interface ProgramWorkflowService
conceptStateConversion
- the ConceptStateConversion to clean out of the database.cascade
- true
to delete related contentAPIException
ProgramWorkflowService.purgeConceptStateConversion(org.openmrs.ConceptStateConversion,
boolean)
public void triggerStateConversion(Patient patient, Concept trigger, java.util.Date dateConverted)
ProgramWorkflowService
reasonForExit
concept and any ProgramWorkflow in the PatientPrograms for the patient
triggerStateConversion
in interface ProgramWorkflowService
patient
- - the Patient to trigger the ConceptStateConversion ontrigger
- - the Concept to trigger the ConceptStateConversiondateConverted
- - the Date of the ConceptStateConversionProgramWorkflowService.triggerStateConversion(org.openmrs.Patient,
org.openmrs.Concept, java.util.Date)
public ConceptStateConversion getConceptStateConversion(ProgramWorkflow workflow, Concept trigger)
ProgramWorkflowService
ProgramWorkflow
and
Concept
getConceptStateConversion
in interface ProgramWorkflowService
workflow
- - the ProgramWorkflow to checktrigger
- - the Concept to checkProgramWorkflow
and
Concept
ProgramWorkflowService.getConceptStateConversion(org.openmrs.ProgramWorkflow,
org.openmrs.Concept)
public void createOrUpdateProgram(Program program)
ProgramWorkflowService
createOrUpdateProgram
in interface ProgramWorkflowService
program
- Program to createProgramWorkflowService.createOrUpdateProgram(org.openmrs.Program)
public java.util.List<Program> getPrograms()
ProgramWorkflowService
getPrograms
in interface ProgramWorkflowService
ProgramWorkflowService.getPrograms()
public void createWorkflow(ProgramWorkflow w)
ProgramWorkflowService
createWorkflow
in interface ProgramWorkflowService
w
- - The ProgramWorkflow to createProgramWorkflowService.createWorkflow(ProgramWorkflow)
public void updateWorkflow(ProgramWorkflow w)
ProgramWorkflowService
updateWorkflow
in interface ProgramWorkflowService
w
- - The ProgramWorkflow to updateProgramWorkflowService.updateWorkflow(org.openmrs.ProgramWorkflow)
public ProgramWorkflow getWorkflow(java.lang.Integer id)
ProgramWorkflowService
programWorkflowId
getWorkflow
in interface ProgramWorkflowService
id
- integer primary key of the ProgramWorkflow to findProgramWorkflowService.getWorkflow(java.lang.Integer)
public ProgramWorkflow getWorkflow(Program program, java.lang.String name)
ProgramWorkflowService
getWorkflow
in interface ProgramWorkflowService
program
- - The Program of the ProgramWorkflow to returnname
- - The name of the ProgramWorkflow to returnProgramWorkflowService.getWorkflow(org.openmrs.Program,
java.lang.String)
public void voidWorkflow(ProgramWorkflow w, java.lang.String reason)
ProgramWorkflowService
voidWorkflow
in interface ProgramWorkflowService
w
- - The ProgramWorkflow to retirereason
- - The reason for retiring the ProgramWorkflowProgramWorkflowService.voidWorkflow(org.openmrs.ProgramWorkflow,
java.lang.String)
public java.util.List<ProgramWorkflowState> getStates()
ProgramWorkflowService
getStates
in interface ProgramWorkflowService
ProgramWorkflowService.getStates()
public java.util.List<ProgramWorkflowState> getStates(boolean includeRetired)
ProgramWorkflowService
getStates
in interface ProgramWorkflowService
includeRetired
- - if false, only returns non-voided ProgramWorkflowStatesProgramWorkflowService.getStates(boolean)
public ProgramWorkflowState getState(java.lang.Integer id)
ProgramWorkflowService
getState
in interface ProgramWorkflowService
id
- - The primary key id of the ProgramWorkflowState to returnProgramWorkflowService.getState(java.lang.Integer)
public ProgramWorkflowState getState(ProgramWorkflow programWorkflow, java.lang.String name)
ProgramWorkflowService
name
in the passed
programWorkflow
getState
in interface ProgramWorkflowService
programWorkflow
- - The programWorkflow to check for ProgramWorkflowStatename
- - the name of the programWorkflowState to look forname
in
the passed programWorkflow
ProgramWorkflowService.getState(org.openmrs.ProgramWorkflow,
java.lang.String)
public java.util.List<ProgramWorkflowState> getPossibleNextStates(PatientProgram patientProgram, ProgramWorkflow workflow)
ProgramWorkflowService
getPossibleNextStates
in interface ProgramWorkflowService
patientProgram
- - the PatientProgram to retrieve possible next transitions fromworkflow
- - the ProgramWorkflow to retrieve possible next transitions fromProgramWorkflowService.getPossibleNextStates(org.openmrs.PatientProgram,
org.openmrs.ProgramWorkflow)
public boolean isLegalTransition(ProgramWorkflowState fromState, ProgramWorkflowState toState)
ProgramWorkflowService
isLegalTransition
in interface ProgramWorkflowService
fromState
- - the ProgramWorkflowState to use as the state to check transitions fromtoState
- - the ProgramWorkflowState to use as the state to check transitions into from
fromState
fromState
to
toState
ProgramWorkflowService.isLegalTransition(org.openmrs.ProgramWorkflowState,
org.openmrs.ProgramWorkflowState)
public void createPatientProgram(PatientProgram patientProgram)
ProgramWorkflowService
createPatientProgram
in interface ProgramWorkflowService
patientProgram
- - The PatientProgram to createProgramWorkflowService.createPatientProgram(org.openmrs.PatientProgram)
public void updatePatientProgram(PatientProgram patientProgram)
ProgramWorkflowService
updatePatientProgram
in interface ProgramWorkflowService
patientProgram
- - The PatientProgram to updateProgramWorkflowService.updatePatientProgram(org.openmrs.PatientProgram)
public void enrollPatientInProgram(Patient patient, Program program, java.util.Date enrollmentDate, java.util.Date completionDate, User creator)
ProgramWorkflowService
enrollPatientInProgram
in interface ProgramWorkflowService
patient
- - The Patient to enrollprogram
- - The Program to enroll the patient
intoenrollmentDate
- - The Date to use as the enrollment date in the program
for the patient
completionDate
- - The Date to use as the completion date in the program
for the patient
creator
- - The User who is enrolling this patient
ProgramWorkflowService.enrollPatientInProgram(org.openmrs.Patient,
org.openmrs.Program, java.util.Date, java.util.Date, org.openmrs.User)
public java.util.Collection<PatientProgram> getPatientPrograms(Patient patient)
ProgramWorkflowService
patient
getPatientPrograms
in interface ProgramWorkflowService
patient
- - The Patient to retrieve all PatientPrograms forpatient
ProgramWorkflowService.getPatientPrograms(org.openmrs.Patient)
public java.util.Collection<java.lang.Integer> patientsInProgram(Program program, java.util.Date fromDate, java.util.Date toDate)
ProgramWorkflowService
patientsInProgram
in interface ProgramWorkflowService
program
- - The Program to check for patient enrollmentfromDate
- - Used to check whether patients were enrolled in the program
on
or after this DatetoDate
- - Used to check whether patients were enrolled in the program
on
or before this Dateprogram
between fromDate
and toDate
ProgramWorkflowService.patientsInProgram(org.openmrs.Program,
java.util.Date, java.util.Date)
public java.util.Collection<PatientProgram> getCurrentPrograms(Patient patient, java.util.Date onDate)
ProgramWorkflowService
getCurrentPrograms
in interface ProgramWorkflowService
patient
- - The Patient to check for program enrollmentonDate
- - Specifies only to return programs that the patient is in as of this Datepatient
as of onDate
ProgramWorkflowService.getCurrentPrograms(org.openmrs.Patient,
java.util.Date)
public boolean isInProgram(Patient patient, Program program, java.util.Date fromDate, java.util.Date toDate)
ProgramWorkflowService
isInProgram
in interface ProgramWorkflowService
patient
- - The Patient to check for enrollmentprogram
- - The Program to check for enrollmentfromDate
- - Used to check whether patients were enrolled in the program
on
or after this DatetoDate
- - Used to check whether patients were enrolled in the program
on
or before this Datepatient
was enrolled in the
program
between fromDate
and toDate
ProgramWorkflowService.isInProgram(org.openmrs.Patient,
org.openmrs.Program, java.util.Date, java.util.Date)
public PatientState getPatientState(java.lang.Integer patientStateId)
ProgramWorkflowService
getPatientState
in interface ProgramWorkflowService
patientStateId
- - The primary key id of the PatientState to returnpatientStateId
ProgramWorkflowService.getPatientState(java.lang.Integer)
public PatientState getLatestState(PatientProgram patientProgram, ProgramWorkflow workflow)
ProgramWorkflowService
getLatestState
in interface ProgramWorkflowService
patientProgram
- - The PatientProgram whose states to checkworkflow
- - The ProgramWorkflow whose current state to check within the given
patientProgram
programWorkflow
within the given patientProgram
ProgramWorkflowService.getLatestState(org.openmrs.PatientProgram,
org.openmrs.ProgramWorkflow)
public java.util.Set<ProgramWorkflow> getCurrentWorkflowsByPatient(Patient patient)
ProgramWorkflowService
getCurrentWorkflowsByPatient
in interface ProgramWorkflowService
patient
- - The Patient to checkpatient
ProgramWorkflowService.getCurrentWorkflowsByPatient(org.openmrs.Patient)
public java.util.Set<ProgramWorkflow> getCurrentWorkflowsByPatientProgram(PatientProgram patientProgram)
ProgramWorkflowService
getCurrentWorkflowsByPatientProgram
in interface ProgramWorkflowService
patientProgram
- - The PatientProgram to checkprogram
ProgramWorkflowService.getCurrentWorkflowsByPatientProgram(org.openmrs.PatientProgram)
public void changeToState(PatientProgram patientProgram, ProgramWorkflow workflow, ProgramWorkflowState state, java.util.Date onDate)
ProgramWorkflowService
changeToState
in interface ProgramWorkflowService
patientProgram
- - The PatientProgram whose state you wish to changeworkflow
- - The ProgramWorkflow whose within the patientProgram
whose
state you wish to changestate
- - The ProgramWorkflowState you wish to change the ProgramWorkflow toonDate
- - The Date that you wish the State change to take placeProgramWorkflowService.changeToState(org.openmrs.PatientProgram,
org.openmrs.ProgramWorkflow, org.openmrs.ProgramWorkflowState, java.util.Date)
public void voidLastState(PatientProgram patientProgram, ProgramWorkflow workflow, java.lang.String voidReason)
ProgramWorkflowService
voidLastState
in interface ProgramWorkflowService
patientProgram
- - The patientProgram to checkworkflow
- - The ProgramWorkflow to checkvoidReason
- - The reason for voidingProgramWorkflowService.voidLastState(org.openmrs.PatientProgram,
org.openmrs.ProgramWorkflow, java.lang.String)
public void terminatePatientProgram(PatientProgram patientProgram, ProgramWorkflowState finalState, java.util.Date terminatedOn)
ProgramWorkflowService
terminatePatientProgram
in interface ProgramWorkflowService
patientProgram
- - The PatientProgram whose state you wish to changefinalState
- - The ProgramWorkflowState you wish to change the ProgramWorkflow toterminatedOn
- - The Date that you wish the State change to take placeProgramWorkflowService.terminatePatientProgram(org.openmrs.PatientProgram,
org.openmrs.ProgramWorkflowState, java.util.Date)
public void createConceptStateConversion(ConceptStateConversion csc)
ProgramWorkflowService
createConceptStateConversion
in interface ProgramWorkflowService
csc
- - The ConceptStateConversion to createProgramWorkflowService.createConceptStateConversion(org.openmrs.ConceptStateConversion)
public void updateConceptStateConversion(ConceptStateConversion csc)
ProgramWorkflowService
updateConceptStateConversion
in interface ProgramWorkflowService
csc
- - The ConceptStateConversion to updateProgramWorkflowService.updateConceptStateConversion(org.openmrs.ConceptStateConversion)
public java.util.List<ConceptStateConversion> getAllConversions()
ProgramWorkflowService
getAllConversions
in interface ProgramWorkflowService
ProgramWorkflowService.getAllConversions()
public void deleteConceptStateConversion(ConceptStateConversion csc)
ProgramWorkflowService
deleteConceptStateConversion
in interface ProgramWorkflowService
csc
- - The ConceptStateConversion to delete from the databaseProgramWorkflowService.deleteConceptStateConversion(org.openmrs.ConceptStateConversion)
public ConceptStateConversion getConceptStateConversionByUuid(java.lang.String uuid)
ProgramWorkflowService
getConceptStateConversionByUuid
in interface ProgramWorkflowService
uuid
- the universally unique identifierProgramWorkflowService.getConceptStateConversionByUuid(java.lang.String)
public PatientProgram getPatientProgramByUuid(java.lang.String uuid)
ProgramWorkflowService
getPatientProgramByUuid
in interface ProgramWorkflowService
uuid
- the universally unique identifierProgramWorkflowService.getPatientProgramByUuid(java.lang.String)
public Program getProgramByUuid(java.lang.String uuid)
ProgramWorkflowService
getProgramByUuid
in interface ProgramWorkflowService
uuid
- the universally unique identifierProgramWorkflowService.getProgramByUuid(java.lang.String)
public ProgramWorkflowState getStateByUuid(java.lang.String uuid)
ProgramWorkflowService
getStateByUuid
in interface ProgramWorkflowService
uuid
- the universally unique identifierProgramWorkflowService.getStateByUuid(java.lang.String)
public PatientState getPatientStateByUuid(java.lang.String uuid)
ProgramWorkflowService
getPatientStateByUuid
in interface ProgramWorkflowService
uuid
- the universally unique identifierpublic ProgramWorkflow getWorkflowByUuid(java.lang.String uuid)
ProgramWorkflowService
getWorkflowByUuid
in interface ProgramWorkflowService
ProgramWorkflowService.getWorkflowByUuid(java.lang.String)
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.