Hospitals are experimenting with virtual reality to see if it can reduce pain, enhance the effect of medication, and lower the chances a patient is admitted.