Getting back on track:
As a resident, ordering labs/meds/anything for family or friends is a really, really bad idea. Most of the time, nothing bad will happen and you'll be fine -- so on that basis, it seems harmless. However, several very bad outcomes are possible -- both usually triggered by a bad event. The person has an allergic reaction to whatever was prescribed. The person gives their med to someone else, who has a bad reaction. The test you ordered is very abnormal, triggering some sort of review. or the test finds some serious problem, which now needs follow up -- and that physician decides to point out to your PD what you've done.
In any of these cases:
1. You may havd a training license, if so everything you do MUST be supervised or you are practicing without a license. You can lose your medical license for this, and that will result in you losing your residency position.
2. Your PD simply decides to fire you because you treated a patient without a doctor/patient relationship.
3. You get sued for malpractice, and doscover that your insurance doesn't cover you because you were acting outside your job. This is key -- your medmal insurance only covers you while you are at work. If you treat a family member on your day off (or "off the books") you are probably not covered.
You may say that getting sued for malpractice for ordering some omeprazole or amoxicillin is unlikely, and you'd be right. But there are plenty of stories -- Patient with two young children gets a script for Amox. Takes it and has an anaphylactic reaction. Either they become so disabled they can no longer work, or they die. Either way, family is underinsured and is financially screwed. They decide to sue you -- why not, because it's only the insurance company paying, right? There have been stories where the patient likes the doctor, but does so simply because they need the money to care for themselves / their family and feel they have no choice. Or, if the patient dies, the spouse may not care if they ruin your life.
If you're a fully licensed physician, it's still a really bad idea. Medical boards have disciplined physicians for this. If your "patient off the books" complains, you will lose. No amount of saying you were trying to help will suffice -- in that case they will tell you that you should have made an appointment for the patient, taken a history, examined them, treated them, documented it, and then not billed them. Although #2 goes away, you can still have BoM or MedMal problems.
I make this really clear to all incoming interns. No prescriptions, no labs, no orders for family or friends. No exceptions. My pager is on 24/7. If there is a need, call me or talk to anyone in the program -- we will fix the situation for you.