@@ -8,6 +8,7 @@ status](https://github.com/ropensci/coder/workflows/R-CMD-check/badge.svg)](http
8
8
state and is being actively
9
9
developed.] ( https://www.repostatus.org/badges/latest/active.svg )] ( https://www.repostatus.org/#active )
10
10
[ ![ DOI] ( https://zenodo.org/badge/65975808.svg )] ( https://zenodo.org/badge/latestdoi/65975808 )
11
+ [ ![ status] ( https://joss.theoj.org/papers/49d52b062aa289d7b990b1a0a678d109/status.svg )] ( https://joss.theoj.org/papers/49d52b062aa289d7b990b1a0a678d109 )
11
12
12
13
<!-- README.md is generated from README.Rmd. Please edit that file -->
13
14
@@ -35,8 +36,8 @@ remotes::install_github("eribul/coder")
35
36
36
37
## Typical use case
37
38
38
- - Determining comorbidities before clinical trials
39
- - Discovering adverse events after surgery
39
+ - Determining comorbidities before clinical trials
40
+ - Discovering adverse events after surgery
40
41
41
42
** Patient data:** The initial rationale for the package was to classify
42
43
patient data based on medical coding. A typical use case would consider
@@ -134,7 +135,7 @@ ex_people
134
135
# > 8 Shuemaker, Lauren 2020-03-29
135
136
# > 9 Boucher, Teresa 2020-09-04
136
137
# > 10 Le, Soraiya 2020-08-09
137
- # > # ... with 90 more rows
138
+ # > # … with 90 more rows
138
139
```
139
140
140
141
Those patients (among others) were also recorded in a national patient
@@ -156,7 +157,7 @@ ex_icd10
156
157
# > 8 Sommerville, Dominic 2020-05-03 A227 FALSE
157
158
# > 9 Sommerville, Dominic 2020-09-07 H702 FALSE
158
159
# > 10 Sommerville, Dominic 2019-12-31 X6051 TRUE
159
- # > # ... with 2,366 more rows
160
+ # > # … with 2,366 more rows
160
161
```
161
162
162
163
Using those two data sets, as well as a classification scheme
@@ -175,26 +176,26 @@ ch <-
175
176
176
177
ch
177
178
# > # A tibble: 100 x 25
178
- # > name surgery ` myocardial inf~ ` congestive hea~ ` peripheral vas~
179
+ # > name surgery myocardial.infa… congestive.hear… peripheral.vasc…
179
180
# > <chr> <date> <lgl> <lgl> <lgl>
180
- # > 1 Arch~ 2020-05-25 FALSE FALSE FALSE
181
- # > 2 Awtr~ 2020-09-20 FALSE FALSE FALSE
182
- # > 3 Bamm~ 2020-03-25 FALSE FALSE FALSE
183
- # > 4 Bank~ 2020-06-18 FALSE FALSE FALSE
184
- # > 5 Bega~ 2020-06-19 FALSE FALSE FALSE
185
- # > 6 Beni~ 2020-02-24 FALSE FALSE FALSE
186
- # > 7 Bhat~ 2020-10-12 FALSE FALSE FALSE
187
- # > 8 Bouc~ 2020-09-04 FALSE FALSE TRUE
188
- # > 9 Carn~ 2020-09-11 FALSE FALSE FALSE
189
- # > 10 Chap~ 2020-05-18 FALSE FALSE FALSE
190
- # > # ... with 90 more rows, and 20 more variables: ` cerebrovascular
191
- # > # disease` <lgl>, dementia <lgl>, `chronic pulmonary disease` <lgl>,
192
- # > # `rheumatic disease` <lgl>, `peptic ulcer disease` <lgl>, `mild liver
193
- # > # disease` <lgl>, ` diabetes without complication` <lgl>, ` hemiplegia or
194
- # > # paraplegia` <lgl>, `renal disease` <lgl>, `diabetes complication` <lgl>,
195
- # > # malignancy <lgl>, ` moderate or severe liver disease` <lgl>, ` metastatic
196
- # > # solid tumor` <lgl>, `AIDS/HIV` <lgl >, charlson <dbl>, deyo_ramano <dbl>,
197
- # > # dhoore <dbl>, ghali <dbl>, quan_original <dbl>, quan_updated <dbl>
181
+ # > 1 Chen… 2020-09-29 FALSE FALSE FALSE
182
+ # > 2 Grav… 2020-06-21 FALSE FALSE FALSE
183
+ # > 3 Truj… 2020-06-08 FALSE FALSE FALSE
184
+ # > 4 Simp… 2020-09-10 FALSE FALSE FALSE
185
+ # > 5 Chin… 2020-08-24 FALSE FALSE FALSE
186
+ # > 6 Le, … 2020-03-28 FALSE FALSE FALSE
187
+ # > 7 Kang… 2020-06-30 FALSE FALSE FALSE
188
+ # > 8 Shue… 2020-03-29 FALSE FALSE FALSE
189
+ # > 9 Bouc… 2020-09-04 FALSE FALSE TRUE
190
+ # > 10 Le, … 2020-08-09 FALSE FALSE FALSE
191
+ # > # … with 90 more rows, and 20 more variables: cerebrovascular.disease <lgl>,
192
+ # > # dementia <lgl>, chronic.pulmonary.disease <lgl>, rheumatic. disease <lgl>,
193
+ # > # peptic.ulcer. disease <lgl>, mild.liver. disease <lgl>,
194
+ # > # diabetes. without. complication <lgl>, hemiplegia.or.paraplegia <lgl>,
195
+ # > # renal.disease <lgl>, diabetes.complication <lgl>, malignancy <lgl>,
196
+ # > # moderate.or. severe. liver. disease <lgl>, metastatic.solid.tumor <lgl>,
197
+ # > # AIDS.HIV <lgl>, charlson <dbl >, deyo_ramano <dbl>, dhoore <dbl>,
198
+ # > # ghali <dbl>, quan_original <dbl>, quan_updated <dbl>
198
199
```
199
200
200
201
How many patients were diagnosed with malignancy?
@@ -273,13 +274,13 @@ coder::all_classcodes()
273
274
# > # A tibble: 7 x 3
274
275
# > classcodes regex indices
275
276
# > <chr> <chr> <chr>
276
- # > 1 charlson icd10, icd9cm_deyo, icd9cm_enhan~ "charlson, deyo_ramano, dhoore~
277
+ # > 1 charlson icd10, icd9cm_deyo, icd9cm_enhan… "charlson, deyo_ramano, dhoore…
277
278
# > 2 cps icd10 "only_ordinary"
278
- # > 3 elixhauser icd10, icd10_short, icd9cm, icd9~ "sum_all, sum_all_ahrq, walrav~
279
+ # > 3 elixhauser icd10, icd10_short, icd9cm, icd9… "sum_all, sum_all_ahrq, walrav…
279
280
# > 4 hip_ae icd10, kva, icd10_fracture ""
280
- # > 5 hip_ae_hail~ icd10, kva ""
281
+ # > 5 hip_ae_hail… icd10, kva ""
281
282
# > 6 knee_ae icd10, kva ""
282
- # > 7 rxriskv atc_pratt, atc_caughey, atc_garl~ "pratt, sum_all"
283
+ # > 7 rxriskv atc_pratt, atc_caughey, atc_garl… "pratt, sum_all"
283
284
```
284
285
285
286
# Relation to other packages
0 commit comments