In recent years, the extensive utilization of electronic medical records has led to the preservation of a large amount of historical patient information, culminating in the formation of Electronic Health Record (EHR) dataset. Through technologies such as deep learning and representation learning, EHR dataset has been employed for tasks in the medical field, such as disease prediction. However, the challenges of how to better learn the embeddings of medical codes and how to effectively model historical visit sequences remain significant issues in the field. Therefore, we introduce a novel disease prediction methodology grounded on hierarchical ontology representation and disease evolution. First, we incorporate medical ontology to obtain external prior knowledge and simultaneously utilize the co-occurrence relationships between diseases to construct a disease co-occurrence graph. By integrating information from both sources, we achieve the final embedding of the medical codes. Building on this foundation, we delve deeper into exploring the evolution and changes in diseases, specifying different sequence modeling methods, thereby acquiring the embeddings of the patients. The application of medical ontology is beneficial in mitigating data inadequacy, while the exploration of dynamic disease evolution enhances the effectiveness of predictive models. Experimental results on the MIMIC-III dataset indicate that the proposed method achieved superior performance in disease pre-diction tasks, thus validating the effectiveness of this approach.