Both. You have to consider the number of diagnostics and management options, the data ordered/reviewed and the risk involved, based on the provider's decision making for the presenting problem.
So if the patient presented with a new problem (cough x 4 weeks), was a long-time smoker and OTC cough meds were not working, so the physician ordered a CXR, you'd have a new problem w/workup, a data point for the radiology test, and under table of risk, you'd have a new problem with uncertain diagnosis. In this case, you'd have moderate MDM. In the table of risk, you'd go to the single highest level that most closely matches the scenario.