opd and inpatient diagnosis