Confusion, dizziness, lightheadedness are tremendously vague symptoms, and the workup for dizziness alone is extensive.
Put yourself in the doctor's shoes. Here is an article from the American Academy of Family Physicians on how to work-up a patient who presents with dizziness.
https://www.aafp.org/afp/2017/0201/p154.html
It's not that simple, and there are lots, and lots of things that could be going on. How do you know for sure that your symptoms were caused by Vitamin D? I don't see any evidence that confusion, dizziness, lightheadedness are common presenting symptoms of vitamin D deficiency at all. According to the Cleveland Clinic, those aren't presenting symptoms of Vitamin D deficiency. Therefore, an AI wouldn't be any more likely to catch it than a real person.
https://my.clevelandclinic.org/health/articles/15050-vitamin...
There's nothing in your comment that makes me think your symptoms weren't caused by Carbon Monoxide poisoning from running a heater in your less-than-sunny place of residence. Or maybe it's eye-strain from sitting inside staring at a computer too long. Or neck issues from sitting at a computer for too long. Or maybe you really were dehydrated, and for some reason you drink more fluids in your home country. Maybe you're smoking too much weed. Or maybe you're depressed by being away from home. Or maybe you were doing a lot of cocaine and didn't mention it. Maybe you had a stroke. Or you have early-onset dementia, or sleep apnea, or a psychological problem, or an aneurysm, or any one of a million things.
Medicine is hard. There are a lot of variables. The human body and its environment isn't a perfectly-reducible system you can step-through in an IDE. The only point I'm trying to make is that doctors are trying to figure out exactly what is going on inside of an incredibly complex system that is heavily influenced by the external environment, and they can't always conjure up a precise answer immediately.