Skip to content

Commit a0bbc9b

Browse files
authored
Merge pull request #266 from OHDSI/develop
Release v3.6.0
2 parents f4536fb + 8e70152 commit a0bbc9b

87 files changed

Lines changed: 1041 additions & 280 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/R_CMD_check_Hades.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
2727

2828
env:
29+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
2930
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
3031
RSPM: ${{ matrix.config.rspm }}
3132
CDM5_ORACLE_CDM_SCHEMA: ${{ secrets.CDM5_ORACLE_CDM54_SCHEMA }}
@@ -48,7 +49,20 @@ jobs:
4849
CDM5_REDSHIFT_PASSWORD: ${{ secrets.CDM5_REDSHIFT_PASSWORD }}
4950
CDM5_REDSHIFT_SERVER: ${{ secrets.CDM5_REDSHIFT_SERVER }}
5051
CDM5_REDSHIFT_USER: ${{ secrets.CDM5_REDSHIFT_USER }}
51-
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
52+
CDM_SNOWFLAKE_CDM53_SCHEMA: ${{ secrets.CDM_SNOWFLAKE_CDM53_SCHEMA }}
53+
CDM_SNOWFLAKE_OHDSI_SCHEMA: ${{ secrets.CDM_SNOWFLAKE_OHDSI_SCHEMA }}
54+
CDM_SNOWFLAKE_PASSWORD: ${{ secrets.CDM_SNOWFLAKE_PASSWORD }}
55+
CDM_SNOWFLAKE_CONNECTION_STRING: ${{ secrets.CDM_SNOWFLAKE_CONNECTION_STRING }}
56+
CDM_SNOWFLAKE_USER: ${{ secrets.CDM_SNOWFLAKE_USER }}
57+
CDM5_SPARK_USER: ${{ secrets.CDM5_SPARK_USER }}
58+
CDM5_SPARK_PASSWORD: ${{ secrets.CDM5_SPARK_PASSWORD }}
59+
CDM5_SPARK_CONNECTION_STRING: ${{ secrets.CDM5_SPARK_CONNECTION_STRING }}
60+
CDM5_SPARK_CDM_SCHEMA: ${{ secrets.CDM5_SPARK_CDM_SCHEMA }}
61+
CDM5_SPARK_OHDSI_SCHEMA: ${{ secrets.CDM5_SPARK_OHDSI_SCHEMA }}
62+
CDM_BIG_QUERY_CONNECTION_STRING: ${{ secrets.CDM_BIG_QUERY_CONNECTION_STRING }}
63+
CDM_BIG_QUERY_KEY_FILE: ${{ secrets.CDM_BIG_QUERY_KEY_FILE }}
64+
CDM_BIG_QUERY_CDM_SCHEMA: ${{ secrets.CDM_BIG_QUERY_CDM_SCHEMA }}
65+
CDM_BIG_QUERY_OHDSI_SCHEMA: ${{ secrets.CDM_BIG_QUERY_OHDSI_SCHEMA }}
5266

5367
steps:
5468
- uses: actions/checkout@v2

