I won't disagree that medical billing is still a nightmare, but it's not the fault of CPT codes. No insurance company will sign a blank check and ask the doctor to fill in the amount; they all have a maximum they'll reimburse for, say, a broken leg, and they'll reimburse "broken leg" differently for a simple fracture than an unexpected amputation that took a crack team of surgeons 32 hours to reattach.
The codes are just a standard way to quantify exactly what was done. The "standard" part is important since most docs wouldn't be able to deal with more than a single insurance company if they all spoke a different code set. Absent a code set, it's much harder to determine how much your treatment should have when all you have are subjective descriptions from multiple doctors about what each thought they did. Codes remove that ambiguity, which insurance companies otherwise use to delay paying you and the hospital for as long as possible.
Generating the codes in the first place is complicated in the clipboard world, where a medical coder has to pore over sometimes hundreds of pages of scribbles to find out whether your vitals ever spiked into a danger zone that would have required more frequent nursing attention (at a higher cost), whether you were ever given certain kinds of medication, and, more subjectively, trying to divine what you actually had from the doctor's free-form notes, and what codes best describe that particular malady. Since this requires examining linear yards of flowsheet annotations (where an individual, critical cell might be missed) and subjective interpretation (does this description of a fracture qualify for Break-1 or Break-2?), different medical coders can end up coding the same chart differently.
Computers, in theory, can solve this. The computer knows exactly which medications you were given, how often, and at what cost. It knows exactly how often nursing took care of you, and can unambiguously determine your acuity. It knows every human in the operating theater, how long they were there, how much they cost, and every roll of gauze they used. Even free text notes are often templated, with doctors filling in blanks on standardized forms with multiple-choice answers, each of which can be unambiguously evaluated. Computers can instantly and unambiguously determine who too care of you, exactly how much it cost to take care of you, what codes best describe those services, and can communicate that information electronically to your insurers.
Where this falls down is a lot of computer systems grew organically--first a program for scheduling, then a program for billing, then a program for tracking clinical notes, then a program for monitoring vitals, etc., rather than some comprehensive monolith springing forth fully-formed right at the start. This means that to bill for a pregnancy, a medical coder might have to hunt through a dozen different systems: An ADT suite to determine where the patient was roomed and for how long, since a regular bed costs much less than intensive care. A specialty labor and delivery system, to gather the myriad of data states and to defend against lawsuits. An often separate fetal heart monitoring suite. An often separate ultrasound modality, with its own operating system that may or may not speak industry standards, that may or may not pair with a separate vendor-specific image viewer on computer workstations. A separate OR suite for doing documenting personnel, and doing counts and checks (to make sure you're billed for the roll of gauze they did use, not billed for the one they didn't, and that neither were left inside you.) A still-separate anesthesia suite, to make sure they don't gas you to death. An inpatient system for tracking medications and vitals, which may or may not be missing the medications and vitals collected by the labor and delivery suite, which may or may not have the vitals collected by the fetal heart monitor, which may or may not have the vitals collected by the OR suite for your C-section, which may or may not have collected anything at all if they hooked the monitor to the anesthesiology suite instead. Complete billing requires searching multiple systems for the medications given and supplies used, others to determine how long you stayed and where, individual ultrasound carts (or, if you're lucky, a single RIS suite) to determine if any ultrasonography was performed, others to determine who was present and for how long, and yet another set of systems to find out all of the above for your new youngling(s). Labs are often third-party and are even more likely to have a separate computer system than any of the above specialties, so billing for tests and their interpretation requires more branching.
Interfacing the cross product of software applications is difficult and expensive, even when they comport to speak industry standards, and even when they don't involve third-party labs, so it often happens imperfectly if at all. This means the same manual, subjective, error-prone, hunt-for-the-charge style of billing that made clipboards suck. This also ignores the fact that most doctors aren't hospital employees--the surgeon has his own practice, and merely has privileges to operate at the hospital--and therefore bill separately for their own labor.
The best computer systems make all this go away--all the documentation is accurate and in one place, bills are generated automatically and unambiguously, and include professional fees (which the hospital knows how to remit). Those systems really do make billing better for hospital, physician, and patient, if not the insurance company. The worst computer systems make things worse, with dozens of individual programs grafted into a Frankenstein and dropped into the laps of an outsourced third-party coder to deal with. It's that stuff that leads to the nightmare I'm sorry you and yours have to deal with.