-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementation of CohortIncidence module. #147
Merged
anthonysena
merged 5 commits into
remove-deps-add-module-interface
from
module-interface-cohortincidence
Jul 26, 2024
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5e3fa68
Implementation of CohortIncidence module.
chrisknoll cde801b
Set runCheckAndFixCommands = TRUE to upload database_id properly.
chrisknoll 6de3c47
Merge remote-tracking branch 'remotes/origin/remove-deps-add-module-i…
chrisknoll cc2b4b4
Added target_outcome_xref to results model.
chrisknoll ede3c9b
runCheckAndFixCommands = TRUE in DatabaseMetaData.R.
chrisknoll File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
tableName,columnName,dataType,isRequired,primaryKey | ||
incidence_summary,ref_id ,int,no,no | ||
incidence_summary,database_id,varchar(255),yes,no | ||
incidence_summary,source_name,varchar(255),no,no | ||
incidence_summary,target_cohort_definition_id,bigint,no,no | ||
incidence_summary,tar_id,bigint,no,no | ||
incidence_summary,subgroup_id,bigint,no,no | ||
incidence_summary,outcome_id,bigint,no,no | ||
incidence_summary,age_group_id,int,no,no | ||
incidence_summary,gender_id,int,no,no | ||
incidence_summary,gender_name,varchar(255),no,no | ||
incidence_summary,start_year,int,no,no | ||
incidence_summary,persons_at_risk_pe,bigint,no,no | ||
incidence_summary,persons_at_risk,bigint,no,no | ||
incidence_summary,person_days_pe,bigint,no,no | ||
incidence_summary,person_days,bigint,no,no | ||
incidence_summary,person_outcomes_pe,bigint,no,no | ||
incidence_summary,person_outcomes,bigint,no,no | ||
incidence_summary,outcomes_pe,bigint,no,no | ||
incidence_summary,outcomes,bigint,no,no | ||
incidence_summary,incidence_proportion_p100p,float,no,no | ||
incidence_summary,incidence_rate_p100py,float,no,no | ||
target_def,ref_id,int,yes,yes | ||
target_def,target_cohort_definition_id,bigint,yes,yes | ||
target_def,target_name,varchar(255),no,no | ||
outcome_def,ref_id,int,yes,yes | ||
outcome_def,outcome_id,bigint,yes,yes | ||
outcome_def,outcome_cohort_definition_id,bigint,no,no | ||
outcome_def,outcome_name,varchar(255),no,no | ||
outcome_def,clean_window,bigint,no,no | ||
outcome_def,excluded_cohort_definition_id,bigint,no,no | ||
tar_def,ref_id,int,yes,yes | ||
tar_def,tar_id,bigint,yes,yes | ||
tar_def,tar_start_with,varchar(10),no,no | ||
tar_def,tar_start_offset,bigint,no,no | ||
tar_def,tar_end_with,varchar(10),no,no | ||
tar_def,tar_end_offset,bigint,no,no | ||
age_group_def,ref_id,int,yes,yes | ||
age_group_def,age_group_id,int,yes,yes | ||
age_group_def,age_group_name,varchar(255),yes,no | ||
age_group_def,min_age,int,no,no | ||
age_group_def,max_age,int,no,no | ||
subgroup_def,ref_id,int,yes,yes | ||
subgroup_def,subgroup_id,bigint,no,yes | ||
subgroup_def,subgroup_name,varchar(255),no,no |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My feeling is that this should be in the package for several reasons:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the questions and comments, @azimov . I'll preface this by saying I did give a lot of consideration between what goes into the package and what is part of the module. The deciding factor was if it was a Strategus concern, it went into the module, if it was a package concern, it goes into the package.
Not necessarily: if the new version of the package produces the same output, from the same input, then I don't think you need a new version of Strategus (just reference a new version in renv.lock). If the analytics change, either by inputs or outputs, I think it would make sense that a different version of Strategus would be necessary to represent the changes in dependencies. I would suggest 2 things on this front: a release of Strategus comes with a published renv.lock file that contains which versions of package dependencies have been tested with the given version of Strategus, and that within a single release of Strategus you may have multiple updates to underlying packages.
While this is true, it can't use the OhdsiShinyModules to view results from the underlying packages at the package level (ie: take the output of CI package and use OhdsiShinyModules to view results). The reason is that the OhdsiShinyModules nave adopted conventions that have been specified by Strategus. 2 Examples: if you want the list of databases, you go to the database meta table (which was created by Strategus; and if you want to get cohort definition names, you go to the
cg_table_prefixcohort_definition
, a table created by CohortGenerator which Strategus enforces that CohortGenerator is part of the Strategus analsyis. See the following:https://github.com/search?q=repo%3AOHDSI%2FOhdsiShinyModules%20prefixcohort_definition&type=code
Based on these decisions, I would suggest that OHDSIShinyModules becomes something like StrategusShinyModules, or we could embed the ShinyModules into the release of Strategus so that you have both the execution of analysis, persistence of results and report viewer all bound to the same version of the software. I fully understand that the original intent of OhdsiShinyModules was intended to view results of the individual HADES packages, but, in my estimation, this principle has been abandoned in favor of Strategus-specific concerns.
I thought about this, but I decided on the approach for 2 reasons: 1) you won't be changing the version of the analysis packages within a single project. and 2) while I would have preferred a migration approach to this, the most expedient way was to use the functionality out of RMM to create a schema base don the results model spec. I'd like to move to a pure-migration approach to managing database schemas (as we do in WebAPI), but based on the nature that the schema shouldn't change within a study, I decided the simplest approach would be to use RMM.
There isn't exactly a published standard on this, and the module layer provides that structure. However, it is consistent with the EvidenseSynthisis package which is another RMM that is contained in Strategus.
This PR follows the Strategus conventions through the use of the common R6 classes for module implementation, and in this way, it is consistent with the other packages. This module layer allows the underlying packages to be independent towards how they can function most effectively (in their own way) while being consistent in execution across all modules.
There are a number of ways that packages are inconsistent: CI handles JSON serialization/deserializtion differently, but it is because serialization via ParallelLogger is broken. Not every package defines inputs via R6 classes. I think there is going to be differences in approaches for many of the HADES packages, and I can understand the desire to keep that consistent, it may be more trouble than it's worth to get down to every possible detail.
I'm not sure this is the case, as @anthonysena wasn't involved in any of the implementation of this PR for incorporation of CI into Strategus. I do expect that we'll have different collaborators as the 'responsible party' for the maintenance of the underlying modules (which may or may not be the underlying package maintainer), and I think this will be coordinated through the Strategus team.
Thanks again for your thoughts and comments. Let me know if I misunderstood anything, and I will be glad to provide more detail.