I didn't realize that was mandated by law? Surely not down to individual codes?
If that is what you are talking about, it kind of makes sense. Part of how the industry obfuscates is by using a lot of different terminology for the same thing, thus nobody can do price comparison across vendors. But of course, trying to impose order onto something purposefully confusing, is going to be difficult.
It is possible to arraigned the codes in rather amusing orders such as:
I required a Face Transplant, from a Cadaver; “0WY20Z0 Transplantation of Face, Allogeneic, Open Approach Transplantation of Face, Allogeneic, Open Approach” after my many spacecraft crashes into the ocean; “V9541XD Spacecraft crash injuring occupant, subsequent encounter”.
Sadly the first Face Transplant failed so one was grown in a lab for the second Face Transplant; “0WY20Z1 Transplantation of Face, Syngeneic, Open Approach Transplantation of Face, Syngeneic, Open Approach”.
Alas all of this made my “F52 Sexual dysfunction not due to a substance or known physiological condition” became so bad that I tried to harm myself with a jellyfish; “T63622A Toxic effect of contact with other jellyfish, intentional self-harm, initial encounter”. -- Amusement with the Medicare ICD10 Billing Codes –
The law does not specifically require X12. The law gives CMS the authority to set technical standards and they chose X12 for those transactions because there was no other practical option. But recently they have granted at least one exception to use FHIR instead.