public class HibernateProgramWorkflowDAO extends Object implements ProgramWorkflowDAO
ProgramWorkflowService
methods.ProgramWorkflowDAO
,
ProgramWorkflowService
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
log |
Constructor and Description |
---|
HibernateProgramWorkflowDAO() |
Modifier and Type | Method and Description |
---|---|
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
|
List<Program> |
findPrograms(String nameFragment)
Returns programs that match the given string.
|
List<ConceptStateConversion> |
getAllConceptStateConversions()
Returns all conceptStateConversions
|
List<Program> |
getAllPrograms(boolean includeRetired)
Returns all programs
|
ConceptStateConversion |
getConceptStateConversion(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(String uuid)
Auto generated method comment
|
PatientProgram |
getPatientProgram(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(String uuid)
Auto generated method comment
|
List<PatientProgram> |
getPatientPrograms(Cohort cohort,
Collection<Program> programs)
TODO: refactor this
|
List<PatientProgram> |
getPatientPrograms(Patient patient,
Program program,
Date minEnrollmentDate,
Date maxEnrollmentDate,
Date minCompletionDate,
Date maxCompletionDate,
boolean includeVoided)
Returns PatientPrograms that match the input parameters.
|
PatientState |
getPatientStateByUuid(String uuid) |
Program |
getProgram(Integer programId)
Retrieves a
Program from the database by primary key programId |
Program |
getProgramByUuid(String uuid)
Auto generated method comment
|
ProgramWorkflowState |
getStateByUuid(String uuid)
Auto generated method comment
|
ProgramWorkflow |
getWorkflowByUuid(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
|
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
sessionFactory
- public Program saveProgram(Program program) throws DAOException
ProgramWorkflowDAO
saveProgram
in interface ProgramWorkflowDAO
program
- - The Program
to saveProgram
DAOException
ProgramWorkflowDAO.saveProgram(org.openmrs.Program)
public Program getProgram(Integer programId) throws DAOException
ProgramWorkflowDAO
Program
from the database by primary key programIdgetProgram
in interface ProgramWorkflowDAO
programId
- - The primary key programId to use to retrieve a Program
Program
matching the passed programIdDAOException
ProgramWorkflowDAO.getProgram(java.lang.Integer)
public List<Program> getAllPrograms(boolean includeRetired) throws DAOException
ProgramWorkflowDAO
getAllPrograms
in interface ProgramWorkflowDAO
includeRetired
- whether or not to include retired programsDAOException
ProgramWorkflowDAO.getAllPrograms(boolean)
public List<Program> findPrograms(String nameFragment) throws DAOException
ProgramWorkflowDAO
nameFragment
findPrograms
in interface ProgramWorkflowDAO
nameFragment
- is the string used to search for programsDAOException
ProgramWorkflowDAO.findPrograms(java.lang.String)
public void deleteProgram(Program program) throws DAOException
ProgramWorkflowDAO
deleteProgram
in interface ProgramWorkflowDAO
program
- the Program to clean out of the database.DAOException
ProgramWorkflowDAO.deleteProgram(org.openmrs.Program)
public PatientProgram savePatientProgram(PatientProgram patientProgram) throws DAOException
ProgramWorkflowDAO
savePatientProgram
in interface ProgramWorkflowDAO
patientProgram
- is the PatientProgram to be saved to the databaseDAOException
ProgramWorkflowDAO.savePatientProgram(org.openmrs.PatientProgram)
public PatientProgram getPatientProgram(Integer patientProgramId) throws DAOException
ProgramWorkflowDAO
patientProgramId
A null value is returned if no PatientProgram exists with this patientProgramId.getPatientProgram
in interface ProgramWorkflowDAO
patientProgramId
- integer primary key of the PatientProgram to findpatientProgramId
passed in.DAOException
ProgramWorkflowDAO.getPatientProgram(java.lang.Integer)
public List<PatientProgram> getPatientPrograms(Patient patient, Program program, Date minEnrollmentDate, Date maxEnrollmentDate, Date minCompletionDate, Date maxCompletionDate, boolean includeVoided) throws DAOException
ProgramWorkflowDAO
getPatientPrograms
in interface ProgramWorkflowDAO
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
- - boolean, if true will return voided PatientPrograms as well. If false,
will not return voided PatientProgramsDAOException
ProgramWorkflowDAO.getPatientPrograms(Patient, Program, Date, Date,
Date, Date, boolean)
public List<PatientProgram> getPatientPrograms(Cohort cohort, Collection<Program> programs)
getPatientPrograms
in interface ProgramWorkflowDAO
ProgramWorkflowDAO.getPatientPrograms(org.openmrs.Cohort,
java.util.Collection)
public void deletePatientProgram(PatientProgram patientProgram) throws DAOException
ProgramWorkflowDAO
deletePatientProgram
in interface ProgramWorkflowDAO
patientProgram
- the PatientProgram to clean out of the database.DAOException
ProgramWorkflowDAO.deletePatientProgram(org.openmrs.PatientProgram)
public ConceptStateConversion saveConceptStateConversion(ConceptStateConversion csc) throws DAOException
ProgramWorkflowDAO
saveConceptStateConversion
in interface ProgramWorkflowDAO
csc
- The ConceptStateConversion to saveDAOException
ProgramWorkflowDAO.saveConceptStateConversion(org.openmrs.ConceptStateConversion)
public List<ConceptStateConversion> getAllConceptStateConversions() throws DAOException
ProgramWorkflowDAO
getAllConceptStateConversions
in interface ProgramWorkflowDAO
DAOException
ProgramWorkflowDAO.getAllConceptStateConversions()
public ConceptStateConversion getConceptStateConversion(Integer conceptStateConversionId)
ProgramWorkflowDAO
conceptStateConversionId
A null value is returned if no conceptStateConversion
exists with this conceptStateConversionId.getConceptStateConversion
in interface ProgramWorkflowDAO
conceptStateConversionId
- integer primary key of the conceptStateConversion to findconceptStateConversionId
passed in.ProgramWorkflowDAO.getConceptStateConversion(java.lang.Integer)
public void deleteConceptStateConversion(ConceptStateConversion csc)
ProgramWorkflowDAO
deleteConceptStateConversion
in interface ProgramWorkflowDAO
csc
- the ConceptStateConversion to clean out of the database.ProgramWorkflowDAO.deleteConceptStateConversion(org.openmrs.ConceptStateConversion)
public ConceptStateConversion getConceptStateConversion(ProgramWorkflow workflow, Concept trigger)
ProgramWorkflowDAO
ProgramWorkflow
and
Concept
getConceptStateConversion
in interface ProgramWorkflowDAO
workflow
- the ProgramWorkflow to checktrigger
- the Concept to checkProgramWorkflow
and
Concept
ProgramWorkflowDAO.getConceptStateConversion(org.openmrs.ProgramWorkflow,
org.openmrs.Concept)
public ConceptStateConversion getConceptStateConversionByUuid(String uuid)
ProgramWorkflowDAO
getConceptStateConversionByUuid
in interface ProgramWorkflowDAO
ProgramWorkflowDAO.getConceptStateConversionByUuid(java.lang.String)
public PatientProgram getPatientProgramByUuid(String uuid)
ProgramWorkflowDAO
getPatientProgramByUuid
in interface ProgramWorkflowDAO
ProgramWorkflowDAO.getPatientProgramByUuid(java.lang.String)
public Program getProgramByUuid(String uuid)
ProgramWorkflowDAO
getProgramByUuid
in interface ProgramWorkflowDAO
ProgramWorkflowDAO.getProgramByUuid(java.lang.String)
public ProgramWorkflowState getStateByUuid(String uuid)
ProgramWorkflowDAO
getStateByUuid
in interface ProgramWorkflowDAO
ProgramWorkflowDAO.getStateByUuid(java.lang.String)
public PatientState getPatientStateByUuid(String uuid)
getPatientStateByUuid
in interface ProgramWorkflowDAO
public ProgramWorkflow getWorkflowByUuid(String uuid)
ProgramWorkflowDAO
getWorkflowByUuid
in interface ProgramWorkflowDAO
ProgramWorkflowDAO.getWorkflowByUuid(java.lang.String)
Copyright © 2018 OpenMRS LLC.. All Rights Reserved.