To protect patient health data (PHD) and ensure the security of healthcare IoT devices, this paper presents an Advanced Signature-Based Encryption algorithm (ASE), a blockchain analytical model, a mathematical framework, and an Adaptive Fog Computing based Three-tier Architecture (AFCTTA). The aim is to enable safe access to real-time services and IoT for end users. This AFCTTA was constructed on a blockchain platform, providing trustworthy data transmission between patients, clinicians, fog nodes, and IoT. Additionally, a decentralized fog computing-based blockchain analytical model along with a mathematical framework were produced to ensure secure transfer of data and transactions within healthcare IoT. To ensure secure communication between devices and fog nodes, a private block chain was implemented in order to validate certificates and keys. As an added security measure, an ASE method was devised. This algorithm utilizes War Optimization Strategy (WOA) to select optimal keys for securing data from heterogeneous and homogeneous IoT healthcare equipment. Through its encryption process utilizing various cryptographic techniques, all traffic is encrypted before being decrypted once it reaches its intended destination. To validate its proposed approach, UCI machine library is collecting health care data. To execute this method, Python is utilized and compared to traditional algorithms such as Rivest-Shamir-Adleman (RSA), Elliptical Curve Cryptography (ECC), and Tiny Lightweight Symmetric Encryption-Aquila Optimization Algorithm (TLSE-AOA).