I want to separate a string variable and create a new variable if the word "Chest" or "chest" appears in the original string variable.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str3 A str42 B "id " "diagnosis" "1" "Acute carpal tunnel syndrome of left wrist" "2" "Acute cerebral infarction" "3" "Acute cerebral infarction" "4" "Acute cervical myofascial strain" "5" "Acute cervical myofascial strain" "6" "Acute cervical myofascial strain" "7" "Acute cervical myofascial strain" "8" "Acute cervical myofascial strain" "9" "Acute cervical myofascial strain" "10" "Acute chest wall pain" "11" "Acute chest wall pain" "12" "Acute chest wall pain" "13" "Acute chest wall pain" "14" "Acute cholecystitis" "15" "Acute cholecystitis" "16" "Acute cholecystitis" "17" "Chest pain" "18" "Chest pain" "19" "Chest pain" "20" "Chest pain" "21" "Chest pain" "22" "Chest pain" "23" "Chest pain" "24" "Chest pain" "25" "Chest pain" "26" "Chest pain" "27" "Chest pain" "28" "Chest pain" end
Comment