ICD-10 CM is more than just codes and their descriptions; the codes have associated data (such as which codes are excluded when the code is present). One of the main data files is called the 'tabular list', which organizes the data by the code (as opposed to the code's description).
The tabular list is distributed in both a human readable PDF file as well as a machine readable XML file. While I should say that it is fortunate that there is an XML file, it does not go far enough in terms of being 'machine-friendly'. The data inside the XML file is still reliant on human interpretation.
Problem #1: It doesn't give us the codes directly, but rather puts them in a human readable string
The first thing to notice is that it doesn't give us the codes directly. It gives us human text, and in round brackets (parentheses), it lists the code. So from the get go, the programmer is forced to parse the last round-bracket-enclosed string.
As an example of what I'm talking about, let's look at the '
excludes1' data for the code G02 (Meningitis in other infectious and parasitic diseases classified elsewhere):
<excludes1>
<note>candidal meningitis (B37.5)</note>
<note>coccidioidomycosis meningitis (B38.4)</note>
<note>cryptococcal meningitis (B45.1)</note>
<note>herpesviral [herpes simplex] meningitis (B00.3)</note>
<note>infectious mononucleosis complicated by meningitis (B27.- with fourth character 2)</note>
<note>measles complicated by meningitis (B05.1)</note>
<note>meningoencephalitis and meningomyelitis in other infectious
and parasitic diseases classified elsewhere (G05)</note>
<note>mumps meningitis (B26.1)</note>
<note>rubella meningitis (B06.02)</note>
<note>varicella [chickenpox] meningitis (B01.0)</note>
<note>zoster meningitis (B02.1)</note>
</excludes1>
Of course, sometimes they forget one of the brackets (see the 2019 excludes1 data for C30.0):
other and unspecified malignant neoplasm of skin of nose C44.301, C44.311, C44.321, C44.391)
Or both brackets (see 2019 excludes1 data for R29.891):
congenital (sternomastoid) torticollis Q68.0
It would appear that this data is not only
intended for humans, but it was
written directly by humans.
Solution #1: have a dedicated element for the codes
Problem #2: multiple ways of specifying multiple codes
Inside the brackets, there may be multiple codes, separated by a comma, by 'and', or by both. It may include a range of codes, separated by a hyphen. Or it may have some random text. Look at the example above (for the excludes1 items for G02). Note the line that says:
infectious mononucleosis complicated by meningitis (B27.- with fourth character 2)
First of all, this is an
error on their part--they mean 'fifth' instead of 'fourth'. Had it actually been 'fourth', they could have just said 'B27.2'. (And the 'with meningitis' diagnoses under B27 all have a fifth character of '2'. The fourth character specifies the type of virus.) So let's pretend it actually said 'fifth'. This is not an easy thing to parse. It would have been much easier for everyone involved to have them list the actual codes (in this case, 'B27.02, B27.12, B27.82, B27.92').
Solution #2: list the actual codes involved instead of relying on ranges and other random designations. Each code can have its own element, or maybe just put them in a comma separated list.
Problem #3: sometimes they don't even give codes, they just use English.
For the code E87.2 (Acidosis), there is an '
excludes1' statement that reads:
diabetic acidosis - see categories E08-E10, E13 with ketoacidosis
So basically, instead of giving us a code list that reads: 'E08.1, E09.1, E10.1, E13.1',
they give us some English. I should mention this '
excludes1' statement is likely in
error as well, as there is now a DM type 2 DKA code (E11.1), added in 2018 I believe.
Solution #3: less English, more codes
Problem #4: the ICD-10 tabular data makes me expand the codes by the seventh character rather than just giving the expanded codes to me
I've got way too much boring stuff to say about this, especially how they will do things such as giving us the seventh character definitions, but in the note, specify in complex English which of the actual codes these should be applied to. And how they give us the seventh character definitions but then override them for certain children.
Solution #4: still give us the seventh character definition data, but also expand the codes for us. And only give the seventh character definition data on the actual codes it applies to. The bloat in the XML file will easily be tolerated.
Misc:
Sometimes they end codes inside the round brackets with a hyphen (e.g. 'E78.-'). I believe this indicates that there are additional characters in the code. But as far as I can tell, this is redundant, as if the code is a branch (ie has child codes) as opposed to a leaf (ie a billable code), then it is assumed to apply to all the children of that code.
As negative as I have been in this post, let me just say that I am appreciative of the fact that there is an XML file. Other systems (I'm looking at you, MS-DRG) are way worse in terms of being machine not-so-friendly.