Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Removing "." (in string format) from a variable-->new problem "code too long"


From   Adam Olszewski <[email protected]>
To   [email protected]
Subject   Re: st: Removing "." (in string format) from a variable-->new problem "code too long"
Date   Wed, 28 Nov 2012 20:58:14 -0500

This is because icd9p refers to "ICD-9-CM Volume 3 Procedure Codes"
which are four-digits only. If you -icd9 check- you should not see a
problem. You can look this up at http://www.icd9data.com/
For example the string 4201 would be read as 420.1 (Acute and subacute
bacterial endocarditis) by icd9 and as 42.01 (Incision Of Esophageal
Web) by icd9p.
So, like with everything, you need to know what you ask for.
see:

icd9 lookup 4210
icd9p lookup 4210

AO

On Wed, Nov 28, 2012 at 8:17 PM, Michael Stewart
<[email protected]> wrote:
> Hi Adam ,
> I  was successfully able to remove the "." but I ran into another
> problem.  I am still getting the error "variable contains invalid
> codes " . I ran the icd9p check variable, gen(prob) .I got  table
> which showed that the " Code too long  " . But when I check the
> individual codes  by icd9 lookup , I am getting  a valid description.
> I am really  puzzled by this.Do you have any thoughts/ suggestions
> thanks
> Mike
>
>
>
> On Wed, Nov 28, 2012 at 7:35 PM, Adam Olszewski
> <[email protected]> wrote:
>> replace yourvariable="" if yourvariable=="."
>>
>> On Wed, Nov 28, 2012 at 7:16 PM, Michael Stewart
>> <[email protected]> wrote:
>>> hello ,
>>>
>>> i am working with ICD9 codes and i had to convert the icd-9 codes to
>>> string format
>>> Unfortunately , I got some values like following with only dots (as
>>> shown below).
>>>  |--------------|
>>>  |   996.51 |
>>>  |        .     |
>>>  |        .    |
>>>  |        .    |
>>>  |   327.23 |
>>>  |----------   |
>>>  |        .    |
>>>  |        .    |
>>>  |        .    |
>>>  |        .    |
>>>  |        .    |
>>>  |-------------|
>>>  |    555.9 |
>>>  +----------+
>>>
>>> As I try to use the icd9 check commnd, I get that the variable has
>>> invalid icd9 values and following output
>>>
>>> . |        .   Invalid placement of period |
>>> . |        .   Invalid placement of period |
>>>  |        .   Invalid placement of period |
>>>  |        .   Invalid placement of period |
>>>  |        .   Invalid placement of period |
>>> |----------------------------------------|
>>>
>>> Is there any way to just remove   "." (in string format) from the variable.
>>>
>>>
>>> --
>>> Thank you ,
>>> Yours Sincerely,
>>> Mike.
>>> *
>>> *   For searches and help try:
>>> *   http://www.stata.com/help.cgi?search
>>> *   http://www.stata.com/support/faqs/resources/statalist-faq/
>>> *   http://www.ats.ucla.edu/stat/stata/
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/faqs/resources/statalist-faq/
>> *   http://www.ats.ucla.edu/stat/stata/
>
>
>
> --
> Thank you ,
> Yours Sincerely,
> Mike.
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index