But, if the patient makes a credible threat to commit a crime then the psychiatrist is required by law to report that specific threat to law enforcement.
And that part is not different in Germany. However, it has to be very credible, otherwise the psychiatrist will be open to litigation.