Section 21. No person shall be eligible to appointment, or be appointed, as the state judge advocate or the state surgeon unless duly registered in accordance with the laws of the commonwealth, and complies with its laws relative to the practice of the profession. No person shall be eligible for appointment, or be appointed, as any other legal, medical, dental or veterinary commissioned officer unless duly qualified in accordance with such person’s military service component requirements.