Skip to content

Comments

Datetime support#214

Open
alex-odysseus wants to merge 33 commits intoOHDSI:masterfrom
odysseusinc:datetime-support-2.15
Open

Datetime support#214
alex-odysseus wants to merge 33 commits intoOHDSI:masterfrom
odysseusinc:datetime-support-2.15

Conversation

@alex-odysseus
Copy link

Implementing a design idea: OHDSI/Atlas#2886

There were two new model elements introduced on the Cohort-level ("use datetime data for all Criteria in a Cohort") and on the Criteria-level ("use datetime data only for a Criteria where hours/minutes/seconds were explicitly chosen by a User")

When a flag is "true" on the Cohort-level there is an explicit logic activated so that all Criteria use the datetime columns when constructing the SELECT part of an SQL statement (by default this option should be 'false' so that all Cohorts designed without the datetime support option are not impacted)

When a flag is "false" on the Cohort-level it is possible that for some of the Criteria there will be an explicit datetime logic defined (there is a dropdown list on UI with the time units days/hours/minutes/seconds) resulting in two types of SQL statements by means of target columns selection (date or datetime)

To have the feature fully effective the result schema tables 'cohort' and 'cohort_cache' should be adjusted so that cohort_start_date and cohort_end_date are of a type which can store time information

jcnamendiOdysseus and others added 30 commits December 20, 2023 19:40
# Conflicts:
#	src/main/java/org/ohdsi/circe/check/checkers/Comparisons.java
#	src/main/java/org/ohdsi/circe/check/checkers/ExitCriteriaDaysOffsetCheck.java
#	src/main/java/org/ohdsi/circe/check/checkers/FirstTimeInHistoryCheck.java
#	src/main/java/org/ohdsi/circe/check/checkers/RangeCheck.java
#	src/main/java/org/ohdsi/circe/cohortdefinition/CohortExpressionQueryBuilder.java
#	src/main/java/org/ohdsi/circe/cohortdefinition/CollapseSettings.java
#	src/main/java/org/ohdsi/circe/cohortdefinition/CustomEraStrategy.java
#	src/main/java/org/ohdsi/circe/cohortdefinition/DateOffsetStrategy.java
#	src/main/java/org/ohdsi/circe/cohortdefinition/IntervalUnit.java
#	src/main/java/org/ohdsi/circe/cohortdefinition/Window.java
#	src/main/resources/resources/cohortdefinition/printfriendly/cohortExpression.ftl
#	src/main/resources/resources/cohortdefinition/printfriendly/criteriaTypes.ftl
#	src/main/resources/resources/cohortdefinition/printfriendly/inputTypes.ftl
#	src/main/resources/resources/cohortdefinition/sql/customEraStrategy.sql
#	src/main/resources/resources/cohortdefinition/sql/dateOffsetStrategy.sql
#	src/main/resources/resources/cohortdefinition/sql/generateCohort.sql
#	src/test/java/org/ohdsi/circe/check/checkers/CriteriaCheckValueTest.java
#	src/test/java/org/ohdsi/circe/check/checkers/DeathTimeWindowCheckTest.java
#	src/test/java/org/ohdsi/circe/cohortdefinition/builders/CriteriaUtils.java
#	src/test/java/org/ohdsi/circe/cohortdefinition/printfriendly/PrintFriendlyTest.java
Added dateAdjust to print friendly and other corrections.
# Conflicts:
#	src/main/resources/resources/cohortdefinition/printfriendly/cohortExpression.ftl
This reverts commit f819d5e.
# Conflicts:
#	src/main/java/org/ohdsi/circe/check/checkers/Comparisons.java
#	src/main/java/org/ohdsi/circe/check/checkers/ExitCriteriaDaysOffsetCheck.java
#	src/main/java/org/ohdsi/circe/check/checkers/FirstTimeInHistoryCheck.java
#	src/main/java/org/ohdsi/circe/check/checkers/RangeCheck.java
#	src/main/java/org/ohdsi/circe/cohortdefinition/CohortExpressionQueryBuilder.java
#	src/main/java/org/ohdsi/circe/cohortdefinition/CollapseSettings.java
#	src/main/java/org/ohdsi/circe/cohortdefinition/CustomEraStrategy.java
#	src/main/java/org/ohdsi/circe/cohortdefinition/DateOffsetStrategy.java
#	src/main/java/org/ohdsi/circe/cohortdefinition/IntervalUnit.java
#	src/main/java/org/ohdsi/circe/cohortdefinition/Window.java
#	src/main/resources/resources/cohortdefinition/printfriendly/cohortExpression.ftl
#	src/main/resources/resources/cohortdefinition/printfriendly/criteriaTypes.ftl
#	src/main/resources/resources/cohortdefinition/printfriendly/inputTypes.ftl
#	src/main/resources/resources/cohortdefinition/sql/customEraStrategy.sql
#	src/main/resources/resources/cohortdefinition/sql/dateOffsetStrategy.sql
#	src/main/resources/resources/cohortdefinition/sql/generateCohort.sql
#	src/test/java/org/ohdsi/circe/check/checkers/CriteriaCheckValueTest.java
#	src/test/java/org/ohdsi/circe/check/checkers/DeathTimeWindowCheckTest.java
#	src/test/java/org/ohdsi/circe/cohortdefinition/builders/CriteriaUtils.java
#	src/test/java/org/ohdsi/circe/cohortdefinition/printfriendly/PrintFriendlyTest.java
…le resolving the SELECT clause in SQL builders
…alues from Criteria are available in the result cohort table
alex-odysseus added 3 commits August 7, 2024 15:41
# Conflicts:
#	src/main/resources/resources/cohortdefinition/sql/customEraStrategy.sql
#	src/main/resources/resources/cohortdefinition/sql/generateCohort.sql
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.

2 participants