Skip to content

Commit

Permalink
Simplify: use SUMMARISE_LEVEL envvar only in preprocessing
Browse files Browse the repository at this point in the history
Just rely on column name in app
  • Loading branch information
milanmlft committed Nov 20, 2024
1 parent 8ec2195 commit 2880c08
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 20 deletions.
16 changes: 7 additions & 9 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@ DATA_VOLUME_PATH=./data/test_data/internal
SHINY_PORT: 3838

# For preprocessing
PREPROCESS_DB_NAME= # name of the source database
PREPROCESS_HOST= # host address for the source database
PREPROCESS_PORT= # port on which to connect to the source database
PREPROCESS_DB_USERNAME= # username for the source database
PREPROCESS_DB_PASSWORD= # password for the source database
PREPROCESS_DB_CDM_SCHEMA= # Schema name in the database to connect the OMOP CDM to
PREPROCESS_DB_NAME= # name of the source database
PREPROCESS_HOST= # host address for the source database
PREPROCESS_PORT= # port on which to connect to the source database
PREPROCESS_DB_USERNAME= # username for the source database
PREPROCESS_DB_PASSWORD= # password for the source database
PREPROCESS_DB_CDM_SCHEMA= # Schema name in the database to connect the OMOP CDM to
PREPROCESS_SUMMARISE_LEVEL=monthly # Level to summarise record counts at (monthly or quarterly)

# Low-frequency replacement
LOW_FREQUENCY_THRESHOLD=5
LOW_FREQUENCY_REPLACEMENT=2.5

# Level to summarise record counts at (monthly or quarterly)
SUMMARISE_LEVEL=monthly

# For testing
TEST_DB_PATH=./data-raw/test_db/eunomia
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
EUNOMIA_DATA_FOLDER: /mnt/preprocessing/data-raw/test_db
LOW_FREQUENCY_THRESHOLD: ${LOW_FREQUENCY_THRESHOLD}
LOW_FREQUENCY_REPLACEMENT: ${LOW_FREQUENCY_REPLACEMENT}
SUMMARISE_LEVEL: ${SUMMARISE_LEVEL}
SUMMARISE_LEVEL: ${PREPROCESS_SUMMARISE_LEVEL}
command: ["R", "-e", "omopcat.preprocessing::preprocess()"]
volumes:
- ${DATA_VOLUME_PATH}:/mnt/preprocessing/data
Expand All @@ -47,7 +47,6 @@ services:
OMOPCAT_DATA_PATH: /etc/omopcat/data
LOW_FREQUENCY_THRESHOLD: ${LOW_FREQUENCY_THRESHOLD}
LOW_FREQUENCY_REPLACEMENT: ${LOW_FREQUENCY_REPLACEMENT}
SUMMARISE_LEVEL: ${SUMMARISE_LEVEL}
volumes:
- ${DATA_VOLUME_PATH}:/etc/omopcat/data
ports:
Expand Down
16 changes: 7 additions & 9 deletions public.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@ DATA_VOLUME_PATH=./data/test_data/public
SHINY_PORT: 3839

# For preprocessing
PREPROCESS_DB_NAME= # name of the source database
PREPROCESS_HOST= # host address for the source database
PREPROCESS_PORT= # port on which to connect to the source database
PREPROCESS_DB_USERNAME= # username for the source database
PREPROCESS_DB_PASSWORD= # password for the source database
PREPROCESS_DB_CDM_SCHEMA= # Schema name in the database to connect the OMOP CDM to
PREPROCESS_DB_NAME= # name of the source database
PREPROCESS_HOST= # host address for the source database
PREPROCESS_PORT= # port on which to connect to the source database
PREPROCESS_DB_USERNAME= # username for the source database
PREPROCESS_DB_PASSWORD= # password for the source database
PREPROCESS_DB_CDM_SCHEMA= # Schema name in the database to connect the OMOP CDM to
PREPROCESS_SUMMARISE_LEVEL=quarterly # Level to summarise record counts at (monthly or quarterly)

# Low-frequency replacement
LOW_FREQUENCY_THRESHOLD=10
LOW_FREQUENCY_REPLACEMENT=5

# Level to summarise record counts at (monthly or quarterly)
SUMMARISE_LEVEL=quarterly

# For testing
TEST_DB_PATH=./data-raw/test_db/eunomia

0 comments on commit 2880c08

Please sign in to comment.