- Timestamp:
- 07/16/08 12:29:31 (6 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
openmrs/branches/1.3.x/src/api/org/openmrs/api/impl/EncounterServiceImpl.java
r4709 r4947 61 61 * @see org.openmrs.api.EncounterService#saveEncounter(org.openmrs.Encounter) 62 62 */ 63 public voidsaveEncounter(Encounter encounter) throws APIException {63 public Encounter saveEncounter(Encounter encounter) throws APIException { 64 64 Date now = new Date(); 65 65 User me = Context.getAuthenticatedUser(); … … 151 151 } 152 152 } 153 return encounter; 153 154 } 154 155 … … 211 212 * java.lang.String) 212 213 */ 213 public voidvoidEncounter(Encounter encounter, String reason) {214 public Encounter voidEncounter(Encounter encounter, String reason) { 214 215 if (reason == null) 215 216 reason = ""; … … 227 228 encounter.setVoidReason(reason); 228 229 saveEncounter(encounter); 230 return encounter; 229 231 } 230 232 … … 232 234 * @see org.openmrs.api.EncounterService#unvoidEncounter(org.openmrs.Encounter) 233 235 */ 234 public voidunvoidEncounter(Encounter encounter) throws APIException {236 public Encounter unvoidEncounter(Encounter encounter) throws APIException { 235 237 String voidReason = encounter.getVoidReason(); 236 238 if (voidReason == null) … … 248 250 encounter.setVoidReason(null); 249 251 saveEncounter(encounter); 252 return encounter; 250 253 } 251 254 … … 290 293 * @see org.openmrs.api.EncounterService#saveEncounterType(org.openmrs.EncounterType) 291 294 */ 292 public voidsaveEncounterType(EncounterType encounterType) {295 public EncounterType saveEncounterType(EncounterType encounterType) { 293 296 if (encounterType.getCreator() == null) { 294 297 encounterType.setCreator(Context.getAuthenticatedUser()); … … 297 300 298 301 dao.saveEncounterType(encounterType); 302 return encounterType; 299 303 } 300 304 … … 340 344 * @see org.openmrs.api.EncounterService#retireEncounterType(org.openmrs.EncounterType) 341 345 */ 342 public voidretireEncounterType(EncounterType encounterType, String reason)346 public EncounterType retireEncounterType(EncounterType encounterType, String reason) 343 347 throws APIException { 344 348 encounterType.setRetired(true); … … 346 350 encounterType.setDateRetired(new Date()); 347 351 encounterType.setRetireReason(reason); 348 dao.saveEncounterType(encounterType); 352 saveEncounterType(encounterType); 353 return encounterType; 349 354 } 350 355 … … 352 357 * @see org.openmrs.api.EncounterService#unretireEncounterType(org.openmrs.EncounterType) 353 358 */ 354 public voidunretireEncounterType(EncounterType encounterType)359 public EncounterType unretireEncounterType(EncounterType encounterType) 355 360 throws APIException { 356 361 encounterType.setRetired(false); … … 358 363 encounterType.setDateRetired(null); 359 364 encounterType.setRetireReason(null); 360 dao.saveEncounterType(encounterType); 365 saveEncounterType(encounterType); 366 return encounterType; 361 367 } 362 368