They are stated in my initial posting. The only different is that I have ICD1 through ICD20. So for all of these ICD variables I need to recode them as below. The highlighted values are the ones I have problems with since character values doesn't work that way. array _icdvar ICD1--ICD20; do over _icdvar; if _icdvar in ('462', '464', '465', '466', '480--488', '507.0', '997.31' then Respiratory = 1, else Respiratory = 0; if _icdvar in ('599.0--599.5') then Infectious = 1; else Infectious = 0; if _icdvar in ('787.20'--'787.29') then Dysphagia = 1; else Dysphagia = 0; if _icdvar in ('308', '310') then Agititation = 1; else Agitation = 0; if _icdvar in ('707.00'--'707.9') then SkinUlcer = 1; else SkinuUlcer = 0; end;
... View more