Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ docs/*
_pkgdown.yml
^vignettes/articles$
^vignettes/Videos.Rmd
^vignettes/ConstrainedPredictors.Rmd
^doc$
^Meta$
^CRAN-RELEASE$
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ jobs:
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache: always
extra-packages: any::pkgdown, ohdsi/OhdsiRTools
extra-packages: any::pkgdown, ohdsi/OhdsiRTools, any::reactable
needs: website

- uses: lycheeverse/lychee-action@v2
with:
args: --base . --verbose --no-progress --accept '100..=103, 200..=299, 403' './**/*.md' './**/*.Rmd'
args: --base . --verbose --no-progress --accept '100..=103, 200..=299, 403' --exclude https://codecov.io './**/*.md' './**/*.Rmd'

- name: Build site
run: Rscript -e 'pkgdown::build_site_github_pages(new_process = FALSE, install = TRUE)'
Expand Down
9 changes: 2 additions & 7 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
template:
bootstrap: 5
params:
bootswatch: cosmo
bootswatch: cosmo
light-switch: true

development:
Expand All @@ -20,12 +19,8 @@ navbar:
- intro
- reference
- articles
- benchmarks
- predictors
- bestpractice
- clinicalmodels
- news
right: [hades, github]
right: [hades, search, github, lightswitch]
components:
home:
icon: fa-home fa-lg
Expand Down
2 changes: 1 addition & 1 deletion vignettes/BuildingPredictiveModels.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ The T and O cohorts can be found here:
- Ace inhibitors (T): <https://atlas-demo.ohdsi.org/#/cohortdefinition/1770617>
- Angioedema (O) : <https://atlas-demo.ohdsi.org/#/cohortdefinition/1770616>

