public void admitPatient() {

        String reason = admitPatient_admissionReason.getText();
        String description = admitPatient_comments.getText();

        for(Person person: hospital.allUsers.values()){
            Patient patient = (Patient)person;
            if(patient.getFirstName().equals(admitPatient_patientComboBox.getSelectedItem()))
                for(Person person1: hospital.allStaff.values())
                    if(person1.getType() == 2){
                        Doctor doctor = (Doctor)person1;
                        if(admitPatient_doctorComboBox.getSelectedItem().equals("Dr. " + doctor.getLastName())){
                            for(Room room: hospital.getAllRooms()){
                                if(admitPatient_roomNumberComboBox.getSelectedItem().equals(room.getRoomNum())){
                                    for(Department department: hospital.getAllDepartments()){
                                        if(department.getDepartmentName().equals(admitPatient_locationComboBox.getSelectedItem())){
                                            d.getAppointment().add(new Appointment(doctor, patient, department, reason, description, room));
                                            /*
                                            System.out.println("" + appointment.getDoctor().getFirstName());
                                            System.out.println(appointment.getPatient().getFirstName());
                                            System.out.println(appointment.getDepartment().getDepartmentName());
                                            System.out.println(appointment.getBasicReason());
                                            System.out.println(appointment.getFullReason());
                                            System.out.println(appointment.getRoom().getRoomNum());
                                            */
                                            break;
                                        }
                                    }
                                }
                            }
                        }
                    }
        }
    }