This particular case involves an anesthesiologist medicating a patient through a terminal wean (extubation to comfort care), although in my experience this is usually done by a nurse.
An 8-year-old was taken off life support, his organs donated. Now, police are investigating
Basically, an 8 year old boy drown with a down time of up to 25 minutes, he did not meet brain death criteria but apparently had severe anoxic brain injury and did not have potential for a meaningful neurological recovery. Family decided on comfort care and for organ donation. Because he didn't meet brain death criteria, the patient has to be allowed to die naturally after care is withdrawn prior to organ harvesting. In my experience this usually involves extubating, usually with family present, just outside the OR where a transplant team is waiting. For the organs to be viable, the general rule is that the patient must expire within 30 minutes of the withdrawal of life support. The person medicating for comfort gave the boy 500mcg fentanyl for reported air hunger, the boy died 19 minutes after extubation.
Luckily for the anesthesiologist, the coroner's referral of the case to police appears to be based on poor knowledge, since the suit claims the fentanyl was inappropriate since the patient was "gasping for air", which is of course exactly why opiates should be given.
The story makes it sound as though the patient received a one time dose of 500mcg, although I would think that was more likely the total given, starting with smaller doses and assessing for effect.
I have been in the situation before and it is unnerving, you're well aware of what rides on the patient dying within the required time frame, and I've had patients that failed to die on time and it's hard not to get a sense that the team is disappointed. As a result you're wary of over-treating symptoms because you don't want to be accused of trying to hasten death to meet the timeline, but at the same time you don't want that wariness to result in under-medicating the patient.