It's not only in HG/SS, but you can try it in P/D/Pt. but, it's better to heal them to the nurse, right? beside, it's wasting time to put a pokemon in your pc, shutting it down, turning it on, and take back your pokemon...it needs a lot of time! so, the answer is: Yes, you can!