Summarize the following:
While your friend might usually love a spur of the moment visit, recovering from surgery is a different matter entirely. Not only do hospitals often have specific visiting hours, your friend might need to prepare physically and emotionally for visitors.  Know the hospitals visiting hours and policies. Depending on where in the hospital your friend is staying, there is different protocol for visitation. If your friend is still in the recovery room, for example, only one visitor at a time is permitted, with the nurse's permission and supervision, and there are stricter rules for personal hygiene. Call the hospital ahead of time to ask about visiting hours and any restrictions. Try to reach a family member or spouse to see when would be a good time to visit. This way, you'll have a better idea of how your friend is feeling, what tests have been run, and whether they're up for visitors. Once you know, plan your visit accordingly. Call or text once more before heading out to make sure your presence is still welcome. Plan to stay about 20 or 30 minutes, but use your judgment. If your friend seems tired or disengaged, you should slip out sooner. If they seem happy to see you, and are excited to talk to you, then feel free to stay longer. A lot of things can be bothersome to patients just out of surgery, so make sure you do not do anything to cause your friend discomfort during your visit.  Do not wear perfume, aftershave or strong smelling lotions as people are often sensitive to smells when they're sick or recovering from surgery. In addition, many healthcare facilities are now fragrance-free.   When you enter and leave a friend's room, wash your hands with soap, water, alcohol rubs, or hand sanitizer. Check with the nurses' station before entering the room, as you could be required to use a gown, gloves and/or a mask. People are more susceptible to germs after an operation. If you have any type of illness, such as a a cold or flu, ask the hospital staff beforehand if it's safe for you to visit your friend, as it usually isn't. If you are a smoker, only smoke in designated areas and do not get cigarette fumes anywhere near your friend. Due to the risk of bacteria and germs spreading, you could be banned from the hospital if you bring a non service dog into the hospital. Do not swear as this is usually against hospital rules and can get you thrown out and/or banned if caught. Avoid the patient's bed, as this can spread germs. Do not sit or put your feet on the bed. Do not touch the patient's wounds or any medical equipment they are attached to. Do not use the patient's toilet or bathroom, this can also spread germs and bacteria, and nurses may also report you and have you removed from the hospital. Do not share any property, such as toiletries or tissues, with a patient. People love to receive gifts, especially if they're not feeling well. It's not about the money spent, but just knowing that a person cares. Consider bringing a small gift to your friend for them to enjoy post-surgery.  Many people think to bring flowers, but flowers are not ideal for a hospital stay. They take up a great deal of room, and shelf-space in a hospital room is limited. They also decay quickly, and are hard to transport home. Boredom is a huge issue with hospital patients, so consider an interactive gift. Try novels, magazines, crossword puzzle, sudoku books, or a journal. If your friend has some kind of electronic media, like an iPad or tablet, try iTunes or Amazon gift certificates, so they can select and purchase entertaining media for themselves. If food is allowed, bring the patient their favorite snack, as hospital food can get tiresome. However, keep in mind that even if you mean well, they might not want to eat, as surgery and medications can affect their appetite. Many patients are placed on special diets following surgery, and some patients may not be allowed to eat until normal bowel function returns, such as after a bowel resection surgery. A hospital can be a drab, impersonal space. If your friend is there for a prolonged recovery period, try to make their hospital room feel less alien by creating a homey environment for your friend.  Decorate the room. Hospital rooms are beige or white and this can grow depressing with time. Bring cheerful posters, a small decorative hanging, or colorful blankets and throw pillows. Just check with hospital staff first to make sure you're not violating any hospital policies.  Bring them something familiar. During a traumatic event like a surgery, familiarity can be a comfort. Make a small scrapbook of friends, family members, beloved pets, and other loved ones. Borrow your friend's iPod and create custom playlist of their favorite feel better songs or burn them a mix CD. Buy DVD's of their favorite movies and TV shows, as many hospital rooms have a television set patients can use. Act natural when visiting. Your friend is probably eager to get back to a sense of normal, so share news of mutual friends and discuss what's been happening in the news or on TV. Let your friend feel like they're part of the world even if they are stuck in a hospital room. If possible, and after you make sure your friend is up to it, get a group of friends together to visit your friend.  Group visits can feel like a more natural hang out session than one-on-one communication, as people often congregate in groups. Your friend will also be happy to see how many people care and have taken the time to visit. Check hospital policy to make sure there isn't a cap on the number of people permitted in a room at a time. Making some future plans and promises can give your friend something to look forward to after their hospital stay, and reassurance their needs won't be forgotten once they're released.  Set a date to go see a movie, go out to dinner, get coffee, go shopping, etc., sometime after they will be released from the hospital. Your friend will appreciate having something small to look forward to after their stay is over. Offer any assistance in the transition back home, such as driving your friend back from the hospital and running errands for them during recovery.

Summary:
Plan your visit ahead of time. Know post-surgery etiquette and hygiene. Bring a gift. Make the hospital feel like home. Organize group visits. Plan for the future.