What does an orphaned tx look like via rpc?
There are two cases here:

Block with the tx became orphaned and the transaction is still valid. In this case it is returned to the mempool. gettransaction will return unconfirmed transaction detail
Another conflicting transaction got confirmed ( having same inputs). In this case existing txid becomes invalid and it is discarded