-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Draft: stop unwanted overwriting * Add first test * Increase coverage Fixes: #90
- Loading branch information
1 parent
30ec076
commit 25014df
Showing
4 changed files
with
123 additions
and
1 deletion.
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,47 @@ | ||
[adtl] | ||
name = "overwrite" | ||
description = "Example using groupBy on data with multiple rows per subject" | ||
|
||
[adtl.tables.visit] | ||
kind = "groupBy" | ||
groupBy = "subject_id" | ||
aggregation = "lastNotNull" | ||
|
||
[visit] | ||
|
||
[visit.subject_id] | ||
field = "subjid" | ||
description = "Subject ID" | ||
|
||
[visit.earliest_admission] | ||
combinedType = "min" | ||
fields = [ | ||
{ field = "first_admit" }, | ||
] | ||
|
||
[visit.start_date] | ||
combinedType = "firstNonNull" | ||
fields = [ | ||
{ field = "first_admit" }, | ||
{ field = "enrolment" }, | ||
] | ||
|
||
[visit.icu_admission_date] | ||
combinedType = "list" | ||
excludeWhen = "none" | ||
fields = [ | ||
{field = "icu_admission_date"} | ||
] | ||
|
||
[visit.treatment_antiviral_type] | ||
combinedType = "set" | ||
excludeWhen = "none" | ||
fields = [ | ||
{ field = "daily_antiviral_type___1", values = { 1 = "Ribavirin" } }, | ||
{ field = "daily_antiviral_type___2", values = { 1 = "Lopinavir" } }, | ||
{ field = "daily_antiviral_type___3", values = { 1 = "Interferon" } }, | ||
{ field = "overall_antiviral_dc___1", values = { 1 = "Ribavirin" } }, | ||
{ field = "overall_antiviral_dc___2", values = { 1 = "Lopinavir" } }, | ||
{ field = "overall_antiviral_dc___3", values = { 1 = "Interferon" } }, | ||
] | ||
|
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,11 @@ | ||
subjid,redcap,first_admit,enrolment,icu_admission_date,daily_antiviral_type___1,daily_antiviral_type___2,daily_antiviral_type___3,overall_antiviral_dc___1,overall_antiviral_dc___2,overall_antiviral_dc___3 | ||
1,admit,2023-11-20,2023-11-23,,0,0,0,0,0,0 | ||
1,discharge,,,,0,0,0,1,0,1 | ||
1,day1,2023-11-19,,,1,0,0,0,0,0 | ||
1,day2,,,,1,0,0,0,0,0 | ||
2,admit,,2022-11-23,,0,0,0,0,0,0 | ||
2,discharge,,2020-11-23,2020-11-25,0,0,0,0,0,0 | ||
2,day1,,,2020-11-30,0,1,0,0,0,0 | ||
3,admit,,2020-02-20,,0,0,0,0,0,0 | ||
3,discharge,,,,0,0,0,0,1,1 | ||
3,day1,,,,1,0,0,0,0,0 |
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