lances are examples of remote healthcare applications that require low latency response due to their criticality. For example, delay is a major performance measure for remote sur- gery since a delay of a mere second may case a patient's death. Aiding visuals and haptic feedback (for example, controlling a robotic arm and receiving feedback from sensors attached to the arm) expect an end-to-end delay of 10ms and 1 ms respect- lively [3]. Deviating from the expected delay may cause cyber-sickness to surgeons and increase the surgery error rate [4]. 5G integrated with cloud computing alone cannot meet the latency requirements because the cloud infrastructure is located away from the end-users. Mobile edge computing (MEC) is a network architecture that provides computing and storage at the edge of the network SO that computations are physically closer to the users. Adopting MEC architecture in 5G networks will enable 5G to support services with strict latency requirements. A Stanford medical white paper estimated that 2,314 exabytes of healthcare data would be produced in 2020 and predicted that the annual increase in healthcare data would be at least 48% [5]. Such large amounts of data can also raise many privacy issues, making data security a primary concern for any organization. Healthcare IoT security issues have been growing in recent years as it is becoming clear that IoT devices are unsafe. This is primarily because most IoT devices and applications are not designed to handle security and privacy attacks. The blockchain is a promising cryptographic technology that could protect against data tampering. It could be able to address some of the challenges presented by healthcare IoT security. Moreover, the integration between AI and the blockchain will be more effective than those offered if only the blockchain is used. 7.1.1 MOTIVATION AND CONTRIBUTION The increase of the aging population has pushed the need for Healthcare 4.0 systems that add automation to healthcare and allow doctors to perform their work remot