When using the reply box in the messages pane check to see if the clinic can be resolved so messages are correctly threaded. Issue: #686