The U.S. aircraft carriers, for example, the carrier's medical facilities in addition to the slightly smaller size of the level of domestic hospitals equivalent to the third class.
And if the medical conditions on the carrier can't treat them, they can be sent to the nearest hospital ship or military base via SH-60 helicopters or C-2 fixed-wing transports.