The growing gap between users and the Big Data analytics requires innovative tools that address the challenges faced by big data volume, variety, and velocity. Therefore, it becomes computationally inefficient to analyze such massive volume of data. Recent advances and development in the field of Internet of Things (IoT) providing a unique way of exploiting the role of healthcare systems. Also, the role of healthcare in the IoT is studied widely since it plays a major role in the advances of human life that deals with the health regulations. The continuous involvement of heterogeneous devices in the IoT poses many challenges, i.e., empowering the IoT devices used for the healthcare system, aggregation and processing of real-time data. Therefore, based on such constraint, in this paper, we propose a novel architecture for a healthcare system based on energy harvesting technique that extends the device lifetime. Moreover, the healthcare system is supported by an architecture that welcomes both real-time and offline data. To handle such data, the architecture provides a novel decision model that process big data being generated by IoT devices. The data is considered as heterogeneous processed by the proposed layered architecture for the healthcare system. Furthermore, the feasibility and efficiency of the proposed system are implemented on Hadoop single node setup on UBUNTU 14.04 LTS coreTMi5 machine with 3.2 GHz processor and 4 GB memory. Sample medical, sensory datasets are tested on the proposed system. Finally, the results show that the proposed system architecture efficiently process, analyze, and integrates different datasets efficiently and triggers an alarm to provide safety to the community. (C) 2019 Elsevier B.V. All rights reserved.