The diagnosis code should match the service and in the case of 92015, it is far more common to use a refractive Dx code. In rare cases, possibly with corneal disease, maybe incipient cataracts, possibly systemic diabetes, the refraction might be a tool to assist in diagnosis and management, but in the vast majority of cases it is done purely to determine refractive error.
The other issue is that refraction is not considered a covered service by most payers, including Medicare, of course, and is billed to the patient or the patient’s vision plan. In those cases, using a medical diagnosis code might actually cause the claim to be rejected by the vision plan. In general, unless it is a very unusual case, refraction will be reported in combination with a refractive code.