You may be required to carry out an HIV test as part of your visa medical.
Your test result would be shared with the government of the country you intend to travel to as part of the visa application process.
Your data remains secure and will continue to be safe and secure as per UKGDPR, EUGDPR and the relevant Data Protection laws of the country.