Blockchain technology combined with Federated Learning (FL) offers a promising solution for enhancing privacy, security, and efficiency in medical IoT applications across edge, fog, and cloud computing environments. This approach enables multiple medical IoT devices at the network edge to collaboratively train a global machine learning model without sharing raw data, addressing privacy concerns associated with centralized data storage. This paper presents a blockchain and FL-based Smart Decision Making framework for ECG data in microservice-based IoT medical applications. Leveraging edge/fog computing for real-time critical applications, the framework implements a FL model across edge, fog, and cloud layers. Evaluation criteria including energy consumption, latency, execution time, cost, and network usage show that edge-based deployment outperforms fog and cloud, with significant advantages in energy consumption (0.1% vs. Fog, 0.9% vs. Cloud), network usage (1.1% vs. Fog, 31% vs. Cloud), cost (3% vs. Fog, 20% vs. Cloud), execution time (16% vs. Fog, 28% vs. Cloud), and latency (1% vs. Fog, 79% vs. Cloud).