| 39 | | public List<Program> getPrograms() throws DAOException; |
|---|
| | 46 | /** |
|---|
| | 47 | * Retrieves a {@link Program} from the database by primary key programId |
|---|
| | 48 | * @param programId - The primary key programId to use to retrieve a {@link Program} |
|---|
| | 49 | * @return Program - The {@link Program} matching the passed programId |
|---|
| | 50 | * @throws DAOException |
|---|
| | 51 | */ |
|---|
| | 52 | public Program getProgram(Integer programId) throws DAOException; |
|---|
| | 53 | |
|---|
| | 54 | /** |
|---|
| | 55 | * Returns all programs |
|---|
| | 56 | * @param includeRetired whether or not to include retired programs |
|---|
| | 57 | * @return List<Program> all existing programs, including retired based on the input parameter |
|---|
| | 58 | * @throws DAOException |
|---|
| | 59 | */ |
|---|
| | 60 | public List<Program> getAllPrograms(boolean includeRetired) throws DAOException; |
|---|
| | 61 | |
|---|
| | 62 | /** |
|---|
| | 63 | * Returns programs that match the given string. |
|---|
| | 64 | * A null list will never be returned. An empty list will be returned if there are no programs |
|---|
| | 65 | * matching this <code>nameFragment</code> |
|---|
| | 66 | * |
|---|
| | 67 | * @param nameFragment is the string used to search for programs |
|---|
| | 68 | * @return List<Program> - list of Programs whose name matches the input parameter |
|---|
| | 69 | * @throws DAOException |
|---|
| | 70 | */ |
|---|
| | 71 | public List<Program> findPrograms(String nameFragment) throws DAOException; |
|---|
| | 72 | |
|---|
| | 73 | /** |
|---|
| | 74 | * Completely remove a program from the database (not reversible) |
|---|
| | 75 | * This method delegates to #purgeProgram(program, boolean) method |
|---|
| | 76 | * |
|---|
| | 77 | * @param program the Program to clean out of the database. |
|---|
| | 78 | * @throws DAOException |
|---|
| | 79 | */ |
|---|
| | 80 | public void deleteProgram(Program program) throws DAOException; |
|---|
| | 81 | |
|---|
| | 82 | // ************************** |
|---|
| | 83 | // PATIENT PROGRAM |
|---|
| | 84 | // ************************** |
|---|
| | 105 | |
|---|
| | 106 | /** |
|---|
| | 107 | * Returns PatientPrograms that match the input parameters. If an input parameter is set to null, the parameter will not be used. |
|---|
| | 108 | * Calling this method will all null parameters will return all PatientPrograms in the database |
|---|
| | 109 | * A null list will never be returned. An empty list will be returned if there are no programs matching the input criteria |
|---|
| | 110 | * |
|---|
| | 111 | * @param patient - if supplied all PatientPrograms returned will be for this Patient |
|---|
| | 112 | * @param program - if supplied all PatientPrograms returned will be for this Program |
|---|
| | 113 | * @param minEnrollmentDate - if supplied will limit PatientPrograms to those with enrollments on or after this Date |
|---|
| | 114 | * @param maxEnrollmentDate - if supplied will limit PatientPrograms to those with enrollments on or before this Date |
|---|
| | 115 | * @param minCompletionDate - if supplied will limit PatientPrograms to those completed on or after this Date OR not yet completed |
|---|
| | 116 | * @param maxCompletionDate - if supplied will limit PatientPrograms to those completed on or before this Date |
|---|
| | 117 | * @param includeVoided - boolean, if true will return voided PatientPrograms as well. If false, will not return voided PatientPrograms |
|---|
| | 118 | * @return List<PatientProgram> of PatientPrograms that match the passed input parameters |
|---|
| | 119 | * @throws DAOException |
|---|
| | 120 | */ |
|---|
| | 121 | public List<PatientProgram> getPatientPrograms(Patient patient, Program program, Date minEnrollmentDate, Date maxEnrollmentDate, Date minCompletionDate, Date maxCompletionDate, boolean includeVoided) throws DAOException; |
|---|
| | 122 | |
|---|
| | 123 | /** |
|---|
| | 124 | * Completely remove a patientProgram from the database (not reversible) |
|---|
| | 125 | * This method delegates to #purgePatientProgram(patientProgram, boolean) method |
|---|
| | 126 | * |
|---|
| | 127 | * @param patientProgram the PatientProgram to clean out of the database. |
|---|
| | 128 | * @throws DAOException |
|---|
| | 129 | */ |
|---|
| | 130 | public void deletePatientProgram(PatientProgram patientProgram) throws DAOException; |
|---|
| 57 | | public ProgramWorkflow getWorkflow(Integer id); |
|---|
| | 136 | /** |
|---|
| | 137 | * Save ConceptStateConversion to database (create if new or update if changed) |
|---|
| | 138 | * @param conceptStateConversion - The ConceptStateConversion to save |
|---|
| | 139 | * @return ConceptStateConversion - The saved ConceptStateConversion |
|---|
| | 140 | * @throws DAOException |
|---|
| | 141 | */ |
|---|
| | 142 | public ConceptStateConversion saveConceptStateConversion(ConceptStateConversion csc) throws DAOException; |
|---|
| | 143 | |
|---|
| | 144 | /** |
|---|
| | 145 | * Returns all conceptStateConversions |
|---|
| | 146 | * @return List<ConceptStateConversion> of all ConceptStateConversions that exist |
|---|
| | 147 | * @throws DAOException |
|---|
| | 148 | */ |
|---|
| | 149 | public List<ConceptStateConversion> getAllConceptStateConversions() throws DAOException; |
|---|
| 59 | | public void createWorkflow(ProgramWorkflow w); |
|---|
| 60 | | |
|---|
| 61 | | public void updateWorkflow(ProgramWorkflow w); |
|---|
| | 151 | /** |
|---|
| | 152 | * Returns a conceptStateConversion given that conceptStateConversions primary key <code>conceptStateConversionId</code> |
|---|
| | 153 | * A null value is returned if no conceptStateConversion exists with this conceptStateConversionId. |
|---|
| | 154 | * @param conceptStateConversionId integer primary key of the conceptStateConversion to find |
|---|
| | 155 | * @returns ConceptStateConversion object that has conceptStateConversion.conceptStateConversionId = <code>conceptStateConversionId</code> passed in. |
|---|
| | 156 | * @throws DAOException |
|---|
| | 157 | */ |
|---|
| | 158 | public ConceptStateConversion getConceptStateConversion(Integer id); |
|---|
| 63 | | public List<ProgramWorkflowState> getStates(boolean includeVoided); |
|---|
| 64 | | |
|---|
| 65 | | public ProgramWorkflowState getState(Integer id); |
|---|
| 66 | | |
|---|
| 67 | | public Collection<Integer> patientsInProgram(Program program, Date fromDate, Date toDate); |
|---|
| 68 | | |
|---|
| 69 | | public void createConceptStateConversion(ConceptStateConversion csc); |
|---|
| 70 | | |
|---|
| 71 | | public void updateConceptStateConversion(ConceptStateConversion csc); |
|---|
| 72 | | |
|---|
| | 160 | /** |
|---|
| | 161 | * Completely remove a conceptStateConversion from the database (not reversible) |
|---|
| | 162 | * @param conceptStateConversion the ConceptStateConversion to clean out of the database. |
|---|
| | 163 | * @param cascade <code>true</code> to delete related content |
|---|
| | 164 | * @throws DAOException |
|---|
| | 165 | */ |
|---|