Healthcare and residency in different states?
I've fought many residency cases over my 40 year career as a CA CPA. CA is a particularly fertile ground for these cases, being a high income tax state next door to a no income tax state. None of these cases are decided on a single factor. All the cases that I have argued are for people who still have some connections to CA, but arguably more connections to some other state. All of them have been settled at an administrative level in favor of the taxpayer, without the need to go to court. This is possible because this is a well settled area of the law that has been argued countless times in the past, and I wouldn't even bother arguing a case if the evidence didn't support my taxpayer. Nor would CA bother arguing a case, once the evidence comes out, unless the evidence supports CA. None of my cases involved more than $50,000 in tax at most, so it was in everyone's mutual interest to settle at the lowest level possible. There are other cases involving much more money that do get argued in court by high-priced tax attorneys, where there are many factors in support of each side's position, or in some cases where there is a desire to change established law, and those become the basis for our future arguments at administrative levels.
The basic tax law, which is the same in every state that has state income taxes, is that you always pay tax to the state where you earn income, whether you are a resident there or not. In most cases, you also pay tax on the same earned income to the state where you are a resident, with varying provisions for offsetting the income that is taxed twice. You pay tax only to the state in which you are a resident on unearned income, such as investment income and retirement income, regardless of the source of that income.