One of the main applications of ubiquitous computing is in healthcare. Cloud-based health apps have supplanted popular health apps in recent years, allaying worries about computational cost and scalability. Data security and privacy become major concerns in a cloud-based, ubiquitous health care system. The primary contribution of this study is providing high privacy, data confidentiality, and availability against health data. This is accomplished by utilizing the suggested access control model, which grants access control to different system users based on a PR-based technique. For every user and piece of data, a Privacy Rating (PR) is calculated before access to any requested data is granted. The findings demonstrate that the suggested strategy offers a high degree of security and privacy for the data kept in the healthcare system.