This work describes a method of preventing pneumonia in the hospital room by automatically quantifying how much and how often the patient is active out-of-bed using Microsoft Kinect V2. Hospital Acquired Pneumonia (HAP) is closely associated with patient activities during patient's hospital stay. From a perspective of the healthcare staff, it is very essential to know the quantity of the patient's active time, especially when the patient is alone. The proposed system could recognize the out-of-bed activities using the features extracted from Kinect skeleton model. The observation on the detection results could provide information to healthcare staff to better understand the potential HAP formation and adjust the treatment plan in time.