This paper presents optimal beacon scheduling mechanisms using the cluster identifier (CID) for medical and healthcare applications. We consider the emerging low-rate wireless personal area networks (WPAN) technology as specified in the IEEE 802.15.4 standard that can support medical and healthcare applications. In addition, we have adopted the concept of cluster-tree human body networks (HBNs) for use in healthcare applications. A cluster-tree network conforming to the IEEE 802.15.4 standard is formed by several coordinators that periodically send beacon frames to the nodes of their cluster. If these periodic beacon frames are sent without any particular scheduling, they will collide with each other and the nodes that wait for the periodic beacon frames will loose synchronization with their coordinators. The purpose of this paper is to overcome this problem by proposing optimal beacon scheduling mechanisms using the CID for cluster-tree HBNs. These mechanisms are designed such that the PAN coordinator controls the beacon transmission time of all of the cluster heads (CHs) using the CID field located in the beacon frame of the PAN coordinator, in order to avoid beacon frame collisions. In particular, only those sensor nodes located in the cluster that needs the medical attention of the hospital staff according to the patients’ condition transmit their sensing data to the PAN coordinator via the CH, while those sensor nodes located in other clusters return to sleep mode. Accordingly, the lifetime of the sensor nodes is prolonged by using the cluster-tree HBNs model. We evaluated the performance of our scheme through a mathematical analysis and a series of simulations using the Network Simulator 2 (NS-2).