I am combining dx1-dx15 diagnosis codes to create one big diagnosis code called Tertiary, using the following code in stata:
I wanted to search the new diagnosis code, Tertiary, for specific group of icd 9 codes (all at once): 73395, 73396, 73393, 73394. I want to create a new variable for those individuals in the column "Tertiary" with the icd9 code of 73395, 73396, 73393, 73394 so I can analyze the data later for the age of these patients and ect.
I have tried the code,
I received an error:
"Primary contains invalid ICD-9 codes
r(459);"
How can I search the Tertiary variable for the icd9 codes 73395, 73396, 73393, 73394 and generate a new variable from the Tertiary variable with only these 73395, 73396, 73393, 73394?
Code:
egen Tertiary = concat(dx1 dx2 dx3 dx4 dx5 dx6 dx7 dx8 dx9 dx10 dx11 dx12 dx13 dx14 dx15), p(" ")
I have tried the code,
Code:
icd9 generate march = Tertiary, range(733*)
"Primary contains invalid ICD-9 codes
r(459);"
How can I search the Tertiary variable for the icd9 codes 73395, 73396, 73393, 73394 and generate a new variable from the Tertiary variable with only these 73395, 73396, 73393, 73394?
Comment