Skip to content

Commit 551ad88

Browse files
committed
Expand challenge query
1 parent f58e9f3 commit 551ad88

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

SivStudies/resources/queries/study/demographicsChallengeAndArt.query.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
<column columnName="allART">
1515
<columnTitle>ART</columnTitle>
1616
</column>
17+
<column columnName="infectionDate">
18+
<columnTitle>Infection Date</columnTitle>
19+
</column>
1720
</columns>
1821
<titleColumn>allInfections</titleColumn>
1922
</table>

SivStudies/resources/queries/study/demographicsChallengeAndArt.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ SELECT
88
WHEN t.category = 'ART' THEN (cast(month(t.date) as varchar) || '/' || cast(dayofmonth(t.date) as varchar) || '/' || cast(year(t.date) as varchar) || ' (' || t.treatment || ')')
99
ELSE NULL
1010
END, char(10)) as allART,
11+
min(CASE
12+
WHEN t.category = 'SIV Infection' THEN t.date
13+
ELSE NULL
14+
END, char(10)) as infectionDate,
1115

1216
FROM study.treatments t
1317
GROUP BY t.Id

0 commit comments

Comments
 (0)