In depth explanation of cohort creation in ATLAS is out of scope of this vignette but can be found on the OHDSI wiki pages [(link)](https://www.ohdsi.org/web/wiki/doku.php?id=documentation:software:atlas).
In depth explanation of cohort creation in ATLAS is out of scope of this vignette but can be found on the OHDSI wiki pages [(link)](https://github.com/OHDSI/Atlas/wiki).

Note that when a cohort is created in ATLAS the cohortid is needed to extract the data in R. The cohortid can be found at the top of the ATLAS screen, e.g. 1770617 in Figure 6.

Expand Down
170 changes: 103 additions & 67 deletions vignettes/ConstrainedPredictors.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Here we provide a set of phenotypes that can be used as predictors in prediction
These phenotypes can be extracted from the PhenotypeLibrary R package. To install the R package run:

```{r, echo = TRUE, message = FALSE, warning = FALSE, tidy = FALSE, eval=FALSE}
remotes::install_github("ohdsi/PhenotypeLibrary")
remotes::install_github("OHDSI/PhenotypeLibrary")
```

To extract the cohort definition for Alcoholism with an id of 1165, just run:
Expand All @@ -35,69 +35,105 @@ phenotypeDefinitions <- PhenotypeLibrary::getPlCohortDefinitionSet(1152:1215)

### The full set of predictor phenotypes

| Phenotype Name | Disorder classification | OHDSI Phenotype library ID |
|--------------------------------|--------------------|-------------------|
| Alcoholism | Behavioral | 1165 |
| Smoking | Behavioral | 1166 |
| Anemia | Blood | 1188 |
| Osteoarthritis | Bone | 1184 |
| Osteoporosis | Bone | 1185 |
| Cancer | Cancer | 1215 |
| Atrial fibrillation | Cardiovascular | 1160 |
| Congestive heart failure | Cardiovascular | 1154 |
| Coronary artery disease | Cardiovascular | 1162 |
| Heart valve disorder | Cardiovascular | 1172 |
| Hyperlipidemia | Cardiovascular | 1170 |
| Hypertension | Cardiovascular | 1198 |
| Angina | Cardiovascular | 1159 |
| Skin Ulcer | Debility | 1168 |
| Diabetes type 1 | Endocrine | 1193 |
| Diabetes type 2 | Endocrine | 1194 |
| Hypothyroidism | Endocrine | 1171 |
| Obesity | Endocrine | 1179 |
| Gastroesophageal reflux disease (GERD) | GI | 1178 |
| Gastrointestinal (GI) bleed | GI | 1197 |
| Inflammatory bowel disorder (IBD) | GI/Rheumatology | 1180 |
| Hormonal contraceptives | Gynecologic | 1190 |
| Antibiotics Aminoglycosides | Infection | 1201 |
| Antibiotics Carbapenems | Infection | 1202 |
| Antibiotics Cephalosporins | Infection | 1203 |
| Antibiotics Fluoroquinolones | Infection | 1204 |
| Antibiotics Glycopeptides and lipoglycopeptides | Infection | 1205 |
| Antibiotics Macrolides | Infection | 1206 |
| Antibiotics Monobactams | Infection | 1207 |
| Antibiotics Oxazolidinones | Infection | 1208 |
| Antibiotics Penicillins | Infection | 1209 |
| Antibiotics Polypeptides | Infection | 1210 |
| Antibiotics Rifamycins | Infection | 1211 |
| Antibiotics Sulfonamides | Infection | 1212 |
| Antibiotics Streptogramins | Infection | 1213 |
| Antibiotics Tetracyclines | Infection | 1214 |
| Pneumonia | Infection/Respiratory | 1199 |
| Sepsis | Infection | 1176 |
| Urinary tract infection (UTI) | Infection | 1186 |
| Hepatitis | Liver | 1169 |
| Anxiety | Mood | 1189 |
| Depression (MDD) | Mood | 1161 |
| Psychotic disorder | Mood | 1175 |
| Antiepileptics (pain) | Neurology/Pain | 1183 |
| Seizure | Neurology | 1153 |
| Hemorrhagic stroke | Neurology/Vascular | 1156 |
| Non-hemorrhagic stroke | Neurology/Vascular | 1155 |
| Acetaminophen prescription | Pain/Infection | 1187 |
| Low back pain | Pain | 1173 |
| Neuropathy | Pain/Neurology | 1174 |
| Opioids | Pain | 1182 |
| Acute kidney injury | Kidney | 1163 |
| Chronic kidney disease | Kidney | 1191 |
| Asthma | Respiratory | 1164 |
| Chronic obstructive pulmonary disorder (COPD) | Respiratory | 1192 |
| Dyspnea | Respiratory | 1195 |
| Respiratory failure | Respiratory | 1177 |
| Sleep apnea | Respiratory | 1167 |
| Rheumatoid arthritis | Rheumatology | 1200 |
| Steroids | Rheumatology/Pain/Pulmonary | 1181 |
| Peripheral vascular disease | Vascular | 1157 |
| Aspirin | Vascular | 1158 |
| Deep vein thrombosis (DVT) | Vascular | 1152 |
| Edema | Vascular | 1196 |
```{r show-table, eval=TRUE, echo=FALSE, tidy = FALSE}
df <- tibble::tribble(
~"Phenotype Name", ~"Disorder classification", ~"OHDSI Phenotype library ID",
"Alcoholism", "Behavioral", 1165,
"Smoking", "Behavioral", 1166,
"Anemia", "Blood", 1188,
"Osteoarthritis", "Bone", 1184,
"Osteoporosis", "Bone", 1185,
"Cancer", "Cancer", 1215,
"Atrial fibrillation", "Cardiovascular", 1160,
"Congestive heart failure", "Cardiovascular", 1154,
"Coronary artery disease", "Cardiovascular", 1162,
"Heart valve disorder", "Cardiovascular", 1172,
"Hyperlipidemia", "Cardiovascular", 1170,
"Hypertension", "Cardiovascular", 1198,
"Angina", "Cardiovascular", 1159,
"Skin Ulcer", "Debility", 1168,
"Diabetes type 1", "Endocrine", 1193,
"Diabetes type 2", "Endocrine", 1194,
"Hypothyroidism", "Endocrine", 1171,
"Obesity", "Endocrine", 1179,
"Gastroesophageal reflux disease (GERD)", "GI", 1178,
"Gastrointestinal (GI) bleed", "GI", 1197,
"Inflammatory bowel disorder (IBD)", "GI/Rheumatology", 1180,
"Hormonal contraceptives", "Gynecologic", 1190,
"Antibiotics Aminoglycosides", "Infection", 1201,
"Antibiotics Carbapenems", "Infection", 1202,
"Antibiotics Cephalosporins", "Infection", 1203,
"Antibiotics Fluoroquinolones", "Infection", 1204,
"Antibiotics Glycopeptides and lipoglycopeptides", "Infection", 1205,
"Antibiotics Macrolides", "Infection", 1206,
"Antibiotics Monobactams", "Infection", 1207,
"Antibiotics Oxazolidinones", "Infection", 1208,
"Antibiotics Penicillins", "Infection", 1209,
"Antibiotics Polypeptides", "Infection", 1210,
"Antibiotics Rifamycins", "Infection", 1211,
"Antibiotics Sulfonamides", "Infection", 1212,
"Antibiotics Streptogramins", "Infection", 1213,
"Antibiotics Tetracyclines", "Infection", 1214,
"Pneumonia", "Infection/Respiratory", 1199,
"Sepsis", "Infection", 1176,
"Urinary tract infection (UTI)", "Infection", 1186,
"Hepatitis", "Liver", 1169,
"Anxiety", "Mood", 1189,
"Depression (MDD)", "Mood", 1161,
"Psychotic disorder", "Mood", 1175,
"Antiepileptics (pain)", "Neurology/Pain", 1183,
"Seizure", "Neurology", 1153,
"Hemorrhagic stroke", "Neurology/Vascular", 1156,
"Non-hemorrhagic stroke", "Neurology/Vascular", 1155,
"Acetaminophen prescription", "Pain/Infection", 1187,
"Low back pain", "Pain", 1173,
"Neuropathy", "Pain/Neurology", 1174,
"Opioids", "Pain", 1182,
"Acute kidney injury", "Kidney", 1163,
"Chronic kidney disease", "Kidney", 1191,
"Asthma", "Respiratory", 1164,
"Chronic obstructive pulmonary disorder (COPD)", "Respiratory", 1192,
"Dyspnea", "Respiratory", 1195,
"Respiratory failure", "Respiratory", 1177,
"Sleep apnea", "Respiratory", 1167,
"Rheumatoid arthritis", "Rheumatology", 1200,
"Steroids", "Rheumatology/Pain/Pulmonary", 1181,
"Peripheral vascular disease", "Vascular", 1157,
"Aspirin", "Vascular", 1158,
"Deep vein thrombosis (DVT)", "Vascular", 1152,
"Edema", "Vascular", 1196
)

#Build a reactableTheme that *reads* Bootstrap CSS vars
bs_table_theme <- reactable::reactableTheme(
backgroundColor = "var(--bs-table-bg)",
color = "var(--bs-table-color)",
searchInputStyle = list(
backgroundColor = "var(--bs-table-bg)",
color = "var(--bs-table-color)"
)
)
reactable::reactable(
df,
theme = bs_table_theme,
searchable = TRUE, # add the search box
defaultPageSize = 30, # rows per page
highlight = TRUE, # highlight row under cursor
bordered = TRUE, # add table borders
striped = TRUE, # zebra-striped rows
columns = list(
`Phenotype Name` = reactable::colDef(
name = "Phenotype",
minWidth = 200
),
`Disorder classification` = reactable::colDef(
name = "Category"
),
`OHDSI Phenotype library ID` = reactable::colDef(
name = "Library ID",
defaultSortOrder = "desc",
align = "right"
)
)
)
```
Loading