In order to display the specialty of a referrer on a printed invoice, first you need to go into the referring provider's entry in Databases > Referrers, and add a specialty in the field.
Then, you need to make sure the "Use Specialty on Invoices" box is ticked on the same screen:
Now, whenever you print an invoice for a claim with a referral on it, and the referral is by a provider that you've completed this process for, the invoice will indicate the specialty of the referring provider: