Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion GeneticsCore/resources/views/mhcDataDashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
'query.viewName': 'SBT Information',
'query.readset~nonblank': null,
'query.readset/status~isblank': null,
'query.numCachedResults~gt': 0,
'query.numCachedResults~eq': 0,
})
},{
name: 'Readsets Without Alignments',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,14 @@ SELECT
ELSE 0
END as mhcBloodDrawVol,
CASE
WHEN (nts.Id is not null) THEN 0
WHEN (f.flags LIKE '%DNA Bank Blood Draw Needed%') THEN 6
WHEN (f.flags LIKE '%DNA Bank Not Needed%') THEN 0
WHEN (f.flags LIKE '%DNA Bank Blood Draw Collected%') THEN 0
WHEN (s.subjectId IS NULL) THEN 6 --timestampdiff('SQL_TSI_DAY', curdate(), d.birth) > 365 AND
ELSE 0
END as dnaBloodDrawVol

FROM study.Demographics d

--determine if animal has raw STR data performed by UC Davis
Expand Down Expand Up @@ -150,6 +151,17 @@ LEFT JOIN (
GROUP BY u.Id
) u ON (u.Id = d.Id)

LEFT JOIN (
SELECT
p.id,
max(p.date) as lastDate
FROM study.flags p
WHERE p.flag.category ='Genetics' And p.flag.value = 'DNA Bank Blood Draw Not Needed'
And p.enddate is null
GROUP BY p.id

) nts ON (nts.id = d.id)


WHERE d.calculated_status = 'Alive'

Expand Down
Loading