Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register
Show
Ignore:
Timestamp:
05/09/08 10:53:35 (2 months ago)
Author:
bwolfe
Message:

Merging report-api-refactoring to trunk [2696]:[4157]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs/trunk/src/api/org/openmrs/api/db/PatientSetDAO.java

    r4095 r4158  
    1919import java.util.Map; 
    2020 
     21import org.openmrs.Cohort; 
    2122import org.openmrs.Concept; 
    2223import org.openmrs.Drug; 
     
    4243import org.openmrs.api.PatientSetService.PatientLocationMethod; 
    4344import org.openmrs.api.PatientSetService.TimeModifier; 
    44 import org.openmrs.reporting.PatientSet; 
    4545 
    4646public interface PatientSetDAO { 
    4747 
    48         public String exportXml(PatientSet ps) throws DAOException; 
     48        public String exportXml(Cohort ps) throws DAOException; 
    4949         
    5050        public String exportXml(Integer patientId) throws DAOException; 
    5151         
    52         public PatientSet getAllPatients(); 
     52        public Cohort getAllPatients(); 
    5353         
    54         public PatientSet getPatientsByCharacteristics(String gender, Date minBirthdate, Date maxBirthdate, Integer minAge, Integer maxAge, Boolean aliveOnly, Boolean deadOnly) throws DAOException; 
     54        public Cohort getPatientsByCharacteristics(String gender, Date minBirthdate, Date maxBirthdate, Integer minAge, Integer maxAge, Boolean aliveOnly, Boolean deadOnly) throws DAOException; 
     55 
     56        public Cohort getPatientsByCharacteristics(String gender, Date minBirthdate, Date maxBirthdate, Integer minAge, Integer maxAge, Boolean aliveOnly, Boolean deadOnly, Date effectiveDate) throws DAOException; 
    5557         
    56         public PatientSet getPatientsHavingDateObs(Integer conceptId, Date startTime, Date endTime); 
     58        public Cohort getPatientsHavingDateObs(Integer conceptId, Date startTime, Date endTime); 
    5759         
    58         public PatientSet getPatientsHavingNumericObs(Integer conceptId, TimeModifier timeModifier, PatientSetService.Modifier modifier, Number value, Date fromDate, Date toDate) throws DAOException; 
     60        public Cohort getPatientsHavingNumericObs(Integer conceptId, TimeModifier timeModifier, PatientSetService.Modifier modifier, Number value, Date fromDate, Date toDate) throws DAOException; 
    5961         
    60         public PatientSet getPatientsHavingObs(Integer conceptId, TimeModifier timeModifier, PatientSetService.Modifier modifier, Object value, Date fromDate, Date toDate) throws DAOException; 
     62        public Cohort getPatientsHavingObs(Integer conceptId, TimeModifier timeModifier, PatientSetService.Modifier modifier, Object value, Date fromDate, Date toDate) throws DAOException; 
    6163         
    62         public PatientSet getPatientsHavingEncounters(List<EncounterType> encounterTypeList, Location location, Form form, Date fromDate, Date toDate, Integer minCount, Integer maxCount) throws DAOException; 
     64        public Cohort getPatientsHavingEncounters(List<EncounterType> encounterTypeList, Location location, Form form, Date fromDate, Date toDate, Integer minCount, Integer maxCount) throws DAOException; 
    6365         
    64         public PatientSet getPatientsByProgramAndState(Program program, List<ProgramWorkflowState> stateList, Date fromDate, Date toDate) throws DAOException; 
     66        public Cohort getPatientsByProgramAndState(Program program, List<ProgramWorkflowState> stateList, Date fromDate, Date toDate) throws DAOException; 
    6567         
    66         public PatientSet getPatientsInProgram(Integer programId, Date fromDate, Date toDate) throws DAOException; 
     68        public Cohort getPatientsInProgram(Integer programId, Date fromDate, Date toDate) throws DAOException; 
    6769         
    68         public PatientSet getPatientsHavingTextObs(Integer conceptId, String value, TimeModifier timeModifier) throws DAOException; 
     70        public Cohort getPatientsHavingTextObs(Integer conceptId, String value, TimeModifier timeModifier) throws DAOException; 
    6971         
    70         public PatientSet getPatientsHavingLocation(Integer locationId, PatientLocationMethod method) throws DAOException; 
     72        public Cohort getPatientsHavingLocation(Integer locationId, PatientLocationMethod method) throws DAOException; 
    7173         
    7274        public Map<Integer, String> getShortPatientDescriptions(Collection<Integer> patientIds) throws DAOException; 
    7375         
    74         public Map<Integer, List<Obs>> getObservations(PatientSet patients, Concept concept, Date fromDate, Date toDate) throws DAOException; 
     76        public Map<Integer, List<Obs>> getObservations(Cohort patients, Concept concept, Date fromDate, Date toDate) throws DAOException; 
    7577         
    76         public Map<Integer, List<List<Object>>> getObservationsValues(PatientSet patients, Concept c, List<String> attributes); 
     78        public Map<Integer, List<List<Object>>> getObservationsValues(Cohort patients, Concept c, List<String> attributes); 
    7779         
    78         public Map<Integer, Encounter> getEncountersByType(PatientSet patients, List<EncounterType> encType); 
     80        public Map<Integer, Encounter> getEncountersByType(Cohort patients, List<EncounterType> encType); 
    7981                 
    80         public Map<Integer, Object> getEncounterAttrsByType(PatientSet patients, List<EncounterType> encTypes, String attr, Boolean earliestFirst); 
     82        public Map<Integer, Object> getEncounterAttrsByType(Cohort patients, List<EncounterType> encTypes, String attr, Boolean earliestFirst); 
    8183                 
    82         public Map<Integer, Encounter> getEncounters(PatientSet patients); 
     84        public Map<Integer, Encounter> getEncounters(Cohort patients); 
    8385         
    84         public Map<Integer, Encounter> getFirstEncountersByType(PatientSet patients, List<EncounterType> encType); 
     86        public Map<Integer, Encounter> getFirstEncountersByType(Cohort patients, List<EncounterType> encType); 
    8587         
    86         public Map<Integer, Object> getPatientAttributes(PatientSet patients, String className, String property, boolean returnAll); 
     88        public Map<Integer, Object> getPatientAttributes(Cohort patients, String className, String property, boolean returnAll); 
    8789         
    88         public Map<Integer, PatientIdentifier> getPatientIdentifierByType(PatientSet patients, List<PatientIdentifierType> types); 
     90        public Map<Integer, PatientIdentifier> getPatientIdentifierByType(Cohort patients, List<PatientIdentifierType> types); 
    8991         
    90         public Map<Integer, Map<String, Object>> getCharacteristics(PatientSet patients) throws DAOException; 
     92        public Map<Integer, Map<String, Object>> getCharacteristics(Cohort patients) throws DAOException; 
    9193 
    92         public PatientSet convertPatientIdentifier(List<String> identifiers) throws DAOException; 
     94        public Cohort convertPatientIdentifier(List<String> identifiers) throws DAOException; 
    9395         
    9496        public List<Patient> getPatients(Collection<Integer> patientIds) throws DAOException; 
     
    9698        public Map<Integer, Collection<Integer>> getActiveDrugIds(Collection<Integer> patientIds, Date fromDate, Date toDate) throws DAOException; 
    9799 
    98         public Map<Integer, PatientState> getCurrentStates(PatientSet ps, ProgramWorkflow wf) throws DAOException; 
     100        public Map<Integer, PatientState> getCurrentStates(Cohort ps, ProgramWorkflow wf) throws DAOException; 
    99101 
    100         public Map<Integer, PatientProgram> getPatientPrograms(PatientSet ps, Program program, boolean includeVoided, boolean includePast) throws DAOException; 
     102        public Map<Integer, PatientProgram> getPatientPrograms(Cohort ps, Program program, boolean includeVoided, boolean includePast) throws DAOException; 
    101103 
    102         public Map<Integer, List<DrugOrder>> getCurrentDrugOrders(PatientSet ps, List<Concept> drugConcepts) throws DAOException; 
     104        public Map<Integer, List<DrugOrder>> getCurrentDrugOrders(Cohort ps, List<Concept> drugConcepts) throws DAOException; 
    103105         
    104         public Map<Integer, List<DrugOrder>> getDrugOrders(PatientSet ps, List<Concept> drugConcepts) throws DAOException; 
     106        public Map<Integer, List<DrugOrder>> getDrugOrders(Cohort ps, List<Concept> drugConcepts) throws DAOException; 
    105107         
    106         public Map<Integer, List<Relationship>> getRelationships(PatientSet ps, RelationshipType relType) throws DAOException; 
     108        public Map<Integer, List<Relationship>> getRelationships(Cohort ps, RelationshipType relType) throws DAOException; 
    107109         
    108         public Map<Integer, List<Person>> getRelatives(PatientSet ps, RelationshipType relType, boolean forwards) throws DAOException; 
     110        public Map<Integer, List<Person>> getRelatives(Cohort ps, RelationshipType relType, boolean forwards) throws DAOException; 
    109111         
    110         public Map<Integer, Object> getPersonAttributes(PatientSet patients, String attributeName, String joinClass, String joinProperty, String outputColumn, boolean returnAll); 
     112        public Map<Integer, Object> getPersonAttributes(Cohort patients, String attributeName, String joinClass, String joinProperty, String outputColumn, boolean returnAll); 
    111113         
    112         public PatientSet getPatientsHavingPersonAttribute(PersonAttributeType attribute, String value); 
     114        public Cohort getPatientsHavingPersonAttribute(PersonAttributeType attribute, String value); 
    113115         
    114         public PatientSet getPatientsHavingDrugOrder(List<Drug> drugList, List<Concept> drugConceptList, Date startDateFrom, Date startDateTo, Date stopDateFrom, Date stopDateTo, Boolean discontinued, List<Concept> discontinuedReason); 
     116        public Cohort getPatientsHavingDrugOrder(List<Drug> drugList, List<Concept> drugConceptList, Date startDateFrom, Date startDateTo, Date stopDateFrom, Date stopDateTo, Boolean discontinued, List<Concept> discontinuedReason); 
    115117         
    116         public List<Encounter> getEncountersByForm(PatientSet patients, List<Form> forms); 
     118        public List<Encounter> getEncountersByForm(Cohort patients, List<Form> forms); 
    117119 
    118120}