@Override
    public String toString() {
        String descripcioMalaltia = "";
        if (descripcio != null) {
            descripcioMalaltia = descripcio;
        }
        String dnis = "{";
        for (Pacient pacient : pacientsAssociats.consulta("00000000", "99999999")) {
            dnis += pacient.getDni() + ",";
        }
        if (dnis.charAt(dnis.length() - 1) != '{') {
            dnis = dnis.substring(0, dnis.length() - 1);
        }
        dnis += "}";
        String ids = "{";
        for (Sequencia sequencia : sequenciesAssociades) {
            ids += sequencia.getId() + ",";
        }
        if (ids.charAt(ids.length() - 1) != '{') {
            ids = ids.substring(0, ids.length() - 1);
        }
        ids += "}";
        String simptomes = "{";
        for (Simptoma simptoma : simptomesAssociats) {
            simptomes += simptoma.getNom() + ",";
        }
        if (simptomes.charAt(simptomes.length() - 1) != '{') {
            simptomes = simptomes.substring(0, simptomes.length() - 1);
        }
        simptomes += "}";
        return (nom + ":" + descripcioMalaltia + ":" + dnis + ":" + ids + ":" + simptomes);
    }