Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • ICD9 Issue

    Hi, I am new here, I am working on (HCUP) data and run into invalid ICD9 codes in one of Var , when I look at the Data Editor Browse I found some of ICD9 value is "invl" ? , all other values are numerical and correct codes. how can I fix this ?

    this is what I go when I do icd9p check pr1, any


    1. Invalid placement of period 0
    2. Too many periods 0
    3. Code too short 0
    4. Code too long 0
    5. Invalid 1st char (not 0-9) 27,472
    6. Invalid 2nd char (not 0-9) 0
    7. Invalid 3rd char (not 0-9) 0
    8. Invalid 4th char (not 0-9) 0
    -----------
    Total 27,472


  • #2
    First, there is some confusion in your question. On the one hand you speak of ICD9 codes, yet you used the -icd9p check- command which tries to validate ICD9 procedure codes (which are not the same thing). So are you trying to work with ICD9 codes, or ICD9 procedure codes? If the former, the command is -icd9 check-.

    Be that as it may, Stata is complaining that the offending codes have a first character that is not 0-9. Those cannot be valid as either ICD9 or ICD9-procedure codes. So the question is what they are and how they got there. Are they perhaps ICD-10 codes (which typically begin with a letter)? Or are they just some data errors?

    Comment


    • #3
      Thank you so much for responding , I am using variable that has ICD9 procedure codes called "Pr1" in my data which refer to the primary procedure , any time I use that variable to select my study group ( index admissions ) I get an error which telling me that "Pr1" has Invalid ICD9 on it. when do iced9p Check Command that what I received ( 27,000 invalid ) which too small in my data , . but when I looked at the data ( using Data Editor Browse function) I found some values of the variable "Pr1" is not normal ICD9 Procedure codes it was like this "invl" , I know it mean invalid , but I can not create my Index if they still there . how can I deal with that ?

      please excuse my basic way of explaining my problem , I am learning.

      Comment


      • #4
        but I can not create my Index if they still there . how can I deal with that ?
        Please show example data, and also show 1) the code you are trying to use to create this index, and 2) an explanation of how you want the code to work when Pr1 is not a valid ICD9 code. Then somebody can help you modify your code to do that.

        Comment


        • #5
          Hamad, specifically, can you please type:

          Code:
          dataex pr? prv?, varlabel
          That will give you code to show up to the first 9 procedure codes in the first 100 observations. That should help us understand what is going on. Furthermore, if you are using the National Inpatient Sample (it sounds like you are; this is a U.S. dataset of hospital discharges), it shows the validity flags for each of the procedure fields, and that should be contained in the -prv?- variables. All other information will be suppressed. The -dataex- command is already installed if you run Stata 14.2 or 15.1. If you don't, you can type
          Code:
          ssc install dataex
          Just cut and paste the resulting code in a response on the forum.

          You may already be aware of this, but beginning in the 4th quarter of 2015, the US finally (finally!!) switched over to ICD-10 codes. If your files are on or after that date, I bet that the -pr*- variables will either be blank or coded as -invl- (which, as HCUP's documentation does mention, means invalid code). Assuming, of course, that the variables were retained at all. Either way, your question is not clear, and you have to show us at least some data to help us figure out what is the issue.
          Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

          When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

          Comment

          Working...
          X