Pennsylvania law lets a doctor certify a person for psychiatric detention of no more than 120 hours. The certification issued while the person is held removes gun possession rights indefinitely unless a court later restores them.
In Hemani the Supreme Court observed that federal rules taking guns from felons and from those committed for mental health reasons include process before the rights disappear. A judge must approve the short hold after the physician asks for it.