Navy corpsmen are well-loved. Grunts and sailors know that they can count on the corpsmen to be there to aid doctors in providing medical care. When you are on an aircraft carrier or an amphibious assault ship, it's like being on a floating city. You have plenty of resources, including some of the best trauma facilities in the world, with plenty of doctors and corpsmen.
But not all ships can have these extensive facilities, and they can't have doctors. If you are on an Arleigh Burke-class guided-missile destroyer or a littoral combat ship, or some other smaller vessel, there probably will be no doctor on board.
Instead, you'd be seeing an Independent Duty Corpsman, an experienced Corpsman who have undergone advanced training. These well-trained IDCs can do a lot and they have a long history of service to prove it.
In World War II, three appendectomies were performed while a submarine was on patrol and the lives of sailors were at risk.
According to the U.S. Navy website, IDCs study Anatomy and Physiology; Physical Diagnosis; Clinical Lab; Pharmacy; Chemical, Biological, and Nuclear Medicine; Preventive Medicine; Supply; Food Service Sanitation; Substance Abuse; Medical Department Responsibilities; Medical Diagnosis and Treatment; Pest Control; Naval and Shipboard Organization; Management of Medical/Surgical Emergency Dental Conditions; NAVOSH; ACLS; TCCC; Maintenance Material Management (3M); Dive Medicine. They also have to become Basic Life Support instructors (after all, the rest of the crew may have to pitch in to help the "doc") and register to get a "National Provider Identification" number.
IDCs learn to handle a number of emergencies, whether ashore or at sea. They even train to handle situations where sailors or Marines require prolonged care.
Check out U.S. Navy's video to watch the intense training these Independent Duty Corpsmen go through in order to become operational.