|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@Transactional public interface ProgramWorkflowService
Contains methods pertaining to management of Programs, ProgramWorkflows, ProgramWorkflowStates,
PatientPrograms, PatientStates, and ConceptStateConversions Use:
Program program = new Program(); program.set___(___); ...etc Context.getProgramWorkflowService().saveProgram(program);
Method Summary | |
---|---|
void |
changeToState(PatientProgram patientProgram,
ProgramWorkflow workflow,
ProgramWorkflowState state,
java.util.Date onDate)
Deprecated. use PatientProgram.transitionToState(ProgramWorkflowState, Date) |
void |
createConceptStateConversion(ConceptStateConversion conceptStateConversion)
Deprecated. use saveConceptStateConversion(ConceptStateConversion) |
void |
createOrUpdateProgram(Program program)
Deprecated. use saveProgram(Program) |
void |
createPatientProgram(PatientProgram patientProgram)
Deprecated. use savePatientProgram(PatientProgram) |
void |
createWorkflow(ProgramWorkflow programWorkflow)
Deprecated. use followed by @link
#saveProgram(Program) |
void |
deleteConceptStateConversion(ConceptStateConversion csc)
Deprecated. use purgeConceptStateConversion(ConceptStateConversion) |
void |
enrollPatientInProgram(Patient patient,
Program program,
java.util.Date enrollmentDate,
java.util.Date completionDate,
User creator)
Deprecated. use {new PatientProgram(...) followed by @link #savePatientProgram(PatientProgram)} |
java.util.List<ConceptStateConversion> |
getAllConceptStateConversions()
Returns all conceptStateConversions |
java.util.List<ConceptStateConversion> |
getAllConversions()
Deprecated. use getAllConceptStateConversions() |
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 conceptStateConversionId)
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. use getPatientPrograms(Patient, Program, Date, Date, Date, Date, boolean) |
java.util.Set<ProgramWorkflow> |
getCurrentWorkflowsByPatient(Patient patient)
Deprecated. No current use outside of this service. Should be retrieved from Patient, PatientProgram, and PatientState |
java.util.Set<ProgramWorkflow> |
getCurrentWorkflowsByPatientProgram(PatientProgram program)
Deprecated. No current use outside of this service. Should be retrieved from Patient, PatientProgram, and PatientState |
PatientState |
getLatestState(PatientProgram patientProgram,
ProgramWorkflow programWorkflow)
Deprecated. use PatientProgram.getCurrentState(ProgramWorkflow) |
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. use getPatientPrograms(Patient, Program, Date, Date, Date, Date, boolean) |
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. use PatientProgram.getPatientState(Integer) |
PatientState |
getPatientStateByUuid(java.lang.String uuid)
Get a program state by its uuid. |
java.util.List<ProgramWorkflowState> |
getPossibleNextStates(PatientProgram patientProgram,
ProgramWorkflow workflow)
Deprecated. use ProgramWorkflow.getPossibleNextStates(PatientProgram) |
Program |
getProgram(java.lang.Integer programId)
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)
Deprecated. use getProgramByName(String) |
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. use getAllPrograms() |
java.util.List<Program> |
getPrograms(java.lang.String nameFragment)
Returns programs that match the given string. |
ProgramWorkflowState |
getState(java.lang.Integer id)
Deprecated. ProgramWorkflowStates should be retrieved from the ProgramWorkflow they
belong to |
ProgramWorkflowState |
getState(ProgramWorkflow programWorkflow,
java.lang.String name)
Deprecated. ProgramWorkflowStates should be retrieved from the ProgramWorkflow they
belong to |
ProgramWorkflowState |
getStateByUuid(java.lang.String uuid)
Get a state by its uuid. |
java.util.List<ProgramWorkflowState> |
getStates()
Deprecated. ProgramWorkflowStates should be retrieved from the ProgramWorkflow they
belong to |
java.util.List<ProgramWorkflowState> |
getStates(boolean includeVoided)
Deprecated. ProgramWorkflowStates should be retrieved from the ProgramWorkflow they
belong to |
ProgramWorkflow |
getWorkflow(java.lang.Integer id)
Deprecated. ProgramWorkflows should not be retrieved directly, but rather through the programs they belong to: use Program.getWorkflows() |
ProgramWorkflow |
getWorkflow(Program program,
java.lang.String name)
Deprecated. use Program.getWorkflowByName(String) |
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. use getPatientPrograms(Patient, Program, Date, Date, Date, Date, boolean) |
boolean |
isLegalTransition(ProgramWorkflowState fromState,
ProgramWorkflowState toState)
Deprecated. use ProgramWorkflow.isLegalTransition(ProgramWorkflowState, ProgramWorkflowState) |
java.util.Collection<java.lang.Integer> |
patientsInProgram(Program program,
java.util.Date fromDate,
java.util.Date toDate)
Deprecated. use getPatientPrograms(Patient, Program, Date, Date, Date, Date, boolean)
which can be Iterated across to return collection of patient ids |
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 conceptStateConversion)
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. use PatientProgram.transitionToState(ProgramWorkflowState, Date) |
void |
triggerStateConversion(Patient patient,
Concept reasonForExit,
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 conceptStateConversion)
Deprecated. use saveConceptStateConversion(ConceptStateConversion) |
void |
updatePatientProgram(PatientProgram patientProgram)
Deprecated. use savePatientProgram(PatientProgram) |
void |
updateWorkflow(ProgramWorkflow programWorkflow)
Deprecated. use to save changes to all ProgramWorkflows for the
given Program |
void |
voidLastState(PatientProgram patientProgram,
ProgramWorkflow wf,
java.lang.String voidReason)
Deprecated. use PatientProgram.voidLastState(ProgramWorkflow, User, Date, String) |
PatientProgram |
voidPatientProgram(PatientProgram patientProgram,
java.lang.String reason)
Voids the given patientProgram |
void |
voidWorkflow(ProgramWorkflow programWorkflow,
java.lang.String reason)
Deprecated. use followed by @link
#saveProgram(Program) |
Methods inherited from interface org.openmrs.api.OpenmrsService |
---|
onShutdown, onStartup |
Method Detail |
---|
void setProgramWorkflowDAO(ProgramWorkflowDAO dao)
dao
- - The DAO for this service@Authorized(value="Manage Programs") Program saveProgram(Program program) throws APIException
program
to database (create if new or update if changed)
program
- is the Program to be saved to the database
APIException
@Authorized(value="View Programs") @Transactional(readOnly=true) Program getProgram(java.lang.Integer programId) throws APIException
programId
A null value is
returned if no program exists with this programId.
programId
- integer primary key of the program to find
programId
passed in.
APIException
@Transactional(readOnly=true) Program getProgram(java.lang.String name)
getProgramByName(String)
@Authorized(value="View Programs") @Transactional(readOnly=true) Program getProgramByName(java.lang.String name) throws APIException
name
A null value is returned if
there is no program with this name
name
- the exact name of the program to match on
name
to Program.name
APIException
@Authorized(value="View Programs") @Transactional(readOnly=true) java.util.List<Program> getAllPrograms() throws APIException
APIException
@Authorized(value="View Programs") @Transactional(readOnly=true) java.util.List<Program> getAllPrograms(boolean includeRetired) throws APIException
includeRetired
- whether or not to include retired programs
APIException
@Authorized(value="View Programs") @Transactional(readOnly=true) java.util.List<Program> getPrograms(java.lang.String nameFragment) throws APIException
nameFragment
nameFragment
- is the string used to search for programs
APIException
@Authorized(value="Manage Programs") void purgeProgram(Program program) throws APIException
program
- the Program to clean out of the database.
APIException
@Authorized(value="Manage Programs") void purgeProgram(Program program, boolean cascade) throws APIException
cascade
- true
to delete related content
APIException
@Authorized(value="Manage Programs") Program retireProgram(Program program) throws APIException
program
- Program to be retired
APIException
@Authorized(value="Manage Programs") Program unRetireProgram(Program program) throws APIException
program
- Program to be unretired
APIException
@Transactional(readOnly=true) Program getProgramByUuid(java.lang.String uuid)
uuid
- the universally unique identifier
@Transactional(readOnly=true) PatientState getPatientStateByUuid(java.lang.String uuid)
uuid
- the universally unique identifier
@Authorized(value={"Add Patient Programs","Edit Patient Programs"}) PatientProgram savePatientProgram(PatientProgram patientProgram) throws APIException
patientProgram
- is the PatientProgram to be saved to the database
APIException
@Authorized(value="View Patient Programs") @Transactional(readOnly=true) PatientProgram getPatientProgram(java.lang.Integer patientProgramId) throws APIException
patientProgramId
A null value is returned if no PatientProgram exists with this patientProgramId.
patientProgramId
- integer primary key of the PatientProgram to find
patientProgramId
passed in.
APIException
@Authorized(value="View Patient Programs") @Transactional(readOnly=true) 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
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 PatientPrograms
APIException
@Authorized(value="Purge Patient Programs") void purgePatientProgram(PatientProgram patientProgram) throws APIException
patientProgram
- the PatientProgram to clean out of the database.
APIException
@Authorized(value="Purge Patient Programs") void purgePatientProgram(PatientProgram patientProgram, boolean cascade) throws APIException
patientProgram
- the PatientProgram to clean out of the database.cascade
- true
to delete related content
APIException
@Authorized(value="Delete Patient Programs") PatientProgram voidPatientProgram(PatientProgram patientProgram, java.lang.String reason) throws APIException
patientProgram
- patientProgram to be voidedreason
- is the reason why the patientProgram is being voided
APIException
@Authorized(value="Delete Patient Programs") PatientProgram unvoidPatientProgram(PatientProgram patientProgram) throws APIException
patientProgram
- patientProgram to be un-voided
APIException
@Transactional(readOnly=true) ProgramWorkflow getWorkflowByUuid(java.lang.String uuid)
uuid
-
@Authorized(value={"Add Patient Programs","Edit Patient Programs"}) ConceptStateConversion saveConceptStateConversion(ConceptStateConversion conceptStateConversion) throws APIException
conceptStateConversion
- - The ConceptStateConversion to save
APIException
@Authorized(value="View Programs") @Transactional(readOnly=true) ConceptStateConversion getConceptStateConversion(java.lang.Integer conceptStateConversionId) throws APIException
conceptStateConversionId
A null value is returned if no conceptStateConversion
exists with this conceptStateConversionId.
conceptStateConversionId
- integer primary key of the conceptStateConversion to find
conceptStateConversionId
passed in.
APIException
@Authorized(value="View Programs") @Transactional(readOnly=true) java.util.List<ConceptStateConversion> getAllConceptStateConversions() throws APIException
APIException
@Authorized(value="Manage Programs") void purgeConceptStateConversion(ConceptStateConversion conceptStateConversion) throws APIException
conceptStateConversion
- the ConceptStateConversion to clean out of the database.
APIException
@Authorized(value="Manage Programs") void purgeConceptStateConversion(ConceptStateConversion conceptStateConversion, boolean cascade) throws APIException
conceptStateConversion
- the ConceptStateConversion to clean out of the database.cascade
- true
to delete related content
APIException
void triggerStateConversion(Patient patient, Concept reasonForExit, java.util.Date dateConverted) throws APIException
reasonForExit
concept and any ProgramWorkflow in the PatientPrograms for the patient
patient
- - the Patient to trigger the ConceptStateConversion onreasonForExit
- - the Concept to trigger the ConceptStateConversiondateConverted
- - the Date of the ConceptStateConversion
APIException
@Transactional(readOnly=true) ConceptStateConversion getConceptStateConversion(ProgramWorkflow workflow, Concept trigger) throws APIException
ProgramWorkflow
and
Concept
workflow
- - the ProgramWorkflow to checktrigger
- - the Concept to check
ProgramWorkflow
and
Concept
APIException
@Authorized(value="Manage Programs") void createOrUpdateProgram(Program program) throws APIException
saveProgram(Program)
program
- Program to create
APIException
@Authorized(value="View Programs") @Transactional(readOnly=true) java.util.List<Program> getPrograms() throws APIException
getAllPrograms()
APIException
@Authorized(value="Manage Programs") void createWorkflow(ProgramWorkflow programWorkflow) throws APIException
followed by @link
#saveProgram(Program)
programWorkflow
- - The ProgramWorkflow to create
APIException
@Authorized(value="Manage Programs") void updateWorkflow(ProgramWorkflow programWorkflow) throws APIException
to save changes to all ProgramWorkflows for the
given Program
programWorkflow
- - The ProgramWorkflow to update
APIException
@Authorized(value="View Programs") @Transactional(readOnly=true) ProgramWorkflow getWorkflow(java.lang.Integer id) throws APIException
Program.getWorkflows()
programWorkflowId
id
- integer primary key of the ProgramWorkflow to find
APIException
@Authorized(value="View Programs") @Transactional(readOnly=true) ProgramWorkflow getWorkflow(Program program, java.lang.String name) throws APIException
Program.getWorkflowByName(String)
program
- - The Program of the ProgramWorkflow to returnname
- - The name of the ProgramWorkflow to return
APIException
@Authorized(value="Manage Programs") void voidWorkflow(ProgramWorkflow programWorkflow, java.lang.String reason) throws APIException
followed by @link
#saveProgram(Program)
programWorkflow
- - The ProgramWorkflow to retirereason
- - The reason for retiring the ProgramWorkflow
APIException
@Transactional(readOnly=true) ProgramWorkflowState getStateByUuid(java.lang.String uuid)
uuid
- the universally unique identifier
@Authorized(value="View Programs") @Transactional(readOnly=true) java.util.List<ProgramWorkflowState> getStates() throws APIException
ProgramWorkflow
they
belong to
APIException
ProgramWorkflow.getStates()
@Authorized(value="View Programs") @Transactional(readOnly=true) java.util.List<ProgramWorkflowState> getStates(boolean includeVoided) throws APIException
ProgramWorkflow
they
belong to
includeVoided
- - if false, only returns non-voided ProgramWorkflowStates
APIException
ProgramWorkflow.getStates(boolean)
@Authorized(value="View Programs") @Transactional(readOnly=true) ProgramWorkflowState getState(java.lang.Integer id) throws APIException
ProgramWorkflow
they
belong to
id
- - The primary key id of the ProgramWorkflowState to return
APIException
ProgramWorkflow.getState(Integer)
@Authorized(value="View Programs") @Transactional(readOnly=true) ProgramWorkflowState getState(ProgramWorkflow programWorkflow, java.lang.String name) throws APIException
ProgramWorkflow
they
belong to
name
in the passed
programWorkflow
programWorkflow
- - The programWorkflow to check for ProgramWorkflowStatename
- - the name of the programWorkflowState to look for
name
in
the passed programWorkflow
APIException
ProgramWorkflow.getStateByName(String)
@Authorized(value="View Programs") @Transactional(readOnly=true) java.util.List<ProgramWorkflowState> getPossibleNextStates(PatientProgram patientProgram, ProgramWorkflow workflow) throws APIException
ProgramWorkflow.getPossibleNextStates(PatientProgram)
patientProgram
- - the PatientProgram to retrieve possible next transitions fromworkflow
- - the ProgramWorkflow to retrieve possible next transitions from
APIException
@Authorized(value="View Programs") @Transactional(readOnly=true) boolean isLegalTransition(ProgramWorkflowState fromState, ProgramWorkflowState toState) throws APIException
ProgramWorkflow.isLegalTransition(ProgramWorkflowState, ProgramWorkflowState)
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
APIException
@Authorized(value="Add Patient Programs") void createPatientProgram(PatientProgram patientProgram) throws APIException
savePatientProgram(PatientProgram)
patientProgram
- - The PatientProgram to create
APIException
@Authorized(value="Edit Patient Programs") void updatePatientProgram(PatientProgram patientProgram) throws APIException
savePatientProgram(PatientProgram)
patientProgram
- - The PatientProgram to update
APIException
@Authorized(value="Add Patient Programs") void enrollPatientInProgram(Patient patient, Program program, java.util.Date enrollmentDate, java.util.Date completionDate, User creator) throws APIException
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
APIException
@Authorized(value="View Patient Programs") @Transactional(readOnly=true) java.util.Collection<PatientProgram> getPatientPrograms(Patient patient) throws APIException
getPatientPrograms(Patient, Program, Date, Date, Date, Date, boolean)
patient
patient
- - The Patient to retrieve all PatientPrograms for
patient
APIException
@Authorized(value="View Patient Programs") @Transactional(readOnly=true) java.util.Collection<java.lang.Integer> patientsInProgram(Program program, java.util.Date fromDate, java.util.Date toDate) throws APIException
getPatientPrograms(Patient, Program, Date, Date, Date, Date, boolean)
which can be Iterated across to return collection of patient ids
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 Date
program
between fromDate
and toDate
APIException
@Authorized(value="View Patient Programs") @Transactional(readOnly=true) java.util.Collection<PatientProgram> getCurrentPrograms(Patient patient, java.util.Date onDate) throws APIException
getPatientPrograms(Patient, Program, Date, Date, Date, Date, boolean)
patient
- - The Patient to check for program enrollmentonDate
- - Specifies only to return programs that the patient is in as of this Date
patient
as of onDate
APIException
@Authorized(value="View Patient Programs") @Transactional(readOnly=true) boolean isInProgram(Patient patient, Program program, java.util.Date fromDate, java.util.Date toDate) throws APIException
getPatientPrograms(Patient, Program, Date, Date, Date, Date, boolean)
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 Date
patient
was enrolled in the
program
between fromDate
and toDate
APIException
@Authorized(value="View Patient Programs") @Transactional(readOnly=true) PatientState getPatientState(java.lang.Integer patientStateId) throws APIException
PatientProgram.getPatientState(Integer)
patientStateId
- - The primary key id of the PatientState to return
patientStateId
APIException
PatientProgram
@Authorized(value="View Patient Programs") @Transactional(readOnly=true) PatientState getLatestState(PatientProgram patientProgram, ProgramWorkflow programWorkflow) throws APIException
PatientProgram.getCurrentState(ProgramWorkflow)
patientProgram
- - The PatientProgram whose states to checkprogramWorkflow
- - The ProgramWorkflow whose current state to check within the given
patientProgram
programWorkflow
within the given patientProgram
APIException
@Authorized(value="View Patient Programs") @Transactional(readOnly=true) java.util.Set<ProgramWorkflow> getCurrentWorkflowsByPatient(Patient patient) throws APIException
patient
- - The Patient to check
patient
APIException
@Authorized(value="View Patient Programs") @Transactional(readOnly=true) java.util.Set<ProgramWorkflow> getCurrentWorkflowsByPatientProgram(PatientProgram program) throws APIException
program
- - The PatientProgram to check
program
APIException
@Authorized(value={"Add Patient Programs","Edit Patient Programs"}) void changeToState(PatientProgram patientProgram, ProgramWorkflow workflow, ProgramWorkflowState state, java.util.Date onDate) throws APIException
PatientProgram.transitionToState(ProgramWorkflowState, Date)
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 place
APIException
@Transactional(readOnly=true) PatientProgram getPatientProgramByUuid(java.lang.String uuid)
uuid
- the universally unique identifier
@Transactional(readOnly=true) @Authorized(value="View Patient Programs") java.util.List<PatientProgram> getPatientPrograms(Cohort cohort, java.util.Collection<Program> programs)
cohort
- programs
-
@Authorized(value={"Add Patient Programs","Edit Patient Programs"}) void terminatePatientProgram(PatientProgram patientProgram, ProgramWorkflowState finalState, java.util.Date terminatedOn)
PatientProgram.transitionToState(ProgramWorkflowState, Date)
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 place
APIException
@Authorized(value="Edit Patient Programs") void voidLastState(PatientProgram patientProgram, ProgramWorkflow wf, java.lang.String voidReason) throws APIException
PatientProgram.voidLastState(ProgramWorkflow, User, Date, String)
patientProgram
- - The patientProgram to checkwf
- - The ProgramWorkflow to checkvoidReason
- - The reason for voiding
APIException
@Authorized(value="Add Patient Programs") void createConceptStateConversion(ConceptStateConversion conceptStateConversion) throws APIException
saveConceptStateConversion(ConceptStateConversion)
conceptStateConversion
- - The ConceptStateConversion to create
APIException
@Authorized(value="Edit Patient Programs") void updateConceptStateConversion(ConceptStateConversion conceptStateConversion) throws APIException
saveConceptStateConversion(ConceptStateConversion)
conceptStateConversion
- - The ConceptStateConversion to update
APIException
@Authorized(value="View Programs") @Transactional(readOnly=true) java.util.List<ConceptStateConversion> getAllConversions() throws APIException
getAllConceptStateConversions()
APIException
getAllConceptStateConversions()
void deleteConceptStateConversion(ConceptStateConversion csc) throws APIException
purgeConceptStateConversion(ConceptStateConversion)
csc
- - The ConceptStateConversion to delete from the database
APIException
@Transactional(readOnly=true) ConceptStateConversion getConceptStateConversionByUuid(java.lang.String uuid)
uuid
- the universally unique identifier
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |