public boolean deletePatient(Patient patient) {
        if (nextPatient == null) {
            return false;
        } else if (nextPatient.name.equals(patient.name) && nextPatient.nextPatient != null) {
            nextPatient = nextPatient.nextPatient;
            nextPatient.previousPatient = this;
            return true;
        } else if (nextPatient.name.equals(patient.name) && nextPatient.nextPatient == null) {
            nextPatient = null;
            return true;
        } else {
            return nextPatient.deletePatient(patient);
        }
    }