How do you make message app to talk with certain person only?

Is this a real situation or homework. What you do depends on how secure this chat must be. You won't need separate 'pages' if you use separate chat rooms'. Be aware, the Doctors and each patient MUST have a copy of the app if you use a CloudDB solution.

One solution to chatting with one Doctor might be to use separate chat room for each patient and/or doctor. For security, the Doctor or patient can clear the chat when it is over.