In deploying the Internet of Things (IoT) and Internet of Medical Things (IoMT)-based applications and infrastructures, the researchers faced many sensors and their output’s values, which have transferred between service requesters and servers. Some case studies addressed the different methods and technologies, including machine learning algorithms, deep learning accelerators, Processing-In-Memory (PIM), and neuromorphic computing (NC) approaches to support the data processing complexity and communication between IoMT nodes. With inspiring human brain structure, some researchers tackled the challenges of rising IoT- and IoMT-based applications and neural structures’ simulation. A defective device has destructive effects on the performance and cost of the applications, and their detection is challenging for a communication infrastructure with many devices. We inspired astrocyte cells to map the flow (AFM) of the Internet of Medical Things onto mesh network processing elements (PEs), and detect the defective devices based on a phagocytosis model. This study focuses on an astrocyte’s cholesterol distribution into neurons and presents an algorithm that utilizes its pattern to distribute IoMT’s dataflow and detect the defective devices. We researched Alzheimer’s symptoms to understand astrocyte and phagocytosis functions against the disease and employ the vaccination COVID-19 dataset to define a set of task graphs. The study improves total runtime and energy by approximately 60.85% and 52.38% after implementing AFM, compared with before astrocyte-flow mapping, which helps IoMT’s infrastructure developers to provide healthcare services to the requesters with minimal cost and high accuracy.