Test code for sending messages to patient