File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
mimic-iv/concepts/medication Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ WITH acei_drug AS (
2+ SELECT DISTINCT
3+ drug
4+ , CASE
5+ WHEN UPPER (drug) LIKE ' %BENAZEPRIL%' THEN 1
6+ WHEN UPPER (drug) LIKE ' %CAPTOPRIL%' THEN 1
7+ WHEN UPPER (drug) LIKE ' %ENALAPRIL%' THEN 1
8+ WHEN UPPER (drug) LIKE ' %FOSINOPRIL%' THEN 1
9+ WHEN UPPER (drug) LIKE ' %LISINOPRIL%' THEN 1
10+ WHEN UPPER (drug) LIKE ' %MOEXIPRIL%' THEN 1
11+ WHEN UPPER (drug) LIKE ' %PERINDOPRIL%' THEN 1
12+ WHEN UPPER (drug) LIKE ' %QUINAPRIL%' THEN 1
13+ WHEN UPPER (drug) LIKE ' %RAMIPRIL%' THEN 1
14+ WHEN UPPER (drug) LIKE ' %TRANDOLAPRIL%' THEN 1
15+ ELSE 0
16+ END AS acei
17+ FROM ` physionet-data.mimiciv_hosp.prescriptions`
18+ )
19+
20+ SELECT
21+ pr .subject_id
22+ , pr .hadm_id
23+ , pr .drug AS acei
24+ , pr .starttime
25+ , pr .stoptime
26+ FROM
27+ ` physionet-data.mimiciv_hosp.prescriptions` pr
28+ INNER JOIN acei_drug
29+ ON
30+ pr .drug = acei_drug .drug
31+ WHERE
32+ acei_drug .acei = 1
33+ ;
You can’t perform that action at this time.
0 commit comments