First, don't take any action on this which involves other people while you are upset. The fact that you are upset will be used against you. Try to be calm and professional for the rest of the working day.
When you have time, make a record of exactly what happened - where, when, who was involved, what was said, what was done.
As soon as you have finished your working day, go home. Don't take any action on this issue today, apart from eliciting the sympathy and support of friends and family once you get home. Get a good night's sleep - your mother was right if she ever said to you "it will be better in the morning".
If you want to take this any further, you will need to find somebody in the organisation who has the formal role of supporting you - a residents' adviser, trade union rep, welfare officer, or some such, that you can talk to in the certainty of confidence. You will need to go through with them the employment rules which apply to the situation, to determine whether anyone (including you) have broken any of those rules or are vulnerable to disciplinary action. Then you need to consider with them whether it would be advantageous to you to make a formal complaint, and whether you want to do it. The chance of a formal complaint backfiring is not inconsiderable, though this depends on your organisation, the nature of the complaint and the people in the hierarchy who would deal with the complaint. A formal complaint is certainly not something to be undertaken lightly.
An informal complaint against your program co-ordinator is highly likely to get you nowhere.
If, as seems likely, you will need your program co-ordinator and staff to do things for you in the future (and presumably the sign-off on your residency will need to go through that office), you are in a very difficult position. You need to think what is the best long-term way of getting what you really want, which is for your future dealings with the program co-ordinator and their staff to be on a professional basis until the successful completion of your residency.