Date: 201905
Local time of day: 1201-1800
Location: ZZZZ.Airport, FO
Flight conditions: VMC
Aircraft: B777 Undifferentiated or Other Model
Operator: Air Carrier
Operating under: Part 121
Flight plan: IFR
Mission: Passenger
Flight phase: Parked
ATC / advisory: Ground ZZZZ
Reporter organization: Air Carrier
Reporter function: Captain; Pilot Flying
Reporter qualification: Flight Crew Air Transport Pilot (ATP); Flight Crew Multiengine; Flight Crew Instrument
Human factors: Time Pressure; Distraction; Communication Breakdown
Second reporter function: First Officer; Pilot Not Flying
Anomaly: Aircraft Equipment Problem Less Severe; Deviation / Discrepancy - Procedural Published Material / Policy; Deviation / Discrepancy - Procedural FAR; Flight Deck / Cabin / Aircraft Event Passenger Misconduct
Detector: Person Flight Crew
When detected: Aircraft In Service At Gate
Result: General Flight Cancelled / Delayed
Contributing factors: Aircraft; Human Factors
Primary problem: Human Factors

Narrative: ETOPS code did attempt to send; and write up not made because of several distractions involving local operations; Dispatch filing flight plan; relief pilot soft start not received by crew desk (timing out); immigration problems with [a] passenger wanting off airplane in ZZZZ and ZZZZ not letting us depart because passenger would not be allowed to stay.


Second narrative: Spoke a short time ago with the Event Review Committee (ERC) ALPA Representative; who advised me to make a short entry regarding certain events surrounding our medical divert.After the child and her family that were the reason for the [diversion] were off the airplane and their bags were pulled; we prepared to depart ZZZZ for ZZZ. We were ready to go when the purser called and informed us that there was a passenger insisting to be let off the airplane. He said his reason was that he would probably miss his connection to ZZZ1 and didn't want to spend the night in ZZZ. The Captain explained to him that in ZZZ there where many ways to accommodate him; but if he insisted on getting off in ZZZZ those logistics would be much more difficult. The passenger then said 'well; what are you going to do for me in ZZZ?' The Captain explained that we weren't in a position to bargain anything; and that we would transport him to ZZZ and then customer service would take over. The passenger then insisted on being let off the airplane.We called for air stairs; pulled his bags; and let him off. After this; he said he changed his mind. This additional disturbance on his account had already added over an hour to our ground time and we were getting close to timing out. The Captain denied his request to get back on. A while later when we called Ground Control for pushback we were advised that there was a legality issue with one of our passengers; and [we] could not be released. They told us Immigration Officials would come to the plane to speak with the Captain. About 20 minutes later; Ground called us and told us that the Officials decided they did not need to speak with the Captain. They gave us a pushback and start clearance and we departed for ZZZ.


Synopsis: B777 flight crew reported multiple issues after a diversion for an ill passenger.