Not infrared. UV for vitamin D production.
However, that is correct. Here is an interesting video on vitamin D and its effect on the immune system.
The #1 Deficiency behind All Autoimmune Diseases
Yes...INFRARED. Encouraging to those of us in southern latitudes.
https://m.youtube.com/watch?v=ZdiUnmpOgqE
Need more convincing? Skip to 30:00 (in).