instruction: give me the number of patients who were ordered d-dimer lab test and admitted before 2123.
response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2123" AND lab.label = "D-Dimer"