Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register
Show
Ignore:
Timestamp:
07/16/08 12:29:31 (6 months ago)
Author:
bwolfe
Message:

Merging trunk to the 1.3.x branch (sideporting) to get bug fixes into an RC5 release [4745]:[4946]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs/branches/1.3.x/src/api/org/openmrs/api/impl/EncounterServiceImpl.java

    r4709 r4947  
    6161         * @see org.openmrs.api.EncounterService#saveEncounter(org.openmrs.Encounter) 
    6262         */ 
    63         public void saveEncounter(Encounter encounter) throws APIException { 
     63        public Encounter saveEncounter(Encounter encounter) throws APIException { 
    6464                Date now = new Date(); 
    6565                User me = Context.getAuthenticatedUser(); 
     
    151151                        } 
    152152                } 
     153                return encounter; 
    153154        } 
    154155 
     
    211212         *      java.lang.String) 
    212213         */ 
    213         public void voidEncounter(Encounter encounter, String reason) { 
     214        public Encounter voidEncounter(Encounter encounter, String reason) { 
    214215                if (reason == null) 
    215216                        reason = ""; 
     
    227228                encounter.setVoidReason(reason); 
    228229                saveEncounter(encounter); 
     230                return encounter; 
    229231        } 
    230232 
     
    232234         * @see org.openmrs.api.EncounterService#unvoidEncounter(org.openmrs.Encounter) 
    233235         */ 
    234         public void unvoidEncounter(Encounter encounter) throws APIException { 
     236        public Encounter unvoidEncounter(Encounter encounter) throws APIException { 
    235237                String voidReason = encounter.getVoidReason(); 
    236238                if (voidReason == null) 
     
    248250                encounter.setVoidReason(null); 
    249251                saveEncounter(encounter); 
     252                return encounter; 
    250253        } 
    251254 
     
    290293         * @see org.openmrs.api.EncounterService#saveEncounterType(org.openmrs.EncounterType) 
    291294         */ 
    292         public void saveEncounterType(EncounterType encounterType) { 
     295        public EncounterType saveEncounterType(EncounterType encounterType) { 
    293296                if (encounterType.getCreator() == null) { 
    294297                        encounterType.setCreator(Context.getAuthenticatedUser()); 
     
    297300                 
    298301                dao.saveEncounterType(encounterType); 
     302                return encounterType; 
    299303        } 
    300304 
     
    340344         * @see org.openmrs.api.EncounterService#retireEncounterType(org.openmrs.EncounterType) 
    341345         */ 
    342         public void retireEncounterType(EncounterType encounterType, String reason) 
     346        public EncounterType retireEncounterType(EncounterType encounterType, String reason) 
    343347                throws APIException { 
    344348                encounterType.setRetired(true); 
     
    346350                encounterType.setDateRetired(new Date()); 
    347351                encounterType.setRetireReason(reason); 
    348                 dao.saveEncounterType(encounterType); 
     352                saveEncounterType(encounterType); 
     353                return encounterType; 
    349354        } 
    350355 
     
    352357         * @see org.openmrs.api.EncounterService#unretireEncounterType(org.openmrs.EncounterType) 
    353358         */ 
    354         public void unretireEncounterType(EncounterType encounterType) 
     359        public EncounterType unretireEncounterType(EncounterType encounterType) 
    355360                throws APIException { 
    356361                encounterType.setRetired(false); 
     
    358363                encounterType.setDateRetired(null); 
    359364                encounterType.setRetireReason(null); 
    360                 dao.saveEncounterType(encounterType); 
     365                saveEncounterType(encounterType); 
     366                return encounterType; 
    361367        } 
    362368