instruction: how many patients whose admission year is less than 2187 and drug route is tp?
response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admityear < "2187" AND prescriptions.route = "TP"