Skip to content

Commit

Permalink
Add 'program_name' column to Dashboard repository
Browse files Browse the repository at this point in the history
- Updated SQL query to include 'program_name' field.
- Joined 'dataset_meta' table for 'program_name' metadata.
- Added 'program_name' to the column list in DashboardService.
  • Loading branch information
TDeSain committed Nov 20, 2024
1 parent 82303a1 commit d5706f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,11 @@ public List<Map<String, String>> getHackyBDCRows() {
END
AS samples,
CASE
WHEN (consent.consent_code IS NOT NULL AND consent.consent_code != '') THEN concat(study_accession_meta.value, '.', consent.consent_code)
WHEN (consent.consent_code IS NOT NULL AND consent.consent_code != '') THEN concat(study_accession_meta.value, '.', consent.consent_code)
ELSE study_accession_meta.value
END
AS accession,
program_name.value as program_name,
study_focus_meta.value AS study_focus,
additional_info_meta.value AS additional_info_link
FROM
Expand All @@ -83,6 +84,7 @@ public List<Map<String, String>> getHackyBDCRows() {
LEFT JOIN dataset_meta AS study_focus_meta ON study_focus_meta.dataset_id = dataset.dataset_id AND study_focus_meta.KEY = 'study_focus'
LEFT JOIN dataset_meta AS study_accession_meta ON study_accession_meta.dataset_id = dataset.dataset_id AND study_accession_meta.KEY = 'study_accession'
LEFT JOIN dataset_meta AS additional_info_meta ON additional_info_meta.dataset_id = dataset.dataset_id AND additional_info_meta.KEY = 'study_link'
LEFT JOIN dataset_meta AS program_name ON program_name.dataset_id = dataset.dataset_id AND program_name.KEY = 'program_name'
WHERE dataset.dataset_id NOT IN (select dataset_id from dataset_meta where KEY = 'show_dashboad' and VALUE = 'false')
ORDER BY name ASC, abbreviation ASC
""";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ public Dashboard getDashboard() {

private static final List<DashboardColumn> hackyBDCColumns = List.of(
new DashboardColumn("abbreviation", "Abbreviation"), new DashboardColumn("name", "Name"),
new DashboardColumn("study_focus", "Study Focus"), new DashboardColumn("clinvars", "Clinical Variables"),
new DashboardColumn("participants", "Participants"), new DashboardColumn("samples", "Samples Sequenced"),
new DashboardColumn("accession", "Accession"), new DashboardColumn("additional_info_link", "Study Link")
new DashboardColumn("study_focus", "Study Focus"), new DashboardColumn("program_name", "Program"),
new DashboardColumn("participants", "Participants"), new DashboardColumn("clinvars", "Clinical Variables"),
new DashboardColumn("samples", "Samples Sequenced"), new DashboardColumn("accession", "Accession"),
new DashboardColumn("additional_info_link", "Study Link")
);
}

0 comments on commit d5706f9

Please sign in to comment.