Cohort demographics results are available for visualization if explicitly requested while executing#2402
Conversation
| // Get FE Analysis Demographic (Gender, Age, Race,) | ||
| Set<FeAnalysisEntity> feAnalysis = feAnalysisRepository.findByListIds(Arrays.asList(70, 72, 74, 77)); | ||
|
|
||
| // Set<CcFeAnalysisEntity> ccFeAnalysis = feAnalysis.stream().map(a -> { |
There was a problem hiding this comment.
It relates to https://github.com/OHDSI/WebAPI/pull/2388/files when it is merged to 'master'
| return prepareQueriesDefault(jobParams, jdbcTemplate); | ||
| } | ||
|
|
||
| private String[] prepareQueriesDemographic(ChunkContext chunkContext, CancelableJdbcTemplate jdbcTemplate) { |
There was a problem hiding this comment.
This logic has been taken from Cohort Characterization
| try { | ||
| sql = BigQuerySparkTranslate.sparkHandleInsert(sql, source.getSourceConnection()); | ||
| } catch (SQLException e) { | ||
| e.printStackTrace(); |
There was a problem hiding this comment.
A log entry should be created instead both in the source code from where it was copied and here
| private UserEntity createdBy; | ||
|
|
||
| @Column(name = "cc_generate_id") | ||
| private Long ccGenerateId; |
There was a problem hiding this comment.
This identifier is necessary to correlate a Cohort execution with associated demographics Cohort Characterization
| public Summary summary; | ||
| public List<InclusionRuleStatistic> inclusionRuleStats; | ||
| public String treemapData; | ||
| public List<Report> demographicsStats; |
There was a problem hiding this comment.
There should be found a way not to extend the existing InclusionRuleReport class as they don't relate to each other
| @PathParam("id") final int id, | ||
| @PathParam("sourceKey") final String sourceKey, | ||
| @DefaultValue("0") @QueryParam("mode") int modeId) { | ||
| @DefaultValue("0") @QueryParam("mode") int modeId, @QueryParam("ccGenerateId") String ccGenerateId) { |
There was a problem hiding this comment.
Formatting is broken
| @@ -0,0 +1,2 @@ | |||
| ALTER TABLE ${ohdsiSchema}.cohort_generation_info ADD is_choose_demographic BOOLEAN NOT NULL DEFAULT FALSE; | |||
There was a problem hiding this comment.
Awkward name. Simply 'is_demographic should suffice'
| @@ -0,0 +1,2 @@ | |||
| ALTER TABLE ${ohdsiSchema}.cohort_generation_info ADD is_choose_demographic BOOLEAN NOT NULL DEFAULT FALSE; | |||
| ALTER TABLE ${ohdsiSchema}.cohort_generation_info ADD cc_generate_id INTEGER NULL; No newline at end of file | |||
There was a problem hiding this comment.
what is the need for a cohort characterization generation ID? we don't want to confuse cohort characterization with this demographics summary....The issue will be that as we clean up jobs we'll want to find jobs related to cohort characterization (actual cohort characterization entities) and if this cc_generate_id doesn't correspond over to characterization design, it will introduce confusion.
Perhaps I need to understand better how this function interacts with cohort characterization?
There was a problem hiding this comment.
Also, we should label this migration as 2.15.
|
@alex-odysseus , can you resolve conflicts? |
|
I attempted to test this locally, and I can't tell if it is working as intended: I went to a cohort definition, and clicked the 'demographics' checkbox and then generated. This feature requires more documentation. |
Use cohort characterization function to generate cohort with demographic generate cohort definition with demoraphic, get the result and store at cc_result Add function to get demographic report from cohort definition
# Conflicts: # src/main/java/org/ohdsi/webapi/cohortdefinition/CohortGenerationUtils.java
…he Data Source one Adding a separate migration script instead of changing the old ones (Oracle and SQL Server are no longer supported application dialects) # Conflicts: # src/main/java/org/ohdsi/webapi/service/CohortGenerationService.java
…was inconsistent # Conflicts: # src/main/java/org/ohdsi/webapi/service/CohortGenerationService.java
… the demographics SQLs
1b39103 to
eb6a740
Compare
|
Fixed on the Atlas side, resolved conflicts for both pull requests (rebased), please kindly check OHDSI/Atlas#2959 |
Addressing #2347