Delay constraint and sensor energy consumption requirements are two core issues for e-healthcare applications in wireless body area networks. In this paper, we investigate the data transmission scheduling problem to utilize the sleep and opportunistic transmission for energy efficiency, while guaran- teeing the worst-case delay for medical data transmission. To achieve sensor energy saving by exploiting propagation channel quality with a deterministic delay requirement poses challenges in developing a scheduling policy. We address this problem using a Lyapunov optimization formulation and propose a two-step scheduling algorithm. We prove that the algorithm can provide worst-case delay guarantee under certain conditions. Theoretical analysis and simulation results are presented to demonstrate the tradeoff between the transmission delay and energy consumption.