The proposed model represents distributions of patient data (vitals, state and treatment) as a dynamic Bayesian network. The state of the patient is observed only when an alarm is triggered. The arity of the state variable is estimated from data via E-M optimization. The state and another discrete observable, treatment (a vector of administered medications), influence the continuous output variables that represent the vital signs. The vitals are segmented adaptively using a Kalman filter to reflect a potentially nonstationary periodicity of signals. The segmented vitals are then represented with a continuous Semihidden Markov Model. The trained system is capable of predicting the patient's state on-the-fly from currently observed vitals. It can also learn on-the-fly whenever user feedback is available in the form of correct labels of the predicted states.