Development of a HMM based posture recognition system to derive patient activity from a force sensor functionalized nursing bed