You can take tax deductions as self-employed health insurance if you purchase health insurance in your own name or the business name.
Please refer to the IRS guidance below:
https://www.irs.gov/businesses/small-businesses-self-employed/s-corporation-compensation-and-medical...
If your health insurance is under your spouse's name and is paid by her employer, you are not eligible to deduct your spouse's health insurance premiums as a S-Corp health insurance deduction.