I can't help with CRA, but for HMDA purposes use the following:
For purchase transactions if the applicant is buying the property to acquire a farm, and it includes a dwelling, it isn't reportable. If they are buying it to acquire a dwelling and it happens to include a farm, it is reportable.
For refinances, follow the same rule as any other loan. If a loan secured by a dwelling is satisfied by a new loan to the same borrower secured by a dwelling it is reportable.
Here, most purchases are not reportable and most refis are.