Dear Statalist,
I'm trying to destring a variable containing ICD-10 codes.
I tried using
and
The last code generating all missing values.
I need to destring to the default format numeric(double) due to merging with another dataset.
Any suggestions?
I'm trying to destring a variable containing ICD-10 codes.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str7 ICD10 "J44.9" "J44.0" "J44.1" "J44.0" "J44.0" "J44.0" "J44.9" "M81.9" "J22" "J44.9" "J44.9" "J44.9" "J44.9" "J44.9" "J44.9" "J44.9" "J44.0" "J44.1" "J44.9" "J44.9" "J44.8" "J45.9" "J44.0" "J44.0" "J44.0" "M80.9" "M81.0" "M81.9" "J84.9" "J84.9" "J84.9" "J84.9" "J84.9" "J84.9" "J84.9" "M81.0" "J22" "M81.0" "M81.5" "J45.9" "J44.8" "J45.9" "J44.9" "J44.0" "J40" "J44.9" "J45.9" "J20.9" "J44.0" "J44.0" "J45.9" "M81.0" "J44.9" "J44.9" "J22" "M81.0" "M81.0" "J44.8" "J44.9" "J44.9" "J44.9" "J44.9" "J44.9" "J44.0" "J44.9" "J44.0" "J44.9" "J44.0" "J44.9" "J20.9" "J44.0" "J44.0" "J44.1" "J44.9" "J44.1" "J44.1" end
Code:
destring ICD10, gen(ICD10*) ICD10: contains nonnumeric characters; no generate
Code:
destring ICD10, gen(ICD10*) force ICD10: contains nonnumeric characters; ICD10* generated as byte (138380 missing values generated)
I need to destring to the default format numeric(double) due to merging with another dataset.
Any suggestions?
Comment