instruction: find out the number of patients diagnosed with chronic diastolic heart failure who had emergency admission.
response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND diagnoses.long_title = "Chronic diastolic heart failure"