These codes were created because ICD-9-CM did not have specific codes for encounters for pain management or for these specific types of pain. In addition to specific codes for post-thoracotomy pain and postoperative pain, there is a specific code for neoplasm-related pain (338.3). Generalized pain is coded to 780.96.