ICD-9 XML,CSV或数据库格式的代码列表

TJ.*_*TJ. 31 database medical

我正在寻找疾病和程序的ICD-9代码(医疗代码)的完整列表,其格式可以导入数据库并以编程方式引用.我的问题与寻找ICD-9代码的资源基本完全相同,但原始的海报忽略了提到他"完全列出"他的完整列表.

谷歌绝对不是我的朋友,因为我花了很多时间来搜索问题并发现了许多富文本类型列表(例如CDC)或网站,我可以交互式深入查看完整列表,但我找不到哪里可以获得填充这些网站的列表,可以解析为数据库.我相信这里的文件ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Publications/ICD9-CM/2009/有我想要的东西,但文件是富文本格式,包含大量垃圾和格式这很难准确删除.

我知道这必须由其他人完成,我试图避免重复其他人的努力,但我找不到xml/CSV/Excel列表.

chr*_*ris 22

医疗补助和医疗保险服务中心提供excel文件,其中只包含代码和诊断,可以直接导入某些SQL数据库,无需转换.

按版本号压缩Excel文件

(更新:基于以下评论的新链接)

  • 新链接:https://www.cms.gov/Medicare/Coding/ICD9ProviderDiagnosticCodes/codes.html (4认同)

TJ.*_*TJ. 11

删除RTF后,解析文件并将其转换为CSV并不太难.我得到的包含疾病和程序的所有2009 ICD-9代码的解析文件在这里:http://www.jacotay.com/files/Disease_and_ProcedureCodes_Parsed.zip 我写的解析器在这里:http://www.jacotay.com /files/RTFApp.zip 基本上这是一个两步过程 - 从CDC FTP站点获取文件,并从中删除RTF,然后选择无RTF文件并将其解析为CSV文件.这里的代码非常粗糙,因为我只需要将结果输出一次.

以下是解析应用程序的代码,以防外部链接关闭(后端为允许您选择文件名并单击按钮以使其运行的表单)

Public Class Form1

Private Sub btnBrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBrowse.Click
    Dim p As New OpenFileDialog With {.CheckFileExists = True, .Multiselect = False}
    Dim pResult = p.ShowDialog()
    If pResult = Windows.Forms.DialogResult.Cancel OrElse pResult = Windows.Forms.DialogResult.Abort Then
        Exit Sub
    End If
    txtFileName.Text = p.FileName
End Sub

Private Sub btnGo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGo.Click
    Dim pFile = New IO.FileInfo(txtFileName.Text)
    Dim FileText = IO.File.ReadAllText(pFile.FullName)
    FileText = RemoveRTF(FileText)
    IO.File.WriteAllText(Replace(pFile.FullName, pFile.Extension, "_fixed" & pFile.Extension), FileText)

End Sub


Function RemoveRTF(ByVal rtfText As String)
    Dim rtBox As System.Windows.Forms.RichTextBox = New System.Windows.Forms.RichTextBox

    '// Get the contents of the RTF file. Note that when it is
    '// stored in the string, it is encoded as UTF-16.
    rtBox.Rtf = rtfText
    Dim plainText = rtBox.Text

    Return plainText
End Function


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim pFile = New IO.FileInfo(txtFileName.Text)
    Dim FileText = IO.File.ReadAllText(pFile.FullName)
    Dim DestFileLine As String = ""
    Dim DestFileText As New System.Text.StringBuilder

    'Need to parse at lines with numbers, lines with all caps are thrown away until next number
    FileText = Strings.Replace(FileText, vbCr, "")
    Dim pFileLines = FileText.Split(vbLf)
    Dim CurCode As String = ""
    For Each pLine In pFileLines
        If pLine.Length = 0 Then
            Continue For
        End If
        pLine = pLine.Replace(ChrW(9), " ")
        pLine = pLine.Trim

        Dim NonCodeLine As Boolean = False
        If IsNumeric(pLine.Substring(0, 1)) OrElse (pLine.Length > 3 AndAlso (pLine.Substring(0, 1) = "E" OrElse pLine.Substring(0, 1) = "V") AndAlso IsNumeric(pLine.Substring(1, 1))) Then
            Dim SpacePos As Int32
            SpacePos = InStr(pLine, " ")
            Dim NewCode As String
            NewCode = ""
            If SpacePos >= 3 Then
                NewCode = Strings.Left(pLine, SpacePos - 1)
            End If

            If SpacePos < 3 OrElse Strings.Mid(pLine, SpacePos - 1, 1) = "." OrElse InStr(NewCode, "-") > 0 Then
                NonCodeLine = True
            Else
                If CurCode <> "" Then
                    DestFileLine = Strings.Replace(DestFileLine, ",", "&#44;")
                    DestFileLine = Strings.Replace(DestFileLine, """", "&quot;").Trim
                    DestFileText.AppendLine(CurCode & ",""" & DestFileLine & """")
                    CurCode = ""
                    DestFileLine = ""
                End If

                CurCode = NewCode
                DestFileLine = Strings.Mid(pLine, SpacePos + 1)
            End If
        Else
            NonCodeLine = True
        End If


        If NonCodeLine = True AndAlso CurCode <> "" Then 'If we are not on a code keep going, otherwise check it
            Dim pReg As New System.Text.RegularExpressions.Regex("[a-z]")
            Dim pRegCaps As New System.Text.RegularExpressions.Regex("[A-Z]")
            If pReg.IsMatch(pLine) OrElse pLine.Length <= 5 OrElse pRegCaps.IsMatch(pLine) = False OrElse (Strings.Left(pLine, 3) = "NOS" OrElse Strings.Left(pLine, 2) = "IQ") Then
                DestFileLine &= " " & pLine
            Else 'Is all caps word
                DestFileLine = Strings.Replace(DestFileLine, ",", "&#44;")
                DestFileLine = Strings.Replace(DestFileLine, """", "&quot;").Trim
                DestFileText.AppendLine(CurCode & ",""" & DestFileLine & """")
                CurCode = ""
                DestFileLine = ""
            End If
        End If
    Next

    If CurCode <> "" Then
        DestFileLine = Strings.Replace(DestFileLine, ",", "&#44;")
        DestFileLine = Strings.Replace(DestFileLine, """", "&quot;").Trim
        DestFileText.AppendLine(CurCode & ",""" & DestFileLine & """")
        CurCode = ""
        DestFileLine = ""
    End If

    IO.File.WriteAllText(Replace(pFile.FullName, pFile.Extension, "_parsed" & pFile.Extension), DestFileText.ToString)
End Sub
Run Code Online (Sandbox Code Playgroud)

结束班


小智 5

医疗保险服务中心(CMS)实际上是由ICD负责的,所以我认为你们引用的CDC版本可能只是副本或重新处理的副本。这是(很难找到的)医疗保险页面,我认为其中包含原始的原始数据(“真相来源”)。

http://www.cms.gov/Medicare/Coding/ICD9ProviderDiagnosticCodes/codes.html

截止目前,最新版本为v32。您下载的zip文件将包含4个纯文本文件,这些文件将代码映射到描述(每个DIAG | PROC和SHORT | LONG组合一个文件)。它还包含两个Excel文件(每个DIAG_PROC文件)具有三列,因此将代码映射到两个描述(长短)。