As a security officer, I want staff accesses to cases logged even if those accesses occur while impersonating the doctor or patient.

I would probably would type check this with an additional when, and then raise in the else.