Skip to content

Commit 02d0c90

Browse files
committed
Update handling of SNPRC 'Other' status
1 parent 51a67e7 commit 02d0c90

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

mcc/resources/queries/mcc/aggregatedDemographics.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ LEFT JOIN (SELECT
3939
o."medical_history::observation" as medical_history,
4040
FROM "/data/Colonies/SNPRC/".study.mostRecentObservationsPivoted o
4141
) o ON (o.Id = d.Id)
42-
WHERE (d.excludeFromCensus IS NULL or d.excludeFromCensus = false)
42+
WHERE (d.excludeFromCensus IS NULL or d.excludeFromCensus = false) and d.calculated_status NOT IN ('Unknown', 'Other')
4343

4444
UNION ALL
4545

mcc/resources/queries/study/demographics.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ function onUpsert(helper, scriptErrors, row, oldRow){
3434
if (row.calculated_status === 'alive') {
3535
row.calculated_status = 'Alive';
3636
}
37+
else if (row.calculated_status === 'Other') {
38+
row.calculated_status = 'Unknown';
39+
}
3740

3841
if (row.death) {
3942
row.calculated_status = 'Dead';

0 commit comments

Comments
 (0)