Skip to content
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

Refactor Strategus module approach #145

Merged
merged 40 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
ace0bd6
burn it all down
anthonysena Jun 11, 2024
e685e78
Prelim interface and test harness
anthonysena Jun 12, 2024
c4e5881
Use pre-release of CG
anthonysena Jun 28, 2024
0fa7129
Seperate settings function into own class
anthonysena Jun 28, 2024
b5b989e
Adding settings functions for CG
anthonysena Jun 28, 2024
f10e1bd
Modifying properties; adding results data model creation
anthonysena Jul 1, 2024
eea5e5f
Add CI module; remove tests
anthonysena Jul 1, 2024
8c95223
refactoring again
anthonysena Jul 2, 2024
49deb2e
Adding basic logging; continue to remove other code
anthonysena Jul 2, 2024
8fae65d
Basic upload and results viewing
anthonysena Jul 2, 2024
b608e4c
Cleanup
anthonysena Jul 2, 2024
632ff16
Adding CohortMethod module
anthonysena Jul 2, 2024
376b60c
Handle DatabaseMetaData table creation and upload
anthonysena Jul 2, 2024
8027322
Separate modules into own R files
anthonysena Jul 3, 2024
bff21e9
Add CD Module
anthonysena Jul 3, 2024
6aa56c3
Add Characterization module (not working)
anthonysena Jul 3, 2024
2593629
Add PLP Module (not working)
anthonysena Jul 3, 2024
f854f10
Add SCCS Module (working)
anthonysena Jul 3, 2024
e2d3d72
Adding EvidenceSynthesis module (not working)
anthonysena Jul 3, 2024
24981c6
Re-enable module-level logging
anthonysena Jul 8, 2024
0a4dc52
Add ES rdms to project; move database meta rdms
anthonysena Jul 8, 2024
83158d3
PLP Module fixes
anthonysena Jul 8, 2024
6859daa
Remove clearLoggers from Execution.R
anthonysena Jul 9, 2024
758c0d3
Add context specific module settings functions
anthonysena Jul 9, 2024
e8caa38
Settings for results data model creation
anthonysena Jul 9, 2024
15ade78
Add uploadResultsSettings and refactor
anthonysena Jul 10, 2024
fccd80d
Update function documentation and address R CMD checks
anthonysena Jul 10, 2024
5faa282
Add Characterization module (working); fix bugs
anthonysena Jul 10, 2024
57711dd
# This is a combination of 5 commits.
anthonysena Jul 10, 2024
35c6bc6
Change CG declaration; remove 4.2.3 specific tests
anthonysena Jul 10, 2024
6a7f145
Add back unit tests; fix bugs
anthonysena Jul 12, 2024
0e8fb74
Removing stale documentation
anthonysena Jul 12, 2024
6eb78a0
Fix missing deps
anthonysena Jul 12, 2024
9bdc095
Add CirceR
anthonysena Jul 12, 2024
87b33b4
Remove logging from within modules
anthonysena Jul 15, 2024
ccc08e7
Revise to use pre-release shiny viewer
anthonysena Jul 15, 2024
1a68ae5
Refactor settings for results management
anthonysena Jul 15, 2024
6c3e37e
Fix upload bug with Char module
anthonysena Jul 18, 2024
00be102
Implementation of CohortIncidence module. (#147)
chrisknoll Jul 26, 2024
6baf9d9
Adjustments from testing
anthonysena Jul 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions R/Module-PatientLevelPrediction.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ PatientLevelPredictionModule <- R6::R6Class(
)

jobContext$settings <- private$.setCovariateSchemaTable(
modelDesignList = jobContext$settings,
modelDesignList = jobContext$settings$modelDesignList,
cohortDatabaseSchema = jobContext$moduleExecutionSettings$workDatabaseSchema,
cohortTable = jobContext$moduleExecutionSettings$cohortTableNames$cohortTable
)
Expand Down Expand Up @@ -97,8 +97,6 @@ PatientLevelPredictionModule <- R6::R6Class(
#' @param resultsExecutionSettings The results execution settings
uploadResults = function(resultsConnectionDetails, analysisSpecifications, resultsExecutionSettings) {
super$uploadResults(resultsConnectionDetails, analysisSpecifications, resultsExecutionSettings)
conn <- DatabaseConnector::connect(resultsConnectionDetails)
on.exit(DatabaseConnector::disconnect(conn))

databaseSchemaSettings <- PatientLevelPrediction::createDatabaseSchemaSettings(
resultSchema = resultsExecutionSettings$resultsDatabaseSchema,
Expand All @@ -109,7 +107,7 @@ PatientLevelPredictionModule <- R6::R6Class(
resultsFolder <- private$jobContext$moduleExecutionSettings$resultsSubFolder
PatientLevelPrediction::insertCsvToDatabase(
csvFolder = resultsFolder,
conn = conn,
connectionDetails = resultsConnectionDetails,
databaseSchemaSettings = databaseSchemaSettings,
modelSaveLocation = file.path(resultsFolder, "dbmodels"),
csvTableAppend = ""
Expand Down
10 changes: 4 additions & 6 deletions extras/R6ClassFun.R
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ for (exposureOfInterestId in exposureOfInterestIds) {
}
}

# Analysis settings ------------------------------------------------------------
getDbSccsDataArgs <- SelfControlledCaseSeries::createGetDbSccsDataArgs(
studyStartDate = "",
studyEndDate = "",
Expand Down Expand Up @@ -297,7 +296,6 @@ sccsAnalysis1 <- SelfControlledCaseSeries::createSccsAnalysis(

sccsAnalysisList <- list(sccsAnalysis1)

# SCCS module specs ------------------------------------------------------------
sccsModuleSpecifications <- sccsModuleSettingsCreator$createModuleSpecifications(
sccsAnalysisList = sccsAnalysisList,
exposuresOutcomeList = exposuresOutcomeList,
Expand Down Expand Up @@ -357,13 +355,14 @@ plpModuleSpecifications <- plpModuleSettingsCreator$createModuleSpecifications(
analysisSpecifications <- createEmptyAnalysisSpecificiations() |>
addSharedResources(cohortSharedResourcesSpecifications) |>
addSharedResources(ncoCohortSharedResourceSpecifications) |>
# WORKING
addModuleSpecifications(cgModuleSettings) |>
addModuleSpecifications(cdModuleSpecifications) |>
addModuleSpecifications(cmModuleSpecifications) |>
addModuleSpecifications(sccsModuleSpecifications)
# NOT WORKING
addModuleSpecifications(sccsModuleSpecifications) |>
anthonysena marked this conversation as resolved.
Show resolved Hide resolved
addModuleSpecifications(plpModuleSpecifications)
# NOT WORKING
#addModuleSpecifications(cModuleSpecifications) |>
#addModuleSpecifications(plpModuleSpecifications)
# MOSTLY WORKING
#addModuleSpecifications(ciModuleSettings) |>

Expand Down Expand Up @@ -391,7 +390,6 @@ connectionDetails <- Eunomia::getEunomiaConnectionDetails(
overwrite = TRUE
)
#debugonce(Strategus::execute)
#debugonce(CohortDiagnostics:::computeCohortCounts)
Strategus::execute(
analysisSpecifications = analysisSpecifications,
executionSettings = executionSettings,
Expand Down
Loading