Skip to content

Extending Cohort generation results with simple demographics available in Cohort Characterization#2959

Merged
chrisknoll merged 10 commits into
masterfrom
cohort-demographics
Mar 4, 2025
Merged

Extending Cohort generation results with simple demographics available in Cohort Characterization#2959
chrisknoll merged 10 commits into
masterfrom
cohort-demographics

Conversation

@alex-odysseus

Copy link
Copy Markdown
Contributor

Addressing OHDSI/WebAPI#2347

@anthonysena anthonysena self-assigned this Dec 17, 2024
@chrisknoll

Copy link
Copy Markdown
Collaborator

Please add additional information to this PR:

  1. A summary of what has changed.
  2. What were the new UI elements (buttons, dropdowns etc) and what do they do?
  3. What new reports/views are available?
  4. Which new functions (if any) of webAPI are being invoked?
  5. Are there any new permission considerations (ie: only available by Admin)?

const urlGetReportDemographic = `${config.webAPIRoot}cohortdefinition/${(cohortDefinitionId || '-1')}/report/${sourceKey}?mode=${modeId || 0}&ccGenerateId=${ccGenerateId}`
var reportPromise = $.ajax({
url: `${config.webAPIRoot}cohortdefinition/${(cohortDefinitionId || '-1')}/report/${sourceKey}?mode=${modeId || 0}`,
url: modeId !== 2 ? `${config.webAPIRoot}cohortdefinition/${(cohortDefinitionId || '-1')}/report/${sourceKey}?mode=${modeId || 0}` : urlGetReportDemographic,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for future reference, the mode ID was intended for the mode of the inclusion report, so adding a new mode_id == 2 confuses what mode_id represents in the report. I think this should be re-factored later.

@chrisknoll chrisknoll left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For purposes of expediency, we can approve this PR, however the LoC of ~1800 is very high to just access a new endpoint to fetch demographic data, and present two tables. I understand that it might have been an easier path to lift code from characterization reporting, there's a lot of over-engineering involved with the implementation, which has now been duplicated in 2 places. For example having all of the conversion classes duplicated is a lot of code, and can probably be greatly simplified since the ultimate goal is to render a data-table.

@chrisknoll chrisknoll merged commit 3561f67 into master Mar 4, 2025
@chrisknoll chrisknoll deleted the cohort-demographics branch March 4, 2025 14:42
@chrisknoll

Copy link
Copy Markdown
Collaborator

In the process of migrating to webAPI and making changes to the AtlasUI to understand places that need to be changed, this feature came across (as it only shows up as a checkbox in the cohort generation page), and I have no idea how to view reports or what the functional requirements are.

I believe I asked in both this PR and OHDSI/WebAPI#2402 for documentation on this feature. To date, I've recieved none.

As WebAPI 3.0 work is involving removing undocumented and obsolete features, I'm considering if this feature should remain.

@alex-odysseus and @oleg-odysseus , please provide information on this as soon as you can, and we can decide if this is something that can be maintained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants