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