-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finish date of initial diagnosis validations
- Loading branch information
Showing
19 changed files
with
271 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
OncologyWG.Rproj | ||
DATA_00.csv | ||
.DS_Store | ||
errorReportSql.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...Scripts/inst/csv/onc_analysis_queries.csv → validationScripts/inst/csv/onc_queries.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
Trying to figure out how to manage analyses/queries.. | ||
# Oncology Validation Framework: Analyses and Queries | ||
|
||
I'm toying with two styles: 1) Achilles, verbatim. 2) Based off Achilles for storage, but growing increasingly different | ||
## Overview | ||
The analyses in the Oncology Validation Framework are meant to be extensible. Practically, this means that OncologyWG developers should be able to create these analyses to support the quality control needs of specific studies and study authors. This document outlines how analyses and queries are managed in this directory. Further, it explains how analyses are built from queries and demonstrates how to do this with examples. | ||
|
||
Benefits of Achilles are that the analyses could all be added back into Achilles. This is a big deal as then they could integrate with Atlas or DQD and be exported to Ares where they could have distinct visualizations. | ||
## Definitions | ||
|
||
Downside of Achilles is that it is a little restrictive and may be a bit off the mark from what I understand we are trying to do. | ||
Definitions for the major terms to know | ||
|
||
Benefits of the (increasingly) ad hoc approach is that we can make the queries as granular as we would like and then combine them together to get answers to different questions. | ||
### Analyses | ||
|
||
Also, keeping them granular makes it possible (easier) to track the records of interest (e.g. mal-formed measurement records) | ||
### Queries | ||
|
||
## Directory Structure | ||
|
||
### csv | ||
|
||
### json | ||
|
||
### sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,19 @@ | ||
-- 1001 Number of poorly-formed date of initial diagnosis modifier records | ||
-- 1001 Number of poorly-formed date of initial diagnosis modifier records | ||
|
||
select 1001 as analysis_id, | ||
cast(null as varchar(255)) as stratum_1, cast(null as varchar(255)) as stratum_2, cast(null as varchar(255)) as stratum_3, cast(null as varchar(255)) as stratum_4, cast(null as varchar(255)) as stratum_5, | ||
COUNT_BIG(DISTINCT measurement_id) as count_value | ||
FROM ( | ||
SELECT measurement_id | ||
FROM @scratchDatabaseSchema.onc_val_date_of_initial_diagnosis_12 | ||
|
||
UNION ALL | ||
|
||
SELECT measurement_id | ||
FROM @scratchDatabaseSchema.onc_val_date_of_initial_diagnosis_13 | ||
|
||
UNION ALL | ||
|
||
SELECT measurement_id | ||
FROM @scratchDatabaseSchema.onc_val_date_of_initial_diagnosis_14 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,22 @@ | ||
-- 1002 Proportion of poorly-formed date of initial diagnosis modifier records | ||
-- 1002 Proportion of poorly-formed date of initial diagnosis modifier records | ||
|
||
select 1002 as analysis_id, | ||
CASE WHEN num_cancer_diagnoses != 0 THEN | ||
cast(cast(1.0*num_poorly_formed as float)/CAST(num_cancer_diagnoses as float) as varchar(255)) | ||
ELSE | ||
cast(null as varchar(255)) END as stratum_1, | ||
cast(num_poorly_formed as varchar(255)) as stratum_2, | ||
cast(num_cancer_diagnoses as varchar(255)) as stratum_3, | ||
cast(null as varchar(255)) as stratum_4, cast(null as varchar(255)) as stratum_5, | ||
sign(num_poorly_formed) as count_value | ||
FROM ( | ||
SELECT ( | ||
SELECT count_value | ||
FROM @resultsDatabaseSchema.onc_validation_results | ||
WHERE analysis_id = 1001 | ||
) AS num_poorly_formed, ( | ||
SELECT count_value | ||
FROM @resultsDatabaseSchema.onc_validation_results | ||
WHERE analysis_id = 2 | ||
) AS num_cancer_diagnoses | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.