Medicare will pay for up to 100 days (20 full-pay days and an additional 80 co-pay days), for nursing home care provided in a skilled nursing facility ("SNF") when the admission to the SNF follows a minimum stay of at least 3 days in a hospital including the day of discharge (essentially 3 nights in the hospital) and the admission to the SNF is related to the reason that the person was hospitalized provided the person requires skilled nursing care or physical or occupational therapy that needs to be administered on an inpatient basis. Medicare pays the full cost (100%) for the first 20 days of care in the SNF and after this initial 20 day period, the amount in excess of a daily deductible for days 21-100. If you are discharged long enough to enter a new spell of illness period, the 100 days of coverage starts over again.
Each separate "spell of illness" qualifies and you can have several distinct "spells of illness" each year. Leaving the SNF and being re-admitted should not be a problem as long as the period of discharge is relatively short and the re-admission is related to the original reason for admission and the person still requires skilled care or qualified therapy services. It is easier to qualify if the individual is going back and forth between the SNF and a hospital, then if the individual goes home for a period of time. However, a few days at home, is not absolutely disqualifying but does make it harder to prove to Medicare that they should pay for the SNF. If coverage is denied, on appeal the individual would need to show the elements of admission or readmission being related to the original hospitalization and meet the level of care requirement.
If the time at home is very long you will run afoul of the spell of illness rules and loose coverage until you have another qualifying hospital stay. Medicare only pays for the period of time that the individual actually needs the care in the SNF. Consequently, if an individual's need for rehabilitation in a SNF ceases after a "short period" of time (e.g. 10 days) in the SNF for any reason including voluntarily refusing to participate in a physical therapy program either because the physical therapy is painful, the likelihood of improvement is minimal or the physical therapy is ineffective and of minimal value, Medicare will only cover the SNF for this "short period" (e.g. 10 days) of time plus the period it takes to give notice of termination of Medicare coverage even though Medicare could have covered 20 days if the medical need for SNF had continued for 20 days.