I think you are making this too complicated because the language in that blog post that you linked to focuses on individuals with severe cognitive impairment. Your mother doesn't have to fall into that category for her long-term inpatient care to be tax deductible.
If you look at p. 11 of IRS Pub. 502, it says:
You can include in medical expenses amounts paid for
qualified long-term care services and premiums paid for
qualified long-term care insurance contracts.
Qualified Long-Term Care Services
Qualified long-term care services are necessary diagnostic,
preventive, therapeutic, curing, treating, mitigating, rehabilitative
services, and maintenance and personal care
services (defined later) that are:
1. Required by a chronically ill individual, and
2. Provided pursuant to a plan of care prescribed by a licensed
health care practitioner.
Chronically ill individual. An individual is chronically ill
if, within the previous 12 months, a licensed health care
practitioner has certified that the individual meets either of
the following descriptions.
1. He or she is unable to perform at least two activities of
daily living without substantial assistance from another
individual for at least 90 days, due to a loss of
functional capacity. Activities of daily living are eating,
toileting, transferring, bathing, dressing, and continence.
2. He or she requires substantial supervision to be protected
from threats to health and safety due to severe
Maintenance and personal care services. Maintenance
or personal care services is care which has as its
primary purpose the providing of a chronically ill individual
with needed assistance with his or her disabilities (including
protection from threats to health and safety due to severe
I don't see any problem with your mother meeting these criteria since she was admitted to a locked ward for safety supervision. You are not required to have the documentation in your hand. Can't imagine that this would even be questioned by the IRS. I would deduct it and not worry at all about doing so.
If you are worried about the meals and lodging, on page 12 it says:
You can include in medical expenses the cost of medical
care in a nursing home, home for the aged, or similar institution,
for yourself, your spouse, or your dependents. This
includes the cost of meals and lodging in the home if a
principal reason for being there is to get medical care.
Don't include the cost of meals and lodging if the reason
for being in the home is personal. You can, however,
include in medical expenses the part of the cost that is for
medical or nursing care.
That also seems very clearcut. She was diagnosed with dementia and admitted to that locked ward after a stay in a geri psych hospital because she had cognitive impairment that was so severe that it was deemed not to be safe for her to be in the general assisted living area because she required supervision behind locked doors to prevent wandering. It isn't required to have a specific definitive diagnosis or meet some specific cognitive impairment test or to receive well-coordinated medical management or similar. It's enough that a ("a" not "the") principal reason for the stay is for medical care. Again, I think you are overthinking this.
Here is an earlier thread on the same issue except that it was a short-term stay and safety supervision wasn't an issue: