Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. package org.openmrs.module.appointmentscheduling;
  2.  
  3. import org.openmrs.Encounter;
  4.  
  5. import java.util.LinkedHashSet;
  6. import java.util.Set;
  7.  
  8. public class MEncounter extends Encounter {
  9.  
  10. private Set<Appointment> appointments;
  11.  
  12. public MEncounter() {
  13. super();
  14. }
  15.  
  16. public Set<Appointment> getAppointments(){
  17. if(appointments == null){
  18. appointments = new LinkedHashSet<Appointment>();
  19. }
  20. return appointments;
  21. }
  22.  
  23. public void setAppointments(Set<Appointment> appointments) {
  24. this.appointments = appointments;
  25. }
  26.  
  27. public void addAppointment(Appointment appointment){
  28. if(appointment != null){
  29. appointment.setEncounter(this);
  30. getAppointments().add(appointment);
  31. }
  32. }
  33.  
  34. public void removeAppointment(Appointment appointment){
  35. if(appointments != null){
  36. appointments.remove(appointment);
  37. }
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement