RENCI / ctmd

MIT License
2 stars 0 forks source link

Render New Columns in Proposals Table on Dashboard #175

Closed mbwatson closed 4 years ago

mbwatson commented 4 years ago
  1. We want to show a StudyPopulation column. Values seem to be integers; see below.
duketic# select "ProposalID", "StudyPopulation" from "Proposal";
 ProposalID | StudyPopulation 
------------+-----------------
        198 | 3
        538 | 1
        471 | 1
        356 | 2
         55 | 1
        183 | 1
        424 | 
        432 | 
        224 | 1
        315 | 2
         37 | 1
        318 | 2
        485 | 1
  1. We also want to show PhaseOfStudy. These also seem to be integers 0, 1, 2, 3, 4, 5, 6.
duketic=# select "ProposalID", "PhaseOfStudy" from "Proposal";
 ProposalID | PhaseOfStudy 
------------+--------------
        198 | 6
        538 | 6
        471 | 6
        356 | 6
         55 | 3
        183 | 6
        424 | 6
        432 | 
        224 | 5
        315 | 6

The string interpretations of these values are in that name lookup table.

mbwatson commented 4 years ago
# select * from "name" where "id" like '%study_vumc_ric1ase%';
  table   |    column    | index |           id           | description 
----------+--------------+-------+------------------------+-------------
 Proposal | PhaseOfStudy | 0     | study_vumc_ric1ase___0 | Phase 0
 Proposal | PhaseOfStudy | 1     | study_vumc_ric1ase___1 | Phase 1
 Proposal | PhaseOfStudy | 2     | study_vumc_ric1ase___2 | Phase  2A
 Proposal | PhaseOfStudy | 3     | study_vumc_ric1ase___3 | Phase 2B
 Proposal | PhaseOfStudy | 4     | study_vumc_ric1ase___4 | Phase 3
 Proposal | PhaseOfStudy | 5     | study_vumc_ric1ase___5 | Phase 4
 Proposal | PhaseOfStudy | 6     | study_vumc_ric1ase___6 | 
(7 rows)
# select * from "name" where "id" like '%study_population%';
  table   |     column      | index |          id          |     description     
----------+-----------------+-------+----------------------+---------------------
 Proposal | StudyPopulation | 1     | study_population___1 | Adult
 Proposal | StudyPopulation | 2     | study_population___2 | Pediatric
 Proposal | StudyPopulation | 3     | study_population___3 | Adult and Pediatric
mbwatson commented 4 years ago

in 1.22