A picture on a wall IS more effective. Every time you go past and glance at it, the info goes into your head and the more you see it, the more you remember. It requires no conscious effort to go and look in a folder in a drawer.
Secondary schools can have over 2000 pupils, most of whom you might not teach but could encounter at any point. That medical info is likely to be displayed in multiple places around school and if someone has an anaphylactic shock, it's easier to rush to one of those locations and look on a board than to hunt for a drawer and folder in a possibly unfamiliar location.
Privacy is an issue, but is has to be balanced with information sharing for safety. And information has to be shared as well for teaching purposes - teachers may cover each other's lessons, run clubs, do duties etc and unless the info is on a strictly needs to know basis, often knowing more is helpful. Someone receiving some tutoring would not be considered highly sensitive information in a school.
The teacher who spoke to DS in the playground could have Equally been a teacher who wasn't a friend. We don't really know the context of the conversation. If it had been someone who wasn't a friend of Op, I wonder if she'd have been so upset. If there was a lot of personal questioning in front of lots of friends and he was clearly uncomfortable, then that was probably not the best judged conversation. But was it really like that or could a scenario exist where a teacher spoke to a child about this in the playground that would be understandable and a good thing? It could be that actually other children were nearby and the exact nature of the conversation could be quite different - not questioning exactly, but perhaps a bit of a booster conversation and encouragement. It's possible.
The ground is muddied in the OP's scenario because the person who spoke to DS was OP's friend. Her automatic assumption was 'gossiping' between teachers. She feels uncomfortable with friend knowing because she is a friend, not because she is a fellow teacher who probably was told in an information sharing exercise of perfect legitimacy at school. And because Op would rather the friend didn't know, she is hyper sensitive to the conversation which happened and probably imagines it in a more extreme way than it happened. She forgets that children can find any interaction with adults embarrassing and imagine everyone else is listening and looking. She looks for a critical interpretation of events rather than simple explanations, which are perfectly feasible. Lots of posters on this thread make all kinds of assumptions about information sharing, or the playground incident, which are critical but which we can't know about, rather than looking for reasonable and feasible less critical interpretations.
Working in a school with children you know outside of school can be a tricky balancing act. It should be possible to still be human and to acknowledge that you know them without making it a big deal. In an informal situation like the playground, you might exchange a few words 'I hear you're off to Spain on holiday' 'I saw some great work you did about X' but you do have to remain the teacher and not get too close. You have to be careful what you say to children and to parents who are also friends. People who have friends who teach in the school so heir kid so trend also have to be careful. They mustn't push for information it would be inappropriate to have, but they also have to expect the friend will know things about their child and their progress or behaviour or other stuff, whichbtheboarent might not have or which the parent might have shared with the school and was then passed on. And they have to expect the friend might interact with the child inside school, as a teacher.