Skip to content

Commit 55d3f95

Browse files
committed
update to pass sqlfluff
1 parent 7797717 commit 55d3f95

File tree

1 file changed

+13
-12
lines changed
  • mimic-iv/concepts/medication

1 file changed

+13
-12
lines changed
Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1-
WITH arb_drug AS (
1+
WITH arb_drug AS (
22
SELECT DISTINCT
33
drug
44
, CASE
5-
WHEN UPPER(drug) LIKE '%AZILSARTAN%' OR UPPER(drug) LIKE '%EDARBI%' THEN 1
6-
WHEN UPPER(drug) LIKE '%CANDESARTAN%' OR UPPER(drug) LIKE '%ATACAND%' THEN 1
7-
WHEN UPPER(drug) LIKE '%IRBESARTAN%' OR UPPER(drug) LIKE '%AVAPRO%' THEN 1
8-
WHEN UPPER(drug) LIKE '%LOSARTAN%' OR UPPER(drug) LIKE '%COZAAR%' THEN 1
9-
WHEN UPPER(drug) LIKE '%OLMESARTAN%' OR UPPER(drug) LIKE '%BENICAR%' THEN 1
10-
WHEN UPPER(drug) LIKE '%TELMISARTAN%' OR UPPER(drug) LIKE '%MICARDIS%' THEN 1
11-
WHEN UPPER(drug) LIKE '%VALSARTAN%' OR UPPER(drug) LIKE '%DIOVAN%' THEN 1
12-
WHEN UPPER(drug) LIKE '%SACUBITRIL%' OR UPPER(drug) LIKE '%ENTRESTO%' THEN 1
13-
ELSE 0
5+
WHEN UPPER(drug) LIKE '%AZILSARTAN%' OR UPPER(drug) LIKE '%EDARBI%'
6+
OR UPPER(drug) LIKE '%CANDESARTAN%' OR UPPER(drug) LIKE '%ATACAND%'
7+
OR UPPER(drug) LIKE '%IRBESARTAN%' OR UPPER(drug) LIKE '%AVAPRO%'
8+
OR UPPER(drug) LIKE '%LOSARTAN%' OR UPPER(drug) LIKE '%COZAAR%'
9+
OR UPPER(drug) LIKE '%OLMESARTAN%' OR UPPER(drug) LIKE '%BENICAR%'
10+
OR UPPER(drug) LIKE '%TELMISARTAN%' OR UPPER(drug) LIKE '%MICARDIS%'
11+
OR UPPER(drug) LIKE '%VALSARTAN%' OR UPPER(drug) LIKE '%DIOVAN%'
12+
OR UPPER(drug) LIKE '%SACUBITRIL%' OR UPPER(drug) LIKE '%ENTRESTO%'
13+
THEN 1
14+
ELSE 0
1415
END AS arb
1516
FROM `physionet-data.mimiciv_hosp.prescriptions`
1617
)
18+
1719
SELECT
1820
pr.subject_id
1921
, pr.hadm_id
@@ -23,8 +25,7 @@ SELECT
2325
FROM
2426
`physionet-data.mimiciv_hosp.prescriptions` pr
2527
INNER JOIN arb_drug
26-
ON
27-
pr.drug = arb_drug.drug
28+
ON pr.drug = arb_drug.drug
2829
WHERE
2930
arb_drug.arb = 1
3031
;

0 commit comments

Comments
 (0)