|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.openmrs.api.db.hibernate.HibernateProgramWorkflowDAO
public class HibernateProgramWorkflowDAO
Hibernate specific ProgramWorkflow related functions.
This class should not be used directly. All calls should go through the
ProgramWorkflowService methods.
ProgramWorkflowDAO,
ProgramWorkflowService| Field Summary | |
|---|---|
protected org.apache.commons.logging.Log |
log
|
| Constructor Summary | |
|---|---|
HibernateProgramWorkflowDAO()
|
|
| Method Summary | |
|---|---|
void |
deleteConceptStateConversion(ConceptStateConversion csc)
Completely remove a conceptStateConversion from the database (not reversible) |
void |
deletePatientProgram(PatientProgram patientProgram)
Completely remove a patientProgram from the database (not reversible) This method delegates to #purgePatientProgram(patientProgram, boolean) method |
void |
deleteProgram(Program program)
Completely remove a program from the database (not reversible) This method delegates to #purgeProgram(program, boolean) method |
java.util.List<Program> |
findPrograms(java.lang.String nameFragment)
Returns programs that match the given string. |
java.util.List<ConceptStateConversion> |
getAllConceptStateConversions()
Returns all conceptStateConversions |
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)
Auto generated method comment |
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)
Auto generated method comment |
java.util.List<PatientProgram> |
getPatientPrograms(Cohort cohort,
java.util.Collection<Program> programs)
TODO: refactor this |
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 |
getPatientStateByUuid(java.lang.String uuid)
|
Program |
getProgram(java.lang.Integer programId)
Retrieves a Program from the database by primary key programId |
Program |
getProgramByUuid(java.lang.String uuid)
Auto generated method comment |
ProgramWorkflowState |
getStateByUuid(java.lang.String uuid)
Auto generated method comment |
ProgramWorkflow |
getWorkflowByUuid(java.lang.String uuid)
Auto generated method comment |
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)
Saves a Program to the database |
void |
setSessionFactory(org.hibernate.SessionFactory sessionFactory)
Hibernate Session Factory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.apache.commons.logging.Log log
| Constructor Detail |
|---|
public HibernateProgramWorkflowDAO()
| Method Detail |
|---|
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
sessionFactory -
public Program saveProgram(Program program)
throws DAOException
ProgramWorkflowDAO
saveProgram in interface ProgramWorkflowDAOprogram - - The Program to save
Program
DAOExceptionProgramWorkflowDAO.saveProgram(org.openmrs.Program)
public Program getProgram(java.lang.Integer programId)
throws DAOException
ProgramWorkflowDAOProgram from the database by primary key programId
getProgram in interface ProgramWorkflowDAOprogramId - - The primary key programId to use to retrieve a Program
Program matching the passed programId
DAOExceptionProgramWorkflowDAO.getProgram(java.lang.Integer)
public java.util.List<Program> getAllPrograms(boolean includeRetired)
throws DAOException
ProgramWorkflowDAO
getAllPrograms in interface ProgramWorkflowDAOincludeRetired - whether or not to include retired programs
DAOExceptionProgramWorkflowDAO.getAllPrograms(boolean)
public java.util.List<Program> findPrograms(java.lang.String nameFragment)
throws DAOException
ProgramWorkflowDAOnameFragment
findPrograms in interface ProgramWorkflowDAOnameFragment - is the string used to search for programs
DAOExceptionProgramWorkflowDAO.findPrograms(java.lang.String)
public void deleteProgram(Program program)
throws DAOException
ProgramWorkflowDAO
deleteProgram in interface ProgramWorkflowDAOprogram - the Program to clean out of the database.
DAOExceptionProgramWorkflowDAO.deleteProgram(org.openmrs.Program)
public PatientProgram savePatientProgram(PatientProgram patientProgram)
throws DAOException
ProgramWorkflowDAO
savePatientProgram in interface ProgramWorkflowDAOpatientProgram - is the PatientProgram to be saved to the database
DAOExceptionProgramWorkflowDAO.savePatientProgram(org.openmrs.PatientProgram)
public PatientProgram getPatientProgram(java.lang.Integer patientProgramId)
throws DAOException
ProgramWorkflowDAOpatientProgramId
A null value is returned if no PatientProgram exists with this patientProgramId.
getPatientProgram in interface ProgramWorkflowDAOpatientProgramId - integer primary key of the PatientProgram to find
patientProgramId passed in.
DAOExceptionProgramWorkflowDAO.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 DAOException
ProgramWorkflowDAO
getPatientPrograms in interface ProgramWorkflowDAOpatient - - 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 - - boolean, if true will return voided PatientPrograms as well. If false,
will not return voided PatientPrograms
DAOExceptionProgramWorkflowDAO.getPatientPrograms(Patient, Program, Date, Date,
Date, Date, boolean)
public java.util.List<PatientProgram> getPatientPrograms(Cohort cohort,
java.util.Collection<Program> programs)
getPatientPrograms in interface ProgramWorkflowDAOProgramWorkflowDAO.getPatientPrograms(org.openmrs.Cohort,
java.util.Collection)
public void deletePatientProgram(PatientProgram patientProgram)
throws DAOException
ProgramWorkflowDAO
deletePatientProgram in interface ProgramWorkflowDAOpatientProgram - the PatientProgram to clean out of the database.
DAOExceptionProgramWorkflowDAO.deletePatientProgram(org.openmrs.PatientProgram)
public ConceptStateConversion saveConceptStateConversion(ConceptStateConversion csc)
throws DAOException
ProgramWorkflowDAO
saveConceptStateConversion in interface ProgramWorkflowDAOcsc - The ConceptStateConversion to save
DAOExceptionProgramWorkflowDAO.saveConceptStateConversion(org.openmrs.ConceptStateConversion)
public java.util.List<ConceptStateConversion> getAllConceptStateConversions()
throws DAOException
ProgramWorkflowDAO
getAllConceptStateConversions in interface ProgramWorkflowDAODAOExceptionProgramWorkflowDAO.getAllConceptStateConversions()public ConceptStateConversion getConceptStateConversion(java.lang.Integer conceptStateConversionId)
ProgramWorkflowDAOconceptStateConversionId A null value is returned if no conceptStateConversion
exists with this conceptStateConversionId.
getConceptStateConversion in interface ProgramWorkflowDAOconceptStateConversionId - integer primary key of the conceptStateConversion to find
conceptStateConversionId passed in.ProgramWorkflowDAO.getConceptStateConversion(java.lang.Integer)public void deleteConceptStateConversion(ConceptStateConversion csc)
ProgramWorkflowDAO
deleteConceptStateConversion in interface ProgramWorkflowDAOcsc - the ConceptStateConversion to clean out of the database.ProgramWorkflowDAO.deleteConceptStateConversion(org.openmrs.ConceptStateConversion)
public ConceptStateConversion getConceptStateConversion(ProgramWorkflow workflow,
Concept trigger)
ProgramWorkflowDAOProgramWorkflow and
Concept
getConceptStateConversion in interface ProgramWorkflowDAOworkflow - the ProgramWorkflow to checktrigger - the Concept to check
ProgramWorkflow and
ConceptProgramWorkflowDAO.getConceptStateConversion(org.openmrs.ProgramWorkflow,
org.openmrs.Concept)public ConceptStateConversion getConceptStateConversionByUuid(java.lang.String uuid)
ProgramWorkflowDAO
getConceptStateConversionByUuid in interface ProgramWorkflowDAOProgramWorkflowDAO.getConceptStateConversionByUuid(java.lang.String)public PatientProgram getPatientProgramByUuid(java.lang.String uuid)
ProgramWorkflowDAO
getPatientProgramByUuid in interface ProgramWorkflowDAOProgramWorkflowDAO.getPatientProgramByUuid(java.lang.String)public Program getProgramByUuid(java.lang.String uuid)
ProgramWorkflowDAO
getProgramByUuid in interface ProgramWorkflowDAOProgramWorkflowDAO.getProgramByUuid(java.lang.String)public ProgramWorkflowState getStateByUuid(java.lang.String uuid)
ProgramWorkflowDAO
getStateByUuid in interface ProgramWorkflowDAOProgramWorkflowDAO.getStateByUuid(java.lang.String)public PatientState getPatientStateByUuid(java.lang.String uuid)
getPatientStateByUuid in interface ProgramWorkflowDAOpublic ProgramWorkflow getWorkflowByUuid(java.lang.String uuid)
ProgramWorkflowDAO
getWorkflowByUuid in interface ProgramWorkflowDAOProgramWorkflowDAO.getWorkflowByUuid(java.lang.String)
|
OpenMRS-1.7.x | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||