“I knew I was having a heart attack,” Mr. Bulger said in his account, “so I knocked back on the window.” He said he asked for an electrocardiogram and oxygen and, when the medical worker saw the results, she said he needed to go to the hospital.

“I told her I came in for a long-sleeve shirt and she’ll have a day of reckoning and I’ll expose her for giving me a heart attack,” Mr. Bulger said in his account. “She gave me a heart attack due to yelling at me. It was all blown out of proportion. I didn’t threaten her.”

Mr. Bulger was sentenced to 30 days in segregated housing, sometimes called solitary confinement, but he languished there until October while the staff tried to get him transferred to another prison.

“Due to his criminal history, he is clearly able to carry out these threats,” a transfer request said.

At least one transfer request was denied in April. But, in October, the office approved a move for Mr. Bulger, according to documents obtained by The Times.

On Oct. 3, a staff member in the Office of Medical Designations and Transportation, which would generally deal with inmates with health problems or disabilities, wrote in an email to colleagues, “I would like to transfer him to HAZ,” using the abbreviation for Hazelton. She said he had also been cleared to go to three other penitentiaries, Terre Haute in Indiana, Thomson in Illinois and Victorville in California. Terre Haute, like Coleman, is known to be a safe haven of sorts for inmates who might need extra protection, like informants and former gang members.

Two managers, one in Grand Prairie and one in Washington, signed off.

But they failed to consult the Texas office’s internal intelligence group, which would normally have reviewed the move of a high-profile inmate like Mr. Bulger, the official said.