public void destroy(Integer id) throws IllegalOrphanException, NonexistentEntityException, RollbackFailureException, Exception {
		EntityManager em = null;
		try {
			utx.begin();
			em = getEntityManager();
			Patients patients;
			try {
				patients = em.getReference(Patients.class, id);
				patients.getId();
			} catch (EntityNotFoundException enfe) {
				throw new NonexistentEntityException("The patients with id " + id + " no longer exists.", enfe);
			}
			List<String> illegalOrphanMessages = null;
			Collection<Consults> consultsCollectionOrphanCheck = patients.getConsultsCollection();
			for (Consults consultsCollectionOrphanCheckConsults : consultsCollectionOrphanCheck) {
				if (illegalOrphanMessages == null) {
					illegalOrphanMessages = new ArrayList<String>();
				}
				illegalOrphanMessages.add("This Patients (" + patients + ") cannot be destroyed since the Consults " + consultsCollectionOrphanCheckConsults + " in its consultsCollection field has a non-nullable idPatient field.");
			}
			if (illegalOrphanMessages != null) {
				throw new IllegalOrphanException(illegalOrphanMessages);
			}
			em.remove(patients);
			utx.commit();
		} catch (Exception ex) {
			try {
				utx.rollback();
			} catch (Exception re) {
				throw new RollbackFailureException("An error occurred attempting to roll back the transaction.", re);
			}
			throw ex;
		} finally {
			if (em != null) {
				em.close();
			}
		}
	}