-
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.
- Moves contents of `statistics` to `builders` - Moves base_table_builder from root to builders
- Loading branch information
1 parent
126a384
commit a0ffe16
Showing
18 changed files
with
62 additions
and
15 deletions.
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
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,42 @@ | ||
# SQL builders | ||
|
||
This folder contains various builders, either exposed as part of the package | ||
API or configurable via toml config files, that are intended to be used | ||
as starting points in studies. | ||
|
||
## Class-based builders | ||
|
||
These are intended to be used directly via python | ||
|
||
### BaseTableBuilder(base_table_builder.py) | ||
|
||
All builders inherit from this class. This handles the prepare/execute | ||
hooks that Cumulus Library uses to invoke queries against your | ||
database. If you're writing a custom builder, base it off this and | ||
implement `prepare_queries()`. | ||
|
||
### CountsBuilder(counts.py) | ||
|
||
The CountsBuilder provides conveniences for generating aggregate tables | ||
by summarizing data at the FHIR resource level. These are the basic | ||
output units of Cumulus Library. | ||
|
||
As long as your table has the appropriate resource refs (always the | ||
ref of the resource in question, and occasionally also either subject | ||
or encounter refs), all you need is to specify the columns you want | ||
and optional join clauses, and it will handle constructing the | ||
counts query for you | ||
|
||
## Config-based Builders | ||
|
||
These builders are not meant to be imported as base classes in python | ||
directly (though you could if you wanted). Instead, these provide | ||
a configuration file format, in toml, which you can use to customize | ||
a strict set of build steps. | ||
|
||
### Propensity score matching (psm.py) | ||
|
||
This handles generating a cohort around a specific variable of interest. | ||
See the | ||
[PSM documentation](https://docs.smarthealthit.org/cumulus/library/statistics/propensity-score-matching.html) | ||
for more info |
File renamed without changes.
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,5 @@ | ||
# Deprecation notice | ||
|
||
The statistics module has been combined with other tables builders into | ||
the new `builders` module. Backwards compatibility for importing from | ||
`statistics` will be removed in a future version. |
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 @@ | ||
from cumulus_library.builders import counts, psm, statistics_templates |
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 @@ | ||
from cumulus_library.builders import counts |
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 @@ | ||
from cumulus_library.builders.statistics_templates import counts_templates, psm_templates |
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