The tax imposed under the provisions of § 12-296 shall not apply: (1) To cigarettes sold to any state institution other than a correctional institution for distribution to patients or inmates, or to cigarettes purchased with revolving funds under the jurisdiction of any state institution other than a correctional institution, when the cigarettes purchased are to be consumed by patients or inmates confined at such institution; or (2) to the extent prohibited by federal law, to cigarettes sold to United States veterans’ hospitals or to members of the armed forces of the United States through officially recognized agencies, established pursuant to regulations issued by the appropriate branch of the United States Armed Forces, that are physically located at military bases.