A nurse accused of shooting her ex-husband in the groin inside his chiropractic clinic while their two young daughters waited outside had written in her diary that she needed to create "portals of exit" for demonic spirits, a detective testified Friday.