It is a new online service paradigm that allows consumers to exchange their health data. Health information management software allows individuals to control and share their health data with other users and healthcare experts. Patient health records (PHR) may be intelligently examined to predict patient criticality in healthcare systems. Unauthorized access, privacy, security, key management, and increased keyword query search time all occur when personal health records (PHR) are moved to a third-party semitrusted server. This paper presents security measures for cloud-based personal health records (PHR). The cost of keeping health records on a hospital server grows. This is particularly true in healthcare. As a consequence, keeping PHRs in the cloud helps healthcare institutions save money on infrastructure. The proposed security solutions include an optimized rule-based fuzzy inference system (ORFIS) to determine the patient’s criticality. Patients are classified into three groups (sometimes known as protective rings) based on their severity: very critical, less critical, and normal. In trials using the UCI machine learning archive, the new ORFIS outperformed existing fuzzy inference approaches in detecting the criticality of PHR. Using a graph-based access policy and anonymous authentication with a NoSQL database in a private cloud environment improves data storage and retrieval efficiency, granularity of data access, and response time.