Background: Data-driven medical health information processing has become a new development trend in obstetrics. Electronic medical records (EMRs) are the basis of evidence-based medicine and important information source for intelligent diagnosis. To obtain diagnostic results, doctors combine clinical experience and medical knowledge in their diagnosis process. External medical knowledge provides strong support for diagnosis. Therefore, how to make full use of EMRs and medical knowledge in intelligent diagnosis is worth studying.Methods: As an EMR usually contains multiple types of diagnostic results, the intelligent diagnosis can be treated as a multi-label classification task. We propose a novel neural network model called Knowledge-aware Hierarchical Diagnosis Model (KHDM) in which Chinese obstetric EMRs and external medical knowledge can be synchronously and effectively used for intelligent diagnostics. In the KHDM, EMRs and external knowledge documents are integrated by the attention mechanism contained in the hierarchical deep learning framework. In this way, we enrich the language model with curated knowledge documents, combining the advantages of both to make a knowledge-aware diagnosis.Results: We evaluate our model on a real-world Chinese obstetric EMR dataset show that KHDM achieves an accuracy of 0.8929, which exceeds that of the most advanced classification benchmark methods.Conclusion: In this paper, an improved model combining medical knowledge and an attention mechanism is proposed, which is based on the problem of the diversity of diagnostic results in Chinese EMRs. KHDM can effectively integrate domain knowledge to greatly improve the accuracy of diagnosis, and we also verify the model's interpretability advantage.