Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register
Show
Ignore:
Timestamp:
05/24/08 14:37:02 (8 months ago)
Author:
bwolfe
Message:

Merging api-refactoring to trunk [3595]:[4355]

Files:

Legend:

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

    r4158 r4358  
    1616import java.util.Date; 
    1717import java.util.List; 
    18 import java.util.Set; 
    1918 
    20 import org.openmrs.Cohort; 
    2119import org.openmrs.Concept; 
    2220import org.openmrs.Encounter; 
     
    2523import org.openmrs.Obs; 
    2624import org.openmrs.Person; 
     25import org.openmrs.util.OpenmrsConstants.PERSON_TYPE; 
    2726 
    2827/** 
     
    3433 
    3534        /** 
    36          * @see org.openmrs.api.ObsService#createObs(org.openmrs.Obs) 
     35         * @see org.openmrs.api.ObsService#saveObs(org.openmrs.Obs) 
    3736         */ 
    38         public void createObs(Obs obs) throws DAOException; 
     37        public Obs saveObs(Obs obs) throws DAOException; 
    3938 
    4039        /** 
     
    4443 
    4544        /** 
    46          * @see org.openmrs.api.ObsService#updateObs(org.openmrs.Obs) 
    47          */ 
    48         public void updateObs(Obs obs) throws DAOException; 
    49  
    50         /** 
    51          * @see org.openmrs.api.ObsService#deleteObs(org.openmrs.Obs) 
     45         * @see org.openmrs.api.ObsService#purgeObs(Obs) 
    5246         */ 
    5347        public void deleteObs(Obs obs) throws DAOException; 
    5448         
    5549        /** 
    56          * @see org.openmrs.api.ObsService#getMimeTypes(
     50         * @see org.openmrs.api.ObsService#getAllMimeTypes(boolean
    5751         */ 
    58         public List<MimeType> getMimeTypes() throws DAOException; 
     52        public List<MimeType> getAllMimeTypes(boolean includeRetired) throws DAOException; 
    5953 
    6054        /** 
     
    6458 
    6559        /** 
    66          * @see org.openmrs.api.ObsService#getObservations(org.openmrs.Person
     60         * @see org.openmrs.api.ObsService#saveMimeType(MimeType
    6761         */ 
    68         public Set<Obs> getObservations(Person who, boolean includeVoided) throws DAOException; 
     62        public MimeType saveMimeType(MimeType mimeType) throws DAOException; 
    6963 
    7064        /** 
    71          * @see org.openmrs.api.ObsService#getObservations(org.openmrs.Concept,org.openmrs.Location,java.lang.String,java.lang.Integer
     65         * @see org.openmrs.api.ObsService#purgeMimeType(MimeType
    7266         */ 
    73         public List<Obs> getObservations(Concept c, Location loc, String sort, Integer patientType) 
    74                         throws DAOException; 
     67        public void deleteMimeType(MimeType mimeType) throws DAOException; 
    7568 
    7669        /** 
    77          * @see org.openmrs.api.ObsService#getObservations(org.openmrs.Person,org.openmrs.Concept) 
     70         * Assumes that <code>whom</code>, <code>encounters</code>,  
     71         * <code>locations</code>, <code>personTypes</code>,  
     72         * <code>questions</code>, and <code>answers</code> are non-null lists 
     73         *  
     74     * @see org.openmrs.api.ObsService#getObservations(java.util.List, java.util.List, java.util.List, java.util.List, java.util.List, java.util.List, java.util.List, java.lang.Integer, java.lang.Integer, java.util.Date, java.util.Date, boolean) 
    7875         */ 
    79         public Set<Obs> getObservations(Person who, Concept question, boolean includeVoided) 
    80                         throws DAOException; 
     76    public List<Obs> getObservations(List<Person> whom, List<Encounter> encounters, 
     77                                         List<Concept> questions, List<Concept> answers, 
     78                                         List<PERSON_TYPE> personTypes, List<Location> locations, List<String> sort, 
     79                                         Integer mostRecentN, Integer obsGroupId, Date fromDate, 
     80                                         Date toDate, boolean includeVoidedObs) throws DAOException; 
    8181 
    8282        /** 
    83         * e.g. get last 'n' number of observations for a patient for given concep
     83     * Auto generated method commen
    8484         *  
    85          * @param n 
    86          *            number of concepts to retrieve 
    87          * @param who 
    88          * @param question 
    89          * @return 
     85         * @see org.openmrs.api.ObsService#getObservations(String) 
    9086         */ 
    91         public List<Obs> getLastNObservations(Integer n, Person who, 
    92                         Concept question); 
     87    //public List<Obs> getObservations(String searchString) throws DAOException; 
    9388 
    94         /** 
    95          * @see org.openmrs.api.ObsService#getObservations(org.openmrs.Concept,java.lang.String,java.lang.Integer) 
    96          */ 
    97         public List<Obs> getObservations(Concept question, String sort, Integer personType) 
    98                         throws DAOException; 
    99          
    100         /** 
    101          * @see org.openmrs.api.ObsService#getObservationsAnsweredByConcept(org.openmrs.Concept,java.lang.Integer) 
    102          */ 
    103         public List<Obs> getObservationsAnsweredByConcept(Concept answer, Integer personType); 
    104          
    105         /** 
    106          *  @see org.openmrs.api.ObsService#getNumericAnswersForConcept(org.openmrs.Concept,java.lang.Boolean,java.lang.Integer) 
    107          */ 
    108         public List<Object[]> getNumericAnswersForConcept(Concept answer, Boolean sortByValue, Integer personType); 
    109          
    110         /** 
    111          * @see org.openmrs.api.ObsService#getObservations(org.openmrs.Encounter) 
    112          */ 
    113         public Set<Obs> getObservations(Encounter whichEncounter) 
    114                         throws DAOException; 
    115  
    116         /** 
    117          * @see org.openmrs.api.ObsService#getVoidedObservations() 
    118          */ 
    119         public List<Obs> getVoidedObservations() throws DAOException; 
    120  
    121         /** 
    122          * @see org.openmrs.api.ObsService#findObservations(java.lang.Integer,boolean,java.lang.Integer) 
    123          */ 
    124         public List<Obs> findObservations(Integer id, boolean includeVoided, Integer personType) 
    125                         throws DAOException; 
    126  
    127         /** 
    128          * @see org.openmrs.api.ObsService#findObsByGroupId(java.lang.Integer) 
    129          */ 
    130         public List<Obs> findObsByGroupId(Integer obsGroupId) throws DAOException; 
    131  
    132         /** 
    133          * @see org.openmrs.api.ObsService#getObservations(java.util.List<org.openmrs.Concept>, java.util.Date, java.util.Data, boolean) 
    134          */ 
    135         public List<Obs> getObservations(List<Concept> concepts, Date fromDate, Date toDate, boolean includeVoided) throws DAOException; 
    136  
    137         /** 
    138          * @see org.openmrs.api.ObsService#getObservations(Cohort patients, List<Concept> concepts, Date fromDate, Date toDate) 
    139          */ 
    140         public List<Obs> getObservations(Cohort patients, List<Concept> concepts, Date fromDate, Date toDate); 
    14189}