With the development of medical information technology, most of the patient medical data in unidentifiable form is stored in the cloud server to ensure secure storage of medical data. However, there are other problems such as the secure search of medical data. Search Encryption (SE) technology supports data ciphertext searchable. After that, many scholars have applied SE technology to solve the secure storage and secure search of medical data. When doctors search medical data, malicious users can obtain patient diagnosis and treatment information through doctor attribute information. This paper proposes a secure search encryption method for medical data. The method uses Symmetric Encryption algorithm with simple and fast, Ciphertext-Policy Attribute-Based Encryption (CP-ABE) algorithm to encrypt medical data. The hospital local server constructs a binary index tree according to alphabetical order of disease symptom keywords, and calculates the edit distance to return the correct disease symptom keywords when doctors misspell them. To achieve secure search of medical data ciphertext, the hospital local server constructs a disease symptom keyword search token through user attributes. The scheme also supports outsourced decryption for returned medical data ciphertexts. Finally, this scheme proofs that data security is selectively chosen plaintext attack secure (CPA-secure). The experimental results show that the search time of users searching medical data is less and the computational efficiency of users obtaining medical data is higher.