There is no amount of education, life experience, or practice that could prepare me for my first pediatrics code. Less than halfway through my intern year, while wrapping up paperwork on the gastrointestinal transplant floor, I heard the emergent buzzer ring on a patient I was caring for. Guided by the senior residents, I quickly gowned and gloved to join my cointerns in line for chest compressions. The acute onslaught of adrenaline, terror, critical thinking, and courage that coursed through me was both unexpected and unparalleled to anything I had ever felt before—then I took part in my second code.

As I continued to experience these critical moments in my patients' lives, I realized that predictability has nothing to do with a code. Let me introduce you to 3 separate patients I encountered during my residency, with 3 different outcomes, whose codes challenged and shaped my own code of ethics.

Patient A is a male infant born at 24 weeks' gestation. He emerged into the world tiny, blue, and with a heart that wouldn't beat. Unable to take his first breath, the neonatal intensive care unit team was poised and ready to help with these vital tasks. We worked quickly establishing an airway, compressing his heart as if to beat it for him, and introducing lines to provide lifesaving medicine. This continued for upward of an hour, many times on the brink of letting nature take its course, until finally, the air moved into his lungs and his heart started beating on its own. The relief I felt was jaded only by the gnawing feeling that this would all be too much for his fragile brain to handle. Patient A never bled. His brain remained intact and developed well—making him one of the lucky ones, as many in his position do not fare so well.

We are told to “do good” without causing harm, but this is a fine line with a varying definition. Beneficence is exemplified by doing everything we can to literally breathe life into a patient. Conversely, had his brain taken a hit from our efforts, as it commonly can from this exact scenario, does beneficence then transform into maleficence? This is a burden left for the parents to bear, having to decide how or if they can love and take care of a child who will need a special kind of support. Without being able to predict at the outset which infants will thrive and which ones will pass, I wonder how I decide when to stop and when to persevere. How can I know when I'm doing more harm than good? The answer, of course, is I cannot. Patient A taught me that, although the circumstance may be dire, the resilience of a newborn baby is a force to reckon with. Also, it is not for me to decide how much a parent can love his or her child, no matter what the circumstances. Patient A influenced my ethical code as I learned I must carefully walk the razor-thin line between heal and harm without bias.

Patient B is a 3-year-old male with a past medical history of congenital heart defects, status postrepairs, and short gut syndrome who was admitted to the cardiac stepdown unit with gastroenteritis. During his stay his electrolytes went awry, and his heart began beating in an abnormal rhythm—until finally, it stopped beating altogether. The pediatric intensive care unit team was there within seconds, and ran a seamless code to try to revive this child. Despite their best efforts, the team quickly realized that conventional measures would not suffice. Luckily our location afforded us the luxury of technology that can do the work of the heart, something not available in most centers around the world. In a swift motion Patient B was whisked away to the cardiac intensive care unit where he was cannulated for extracorporeal membrane oxygenation (ECMO), and stabilized following an arrest that lasted 90 minutes.

Although it is fortunate that these lifesaving measures were able to be used, nothing comes without a cost, which challenges the principal of justice. The scarce availability of ECMO is a function of the expertise required to initiate and run the system, in conjunction with the sheer expense of acquiring, storing, and using the technology. My thoughts turned to the majority of centers that also treat sick children, but are without these advanced technologies. Should ECMO be more widely available so that all children have the same opportunity for survival no matter their location? Conversely, should the resources that go into these kinds of expensive endeavors be redistributed to cover amelioration of health services to a more generalizable pediatrics patient population? It is difficult to justify an argument in either direction. For Patient B, however, this treatment saved his life, and it is impossible to put a price on a life saved.

Lastly, there is Patient C. He was a 17-month-old male who presented with acute asthma exacerbation who acutely decompensated. His clinical condition continued to deteriorate to a critical state. His parents, at his bedside, were understandably devastated. It was then that they relinquished complete control, leaving the fate of their child in the hands of the medical team. Their desperation was so great, etched into their faces. They consented to any and all suggestions presented to them, in the hope their child would survive. Unfortunately, despite a valiant effort, Patient C did not survive the code.

Patient C's parents presented the challenge of capacity. Time after time they reiterated to me that they were agreeable to “whatever I think is best.” Physicians are taught to assess capacity when obtaining consent; however, time is a commodity not afforded in a code. Parents (at what can only be described as the most horrific moments of their lives) are called to make clear-minded decisions regarding their child. At the time, I couldn't decide if the circumstance robbed these parents of their autonomy, or if their understanding that their child is very ill is enough for parents to consent to whatever may need to be done. I considered how far rational thought needed to extend—perhaps it's easier to understand the gravity of your child's illness rather than the procedures needed to save his life. I realized the importance of the proposals I present to parents—and their ability or inability to make decisions—during emergent circumstances.

We are taught in medical school about the pillars that comprise the physician's ethical code: autonomy, beneficence, maleficence, and justice, which initially sound relatively straightforward. These 3 patients challenged my ethical practices. As residents we are constantly learning—learning from those who mentor us, learning from each other, and most importantly, learning from patients. I learned how difficult it can be to apply these ethical principles, especially in a code situation, where the stakes are high and our code of ethics is continuously challenged and may be forever altered.