public void asociar() {
        for (String dni : adns.keySet()) {
            Pacient pacient = pacients.consulta(dni, dni).get(0);
            pacient.setAdn(controladorSequencies.get(adns.get(dni)), true);
            Map<Date, Sequencia> historial = new HashMap<Date, Sequencia>();
            for (Date data : historials.get(dni).keySet()) {
                Sequencia seq = controladorSequencies.get(historials.get(dni).get(data));
                if (seq != null) {
                    historial.put(data, seq);
                }
            }
            pacient.insertaHistorial(historial);
            for (String str : simptomes.get(dni)) {
                SortedSet<Simptoma> simp = controladorMalaltiesSimptomes.consultaSimptomes(str, str);
                if (!simp.isEmpty()) {
                    pacient.afegirSimptoma(simp.first());
                }
            }
            for (String str : malalties.get(dni)) {
                SortedSet<Malaltia> mal = controladorMalaltiesSimptomes.consultaMalalties(str, str);
                if (!mal.isEmpty()) {
                    pacient.afegirMalaltia(mal.first());
                }
            }
        }

        adns = null;
        historials = null;
        simptomes = null;
        malalties = null;
    }