Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register
Show
Ignore:
Timestamp:
04/07/08 14:31:55 (8 months ago)
Author:
bwolfe
Message:

Merging obs_group branch to trunk [3438]:[3843]

Files:

Legend:

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

    r3685 r3847  
    1616import java.util.Date; 
    1717import java.util.List; 
    18 import java.util.Map; 
    1918import java.util.Set; 
    2019 
     
    3029import org.openmrs.logic.Constraint; 
    3130import org.openmrs.reporting.PatientSet; 
     31import org.openmrs.util.OpenmrsConstants; 
    3232import org.springframework.transaction.annotation.Transactional; 
    3333 
     34/** 
     35 * The ObsService provides methods for acting on Obs, ObsGroup, and  
     36 * ComplexObs objects. 
     37 *  
     38 * Use: 
     39 * <code> 
     40 *      Context.getObsService().getObs(123); 
     41 * </code> 
     42 *  
     43 * There are also a number of convenience methods for extracting obs 
     44 * pertaining to certain Concepts, people, or encounters 
     45 *  
     46 */ 
    3447@Transactional 
    3548public interface ObsService { 
     
    4760         * @throws APIException 
    4861         */ 
     62        @Authorized({OpenmrsConstants.PRIV_ADD_OBS}) 
    4963        public void createObs(Obs obs) throws APIException; 
    50  
     64         
    5165        /** 
    5266         * Create a grouping of observations (observations linked by 
    53          * obs.obs_group_id) 
    54          *  
    55          * @param obs - 
    56          *            array of observations to be grouped 
    57          * @throws APIException 
    58          */ 
     67         * {@link org.openmrs.Obs#getObsGroupId()} 
     68         *  
     69         * The proper use is: 
     70         * <pre> 
     71         * Obs obsGroup = new Obs(); 
     72         * for (Obs member : obs) { 
     73         *   obsGroup.addGroupMember(obs); 
     74         * } 
     75         * pass obsGroup to {@link #createObs(Obs)} 
     76         * </pre> 
     77         *  
     78         * @param obs array of observations to be grouped 
     79         * @throws APIException 
     80         * @deprecated This method should no longer need to be called on the api. This 
     81         *                        was meant as temporary until we created a true ObsGroup pojo. 
     82         *                        Replaced by {@link #createObsGroup(Obs, List)} 
     83         *  
     84         * @see #createObsGroup(Obs, List) 
     85         */ 
     86        @Authorized({OpenmrsConstants.PRIV_ADD_OBS}) 
    5987        public void createObsGroup(Obs[] obs) throws APIException; 
    6088 
     
    6896         */ 
    6997        @Transactional(readOnly = true) 
     98        @Authorized({OpenmrsConstants.PRIV_VIEW_OBS}) 
    7099        public Obs getObs(Integer obsId) throws APIException; 
    71100 
     
    76105         * @throws APIException 
    77106         */ 
     107        @Authorized({OpenmrsConstants.PRIV_EDIT_OBS}) 
    78108        public void updateObs(Obs obs) throws APIException; 
    79109 
     
    87117         * @throws APIException 
    88118         */ 
     119        @Authorized({OpenmrsConstants.PRIV_EDIT_OBS}) 
    89120        public void voidObs(Obs obs, String reason) throws APIException; 
    90121 
     
    95126         * @throws APIException 
    96127         */ 
     128        @Authorized({OpenmrsConstants.PRIV_EDIT_OBS}) 
    97129        public void unvoidObs(Obs obs) throws APIException; 
    98130 
     
    104136         * @see voidObs(Obs) 
    105137         */ 
     138        @Authorized({OpenmrsConstants.PRIV_DELETE_OBS}) 
    106139        public void deleteObs(Obs obs) throws APIException; 
    107  
     140         
    108141        /** 
    109142         * Get all mime types