public boolean afegirPacient(String dni, String nom, String cognom, String dataNaixament,
            char sexe, String adn, List<String> malalties, List<String> simptomes) throws StackOverflowError {
        if (conte(dni)) {
            return false;
        }
        Sequencia seq;
        Set<Sequencia> seqs = controladorSequencies.consultaSeq(adn);
        if (seqs.isEmpty()) {
            boolean inserta = controladorSequencies.inserta(adn, null, null);
            if (!inserta) {
                return false;
            }
            seqs = controladorSequencies.consultaSeq(adn);
            if(seqs.isEmpty())return false;
            seq = seqs.iterator().next();
        } else {
            seq = seqs.iterator().next();
        }

        Pacient p = new Pacient(dni, dataNaixament, sexe, seq, false);
        p.setNom(nom);
        p.setCognom(cognom);
        for (String s : malalties) {
            SortedSet<Malaltia> setm = controladorMalaltiesSimptomes.consultaMalalties(s, s);
            if (!setm.isEmpty()) {
                p.afegirMalaltia(setm.first());
            }
        }
        for (String s : simptomes) {
            SortedSet<Simptoma> sets = controladorMalaltiesSimptomes.consultaSimptomes(s, s);
            if (!sets.isEmpty()) {
                p.afegirSimptoma(sets.first());
            }
        }
        return pacients.inserta(p);
    }