As per your statement, the doctor said
"may have... long term..."
So he served you an unfounded generic useless opinion about nothing. He takes no responsibility for such opinion, considering how unspecific and vague the opinion is.
Maybe they will develop cancer. Maybe they will mutate into dinosaurs. Maybe they will fly out though the window. In the long term, of course.
The best you can do is go back to the so-called doctor and have him speak in specific terms:
- what exactly did he notice which leads him to that conclusion;
- what exactly does long-term mean; 1 month? 1 year? 20 years?
- what solutions does he recommend as a specialist; do not give him options of answers about anything. Just ask the shortest questions you can.
Will UV light help?
There are two discussions about vitamin D.
2.1. If it is supposed to be produced naturally, then the birds need as much natural light as possible. No light -> no vit. D -> no other good things in the body. The same discussion goes on for all living beings dependent on vit. D.
2.2 There should be no problem with absorption of vitamin D, if you provide it to them. It is not absorbed entirely by the body (being produced by artificial synthesis), but it is still better than nothing. I take such supplements myself.
I am no specialist, you might find pills or liquid drops at specialized shops / pharmacies. Calcium, on the other hand, is absorbed only in the presence of vit. D. So occasionally you might provide them with vit. D supplements, allowing them to get calcium from more natural sources. Sepia bones come first to my mind, as natural sources. My parakeets (when I had them) would really enjoy nibbling on these bones.
My longest-living parakeet lived about 8 years. No walks in the park, no tanning under the sun, no vitamin supplements. We provided, additionally to his seeds, plenty of vegetables and fruits. He went almost crazy after pretty much "any" green leaves (suitable for human consumption). Parsley and dandelion leaves were the most common. Carrot roots, potatoes were also in his diet. Boiled eggs (white and yellow parts). Lettuce leaves. Apples. And so on. Also, he had the habit of "having to" taste pretty much anything that we ate - especially soups.
His death was unlikely to have been caused by lack of any vitamin. He had plenty of natural light, either through closed windows (not much UV light), or (occasionally) through open windows protected with mashes against insects.