DESCRIPTION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: FeatureExtraction
22
Type: Package
33
Title: Generating Features for a Cohort
4-
Version: 3.5.2
5-
Date: 2024-05-01
4+
Version: 3.6.0
5+
Date: 2024-07-15
66
Authors@R: c(
77
person("Martijn", "Schuemie", , "schuemie@ohdsi.org", role = c("aut")),
88
person("Marc", "Suchard", role = c("aut")),
@@ -23,7 +23,7 @@ Imports:
2323
dplyr,
2424
rJava,
2525
jsonlite,
26-
SqlRender (>= 1.6.0),
26+
SqlRender (>= 1.18.0),
2727
ParallelLogger (>= 2.0.2),
2828
cli,
2929
pillar,

NEWS.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
FeatureExtraction 3.6.0
2+
=======================
3+
4+
New Features:
5+
- Support for observation / measurement values (#67)
6+
- Add additional DB testing servers github action: Spark, Snowflake, BigQuery (#247)
7+
8+
Bug fixes:
9+
- Inconsistent Handling of cohortIds in getDbCovariateData Depending on aggregated Setting (#229)
10+
- minor typo in specification file (#260)
11+
- Update custom covariate builder vignette (#258)
12+
113
FeatureExtraction 3.5.2
214
=======================
315

R/DefaultCovariateSettings.R

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
#' medium term window. (analysis ID 403)
163163
#' @param useDrugEraShortTerm One covariate per drug in the drug_era
164164
#' table overlapping with any part of the
165-
#' short window. (analysis ID 404)
165+
#' short term window. (analysis ID 404)
166166
#' @param useDrugEraOverlapping One covariate per drug in the drug_era
167167
#' table overlapping with the end of the
168168
#' risk window. (analysis ID 405)
@@ -173,7 +173,7 @@
173173
#' table starting in the medium term
174174
#' window. (analysis ID 407)
175175
#' @param useDrugEraStartShortTerm One covariate per drug in the drug_era
176-
#' table starting in the long short window.
176+
#' table starting in the short term window.
177177
#' (analysis ID 408)
178178
#' @param useDrugGroupEraAnyTimePrior One covariate per drug rolled up to ATC
179179
#' groups in the drug_era table overlapping
@@ -269,6 +269,18 @@
269269
#' measurements are below, within, or above
270270
#' normal range in the short term window.
271271
#' (analysis ID 712)
272+
#' @param useMeasurementValueAsConceptAnyTimePrior One covariate per measurement-value
273+
#' concept combination any time prior to
274+
#' index. (analysis ID 713)
275+
#' @param useMeasurementValueAsConceptLongTerm One covariate per measurement-value
276+
#' concept combination in the long term
277+
#' window. (analysis ID 714)
278+
#' @param useMeasurementValueAsConceptMediumTerm One covariate per measurement-value
279+
#' concept combination in the medium term
280+
#' window. (analysis ID 715)
281+
#' @param useMeasurementValueAsConceptShortTerm One covariate per measurement-value
282+
#' concept combination in the short term
283+
#' window. (analysis ID 716)
272284
#' @param useObservationAnyTimePrior One covariate per observation in the
273285
#' observation table any time prior to
274286
#' index. (analysis ID 801)
@@ -281,6 +293,18 @@
281293
#' @param useObservationShortTerm One covariate per observation in the
282294
#' observation table in the short term
283295
#' window. (analysis ID 804)
296+
#' @param useObservationValueAsConceptAnyTimePrior One covariate per observation-value
297+
#' concept combination any time prior to
298+
#' index. (analysis ID 805)
299+
#' @param useObservationValueAsConceptLongTerm One covariate per observation-value
300+
#' concept combination in the long term
301+
#' window. (analysis ID 806)
302+
#' @param useObservationValueAsConceptMediumTerm One covariate per observation-value
303+
#' concept combination in the medium term
304+
#' window. (analysis ID 807)
305+
#' @param useObservationValueAsConceptShortTerm One covariate per observation-value
306+
#' concept combination in the short term
307+
#' window. (analysis ID 808)
284308
#' @param useCharlsonIndex The Charlson comorbidity index (Romano
285309
#' adaptation) using all conditions prior
286310
#' to the window end. (analysis ID 901)
@@ -455,11 +479,19 @@
455479
#' useMeasurementRangeGroupAnyTimePrior = FALSE,
456480
#' useMeasurementRangeGroupLongTerm = TRUE,
457481
#' useMeasurementRangeGroupMediumTerm = FALSE,
458-
#' useMeasurementRangeGroupShortTerm = FALSE,
482+
#' useMeasurementRangeGroupShortTerm = TRUE,
483+
#' useMeasurementValueAsConceptAnyTimePrior = FALSE,
484+
#' useMeasurementValueAsConceptLongTerm = TRUE,
485+
#' useMeasurementValueAsConceptMediumTerm = FALSE,
486+
#' useMeasurementValueAsConceptShortTerm = TRUE,
459487
#' useObservationAnyTimePrior = FALSE,
460488
#' useObservationLongTerm = TRUE,
461489
#' useObservationMediumTerm = FALSE,
462490
#' useObservationShortTerm = TRUE,
491+
#' useObservationValueAsConceptAnyTimePrior = FALSE,
492+
#' useObservationValueAsConceptLongTerm = TRUE,
493+
#' useObservationValueAsConceptMediumTerm = FALSE,
494+
#' useObservationValueAsConceptShortTerm = TRUE,
463495
#' useCharlsonIndex = TRUE,
464496
#' useDcsi = TRUE,
465497
#' useChads2 = TRUE,
@@ -574,10 +606,18 @@ createCovariateSettings <- function(useDemographicsGender = FALSE,
574606
useMeasurementRangeGroupLongTerm = FALSE,
575607
useMeasurementRangeGroupMediumTerm = FALSE,
576608
useMeasurementRangeGroupShortTerm = FALSE,
609+
useMeasurementValueAsConceptAnyTimePrior = FALSE,
610+
useMeasurementValueAsConceptLongTerm = FALSE,
611+
useMeasurementValueAsConceptMediumTerm = FALSE,
612+
useMeasurementValueAsConceptShortTerm = FALSE,
577613
useObservationAnyTimePrior = FALSE,
578614
useObservationLongTerm = FALSE,
579615
useObservationMediumTerm = FALSE,
580616
useObservationShortTerm = FALSE,
617+
useObservationValueAsConceptAnyTimePrior = FALSE,
618+
useObservationValueAsConceptLongTerm = FALSE,
619+
useObservationValueAsConceptMediumTerm = FALSE,
620+
useObservationValueAsConceptShortTerm = FALSE,
581621
useCharlsonIndex = FALSE,
582622
useDcsi = FALSE,
583623
useChads2 = FALSE,

R/DefaultTemporalCovariateSettings.R

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@
6969
#' the drug_era table starting in the time window.
7070
#' (analysis ID 403)
7171
#' @param useDrugEraGroupOverlap One covariate per drug rolled up to ATC groups in
72-
#' the drug_era table overlapping with any part of
73-
#' the time window. (analysis ID 404)
72+
#' the drug_era table overlapping with any part of the
73+
#' time window. (analysis ID 404)
7474
#' @param useProcedureOccurrence One covariate per procedure in the
7575
#' procedure_occurrence table in the time window.
7676
#' (analysis ID 501)
@@ -85,8 +85,14 @@
8585
#' @param useMeasurementRangeGroup Covariates indicating whether measurements are
8686
#' below, within, or above normal range within the time
8787
#' period. (analysis ID 703)
88+
#' @param useMeasurementValueAsConcept One covariate per measurement-value concept
89+
#' combination within the time period. (analysis ID
90+
#' 704)
8891
#' @param useObservation One covariate per observation in the observation
8992
#' table in the time window. (analysis ID 801)
93+
#' @param useObservationValueAsConcept One covariate per observation-value concept
94+
#' combination within the time period. (analysis ID
95+
#' 802)
9096
#' @param useCharlsonIndex The Charlson comorbidity index (Romano adaptation)
9197
#' using all conditions prior to the window end.
9298
#' (analysis ID 901)
@@ -168,7 +174,9 @@
168174
#' useMeasurement = TRUE,
169175
#' useMeasurementValue = FALSE,
170176
#' useMeasurementRangeGroup = TRUE,
177+
#' useMeasurementValueAsConcept = TRUE,
171178
#' useObservation = TRUE,
179+
#' useObservationValueAsConcept = TRUE,
172180
#' useCharlsonIndex = TRUE,
173181
#' useDcsi = TRUE,
174182
#' useChads2 = TRUE,
@@ -219,7 +227,9 @@ createTemporalCovariateSettings <- function(useDemographicsGender = FALSE,
219227
useMeasurement = FALSE,
220228
useMeasurementValue = FALSE,
221229
useMeasurementRangeGroup = FALSE,
230+
useMeasurementValueAsConcept = FALSE,
222231
useObservation = FALSE,
232+
useObservationValueAsConcept = FALSE,
223233
useCharlsonIndex = FALSE,
224234
useDcsi = FALSE,
225235
useChads2 = FALSE,

R/GetCovariates.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@
5858
#' @param covariateSettings Either an object of type \code{covariateSettings} as created using one
5959
#' of the createCovariate functions, or a list of such objects.
6060
#' @param aggregated Should aggregate statistics be computed instead of covariates per
61-
#' cohort entry?
61+
#' cohort entry? If aggregated is set to FALSE, the results returned will be based
62+
#' on each subject_id and cohort_start_date in your cohort table. If your cohort
63+
#' contains multiple entries for the same subject_id (due to different cohort_start_date values),
64+
#' you must carefully set the rowIdField so you can identify the patients properly.
65+
#' See issue #229 for more discussion on this parameter.
6266
#' @param minCharacterizationMean The minimum mean value for characterization output. Values below this will be cut off from output. This
6367
#' will help reduce the file size of the characterization output, but will remove information
6468
#' on covariates that have very low values. The default is 0.

R/GetDefaultCovariates.R

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,15 @@ getDbDefaultCovariateData <- function(connection,
171171
andromedaTableName = "covariateRef",
172172
snakeCaseToCamelCase = TRUE
173173
)
174+
collisions <- covariateData$covariateRef %>%
175+
filter(collisions > 0) %>%
176+
collect()
177+
if (nrow(collisions) > 0) {
178+
warning(sprintf(
179+
"Collisions in covariate IDs detected for post-coordinated concepts with covariate IDs %s",
180+
paste(collisions$covariateId, paste = ", ")
181+
))
182+
}
174183

175184
# Analysis reference
176185
sql <- SqlRender::translate(

docs/404.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/articles/CreatingCovariatesBasedOnOtherCohorts.html

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/articles/CreatingCovariatesUsingCohortAttributes.html

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)