Nursing home resident dies after being given wrong medication