Skip to content

Commit 1d09d98

Browse files
committed
Updated the query #2
1 parent 4408991 commit 1d09d98

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

onprc_ehr/resources/queries/study/AlopeciaScoreMissingBehaviorCases.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ FROM (
2929
FROM study.clinical_observations AS co
3030
WHERE
3131
co.category = 'Alopecia Score'
32-
AND co.created >= TIMESTAMPADD(SQL_TSI_YEAR, -1, NOW())
32+
AND co.created >= TIMESTAMPADD(SQL_TSI_MONTH, -1, NOW())
3333
AND co.created = (
3434
SELECT MAX(co2.created)
3535
FROM study.clinical_observations AS co2
3636
WHERE
3737
co2.Id = co.Id
3838
AND co2.category = 'Alopecia Score'
39-
AND co2.created >= TIMESTAMPADD(SQL_TSI_DAY, -7, NOW())
39+
AND co2.created >= TIMESTAMPADD(SQL_TSI_MONTH, -1, NOW())
4040
)
4141
) AS mr
4242
INNER JOIN study.demographics AS d ON mr.Id = d.Id

0 commit comments

Comments
 (0)