If you are looking at an appointment or are running an appointment-based report, and notice missing or incorrect Diagnosis Codes for particular appointments, it is most likely blank inside the appointment as well, regardless of what is entered on the contract.
Why? Diagnosis codes can be added to a contract after appointments have already been created, which can result in your scenario, where they are still missing at the appointment level.
To fix this, simply go to the client's Contracts -> Services tab and click on the Diagnosis Code box.
A window should open that lets you enter the code, and also options to propagate it to the appointment level.
The options should include Update none, Update all, or Update Appts after a particular date.
NOTE: This must be done per-Service.
Once you propagate this change, the related service appointments and flex reports that reference them should now display a Diagnosis Code.