Skip to content

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

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

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

Conversation

@alex-odysseus
Copy link
Contributor

Addressing OHDSI/WebAPI#2347

@anthonysena anthonysena self-assigned this Dec 17, 2024
@chrisknoll
Copy link
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
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.

Copy link
Collaborator

@chrisknoll chrisknoll left a comment

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
2 checks passed
@chrisknoll chrisknoll deleted the cohort-demographics branch March 4, 2025 14:42
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