Design and implementation of patient management System