The FDNY was right to oust a lieutenant who violated federal medical-privacy law by publishing a sick post on his Facebook page, an apellate court decided today.

A judicial panel unanimously supported the department’s firing of EMS supervisor Michael Palleschi, 38, who put details of a woman’s 911 call about her swollen vagina online without redacting her personal information in June 2010.

The judges found that Palleschi uploaded an image from his computer screen of the call “to his Facebook account, along with the caption ‘[c]an’t make this up,” to which approximately 460 of [his] ‘friends’ had access.”

The screen shot listed the woman’s name, address and a description of her medical condition, information, which are subject to confidentiality, court documents said.

And the prankster couldn’t stay out of trouble even after he put on modified duty following the stunt. This time the joke was on a teenager in an EMS intern program in Brooklyn, where the sergeant was exiled. Sources said Palleschi wrote a stick-up note masquerading as a coffee order and told the youngster to bring it to Dunkin’ Donuts. Palleschi claimed he ripped up the threat before it was too late.