Team doctor Rene Tour told Swedish broadcaster SVT that the nerve is causing pain in Alshammar's neck and right shoulder, affecting the rotation of her arm.
Tour says that "if we can get the swelling down she should be able to swim, but if the nerve pain remains it's impossible to complete the rotation of the shoulder."
The 34-year-old Alshammar is a two-time Olympic silver medallist and was considered one of the top contenders in the 50-meter and 100 freestyle sprints. She will miss the 4x100 freestyle relay because of the injury.
Tour says Alshammar now has to "take one day at a time. This could pass in a few days, or last a couple of months."