@@ -31,16 +31,19 @@ coverage](https://codecov.io/gh/andrewallenbruce/forager/branch/master/graph/bad
31
31
32
32
<!-- badges: end -->
33
33
34
- ## Installation
34
+ <br >
35
+
36
+ ## :package : Installation
35
37
36
- You can install the development version of ` forager ` from
37
- [ GitHub] ( https://github.com/ ) with:
38
+ You can install ` forager ` from [ GitHub] ( https://github.com/ ) with:
38
39
39
40
``` r
40
41
# install.packages("pak")
41
42
pak :: pak(" andrewallenbruce/forager" )
42
43
```
43
44
45
+ ## :beginner : Usage
46
+
44
47
``` r
45
48
library(tidyverse )
46
49
library(clock )
@@ -53,66 +56,69 @@ library(fuimus)
53
56
54
57
``` r
55
58
(x <- mock_claims(15000 ))
56
- # > # A tibble: 15,000 × 10
57
- # > claimid payer charges balance date_ser…¹ date_rel…² date_sub…³ date_acc…⁴
58
- # > <chr> <fct> <dbl> <dbl> <date> <date> <date> <date>
59
- # > 1 00008 Oscar 115. 115. 2024-05-26 2024-06-04 2024-06-08 2024-06-14
60
- # > 2 00343 American 284. 0 2024-05-26 2024-06-17 2024-06-19 2024-06-23
61
- # > 3 00389 Wellcare 325. 325. 2024-05-26 2024-06-11 2024-06-19 2024-06-28
62
- # > 4 00473 Medicaid 35. 35. 2024-05-26 2024-06-05 2024-06-08 2024-06-20
63
- # > 5 00604 Humana 50. 50. 2024-05-26 2024-06-03 2024-06-10 2024-06-18
64
- # > 6 01138 Omaha 107. 0 2024-05-26 2024-06-07 2024-06-08 2024-06-15
65
- # > 7 01161 CVS Aetna 27. 27. 2024-05-26 2024-06-01 2024-06-03 2024-06-08
66
- # > 8 01216 Lincoln … 73. 73. 2024-05-26 2024-05-26 2024-05-27 2024-06-07
67
- # > 9 01262 Centene 97. 0 2024-05-26 2024-05-27 2024-05-29 2024-05-31
68
- # > 10 01284 Medicaid 43. 43. 2024-05-26 2024-06-05 2024-06-10 2024-06-21
69
- # > # ℹ 14,990 more rows
70
- # > # ℹ abbreviated names: ¹date_service, ²date_release, ³date_submission,
71
- # > # ⁴date_acceptance
72
- # > # ℹ 2 more variables: date_adjudication <date>, date_reconciliation <date>
73
59
```
74
60
61
+ #> # A tibble: 15,000 × 10
62
+ #> claimid payer charges balance date_ser…¹ date_rel…² date_sub…³ date_acc…⁴
63
+ #> <chr> <fct> <dbl> <dbl> <date> <date> <date> <date>
64
+ #> 1 00135 American 90. 90. 2024-07-06 2024-07-21 2024-07-26 2024-08-11
65
+ #> 2 00159 New York… 87. 0 2024-07-06 2024-07-16 2024-07-18 2024-08-03
66
+ #> 3 00180 Medicare 187. 187. 2024-07-06 2024-07-20 2024-07-25 2024-08-06
67
+ #> 4 00195 BCBS WY 174. 174. 2024-07-06 2024-07-22 2024-07-25 2024-08-03
68
+ #> 5 00199 Athene 32. 32. 2024-07-06 2024-07-13 2024-07-17 2024-07-25
69
+ #> 6 00251 BCBS WY 260. 260. 2024-07-06 2024-07-10 2024-07-13 2024-07-23
70
+ #> 7 00369 HCSC 104. 104. 2024-07-06 2024-07-16 2024-07-20 2024-07-28
71
+ #> 8 00373 Athene 144. 144. 2024-07-06 2024-07-19 2024-07-20 2024-07-24
72
+ #> 9 00481 Humana 119. 0 2024-07-06 2024-07-08 2024-07-09 2024-07-14
73
+ #> 10 00522 Molina 102. 102. 2024-07-06 2024-07-19 2024-07-20 2024-07-30
74
+ #> # ℹ 14,990 more rows
75
+ #> # ℹ abbreviated names: ¹date_service, ²date_release, ³date_submission,
76
+ #> # ⁴date_acceptance
77
+ #> # ℹ 2 more variables: date_adjudication <date>, date_reconciliation <date>
78
+
75
79
<br >
76
80
77
81
``` r
78
82
(x <- prep_claims(x ))
79
- # > # A tibble: 15,000 × 13
80
- # > claimid payer charges balance date_service aging_bin dar days_rel…¹
81
- # > <chr> <fct> <dbl> <dbl> <date> <fct> <dbl> <dbl>
82
- # > 1 00001 Oscar 166. 166. 2024-05-17 0-30 11 0
83
- # > 2 00002 Medicare 23. 23. 2024-04-03 0-30 20 2
84
- # > 3 00003 UnitedHealth 212. 212. 2024-03-27 0-30 18 2
85
- # > 4 00004 GuideWell 84. 84. 2024-05-13 31-60 34 6
86
- # > 5 00005 Lincoln Nat'l 194. 194. 2024-04-03 0-30 29 5
87
- # > 6 00006 HCSC 98. 0 2024-04-04 31-60 34 8
88
- # > 7 00007 Mass Mutual 37. 37. 2024-05-13 31-60 37 7
89
- # > 8 00008 Oscar 115. 115. 2024-05-26 31-60 37 9
90
- # > 9 00009 BCBS MI 190. 190. 2024-04-06 31-60 42 10
91
- # > 10 00010 CVS Aetna 57. 57. 2024-04-10 31-60 40 5
92
- # > # ℹ 14,990 more rows
93
- # > # ℹ abbreviated name: ¹days_release
94
- # > # ℹ 5 more variables: days_submission <dbl>, days_acceptance <dbl>,
95
- # > # days_adjudication <dbl>, days_reconciliation <dbl>, dates <list>
96
83
```
97
84
85
+ #> # A tibble: 15,000 × 13
86
+ #> claimid payer charges balance date_service aging_bin dar days_rel…¹
87
+ #> <chr> <fct> <dbl> <dbl> <date> <fct> <dbl> <dbl>
88
+ #> 1 00001 Humana 87. 87. 2024-06-11 0-30 16 1
89
+ #> 2 00002 Cigna 216. 0 2024-05-12 0-30 29 1
90
+ #> 3 00003 Equitable 140. 140. 2024-06-07 0-30 24 3
91
+ #> 4 00004 Highmark 185. 185. 2024-05-21 0-30 27 3
92
+ #> 5 00005 HCSC 72. 72. 2024-04-27 0-30 29 6
93
+ #> 6 00006 BCBS WY 124. 124. 2024-05-03 31-60 31 7
94
+ #> 7 00007 Athene 230. 230. 2024-04-12 0-30 30 8
95
+ #> 8 00008 New York Life 43. 43. 2024-06-09 31-60 50 12
96
+ #> 9 00009 New York Life 256. 256. 2024-04-20 31-60 34 17
97
+ #> 10 00010 Lincoln Nat'l 236. 236. 2024-05-05 31-60 49 12
98
+ #> # ℹ 14,990 more rows
99
+ #> # ℹ abbreviated name: ¹days_release
100
+ #> # ℹ 5 more variables: days_submission <dbl>, days_acceptance <dbl>,
101
+ #> # days_adjudication <dbl>, days_reconciliation <dbl>, dates <list>
102
+
98
103
<br >
99
104
100
105
``` r
101
106
summarise_claims(x ) | >
102
107
glimpse()
103
- # > Rows: 1
104
- # > Columns: 9
105
- # > $ n_claims <int> 15000
106
- # > $ gross_charges <dbl> 1998810
107
- # > $ ending_ar <dbl> 1315266
108
- # > $ mean_release <dbl> 8.0004
109
- # > $ mean_submission <dbl> 3.01
110
- # > $ mean_acceptance <dbl> 7.518067
111
- # > $ mean_adjudication <dbl> 14.9988
112
- # > $ mean_reconciliation <dbl> 2.23959
113
- # > $ mean_dar <dbl> 34.2838
114
108
```
115
109
110
+ #> Rows: 1
111
+ #> Columns: 9
112
+ #> $ n_claims <int> 15000
113
+ #> $ gross_charges <dbl> 1986374
114
+ #> $ ending_ar <dbl> 1323904
115
+ #> $ mean_release <dbl> 8.010267
116
+ #> $ mean_submission <dbl> 3.013267
117
+ #> $ mean_acceptance <dbl> 7.467933
118
+ #> $ mean_adjudication <dbl> 15.0508
119
+ #> $ mean_reconciliation <dbl> 2.227745
120
+ #> $ mean_dar <dbl> 34.28633
121
+
116
122
``` r
117
123
x | >
118
124
group_by(
@@ -123,22 +129,23 @@ x |>
123
129
summarise_claims() | >
124
130
arrange(payer ) | >
125
131
select(year , month , payer , n_claims , ending_ar , mean_dar )
126
- # > # A tibble: 81 × 6
127
- # > year month payer n_claims ending_ar mean_dar
128
- # > <int> <int> <fct> <int> <dbl> <dbl>
129
- # > 1 2024 3 Oscar 195 18188. 34.
130
- # > 2 2024 4 Oscar 181 15630. 34.
131
- # > 3 2024 5 Oscar 148 14025. 34.
132
- # > 4 2024 3 Medicare 186 16966. 34.
133
- # > 5 2024 4 Medicare 208 17676. 34.
134
- # > 6 2024 5 Medicare 157 13925. 36.
135
- # > 7 2024 3 UnitedHealth 179 15377. 33.
136
- # > 8 2024 4 UnitedHealth 182 17476. 34.
137
- # > 9 2024 5 UnitedHealth 156 14550. 34.
138
- # > 10 2024 3 GuideWell 202 19187. 34.
139
- # > # ℹ 71 more rows
140
132
```
141
133
134
+ #> # A tibble: 108 × 6
135
+ #> year month payer n_claims ending_ar mean_dar
136
+ #> <int> <int> <fct> <int> <dbl> <dbl>
137
+ #> 1 2024 4 Humana 131 11829. 35.
138
+ #> 2 2024 5 Humana 197 16190. 34.
139
+ #> 3 2024 6 Humana 209 18879. 34.
140
+ #> 4 2024 7 Humana 39 2893. 33.
141
+ #> 5 2024 4 Cigna 106 10455. 34.
142
+ #> 6 2024 5 Cigna 208 17423. 34.
143
+ #> 7 2024 6 Cigna 190 17407. 33.
144
+ #> 8 2024 7 Cigna 44 3708. 36.
145
+ #> 9 2024 4 Equitable 125 11415. 35.
146
+ #> 10 2024 5 Equitable 202 13414. 35.
147
+ #> # ℹ 98 more rows
148
+
142
149
<br >
143
150
144
151
``` r
@@ -151,22 +158,23 @@ x |>
151
158
summarise_claims() | >
152
159
arrange(payer ) | >
153
160
select(year , qtr , payer , n_claims , ending_ar , mean_dar )
154
- # > # A tibble: 54 × 6
155
- # > year qtr payer n_claims ending_ar mean_dar
156
- # > <int> <int> <fct> <int> <dbl> <dbl>
157
- # > 1 2024 1 Oscar 195 18188. 34.
158
- # > 2 2024 2 Oscar 329 29655. 34.
159
- # > 3 2024 1 Medicare 186 16966. 34.
160
- # > 4 2024 2 Medicare 365 31601. 35.
161
- # > 5 2024 1 UnitedHealth 179 15377. 33.
162
- # > 6 2024 2 UnitedHealth 338 32026. 34.
163
- # > 7 2024 1 GuideWell 202 19187. 34.
164
- # > 8 2024 2 GuideWell 356 31347. 35.
165
- # > 9 2024 1 Lincoln Nat'l 199 17432. 34.
166
- # > 10 2024 2 Lincoln Nat'l 392 36733. 34.
167
- # > # ℹ 44 more rows
168
161
```
169
162
163
+ #> # A tibble: 54 × 6
164
+ #> year qtr payer n_claims ending_ar mean_dar
165
+ #> <int> <int> <fct> <int> <dbl> <dbl>
166
+ #> 1 2024 2 Humana 537 46899. 34.
167
+ #> 2 2024 3 Humana 39 2893. 33.
168
+ #> 3 2024 2 Cigna 504 45285. 34.
169
+ #> 4 2024 3 Cigna 44 3708. 36.
170
+ #> 5 2024 2 Equitable 519 41301. 35.
171
+ #> 6 2024 3 Equitable 40 2298. 35
172
+ #> 7 2024 2 Highmark 489 41779. 35.
173
+ #> 8 2024 3 Highmark 29 2757. 34.
174
+ #> 9 2024 2 HCSC 547 52913. 34.
175
+ #> 10 2024 3 HCSC 41 3544. 34.
176
+ #> # ℹ 44 more rows
177
+
170
178
## Days in AR Calculation
171
179
172
180
> Monthly
@@ -183,26 +191,27 @@ tibble(
183
191
earb ,
184
192
dart = 35 ,
185
193
by = " month" )
186
- # > # A tibble: 12 × 15
187
- # > date gct earb ndip adc dart dar dar_pass ratio_id…¹ ratio_ac…²
188
- # > <date> <int> <int> <int> <dbl> <dbl> <dbl> <lgl> <dbl> <dbl>
189
- # > 1 2024-01-01 2.5e5 2.9e5 31 8080. 35 36. FALSE 1.1 1.2
190
- # > 2 2024-02-01 2.5e5 2.9e5 29 8624. 35 34. TRUE 1.2 1.2
191
- # > 3 2024-03-01 2.5e5 2.9e5 31 8062. 35 36. FALSE 1.1 1.2
192
- # > 4 2024-04-01 2.5e5 2.9e5 30 8320. 35 35. TRUE 1.2 1.2
193
- # > 5 2024-05-01 2.5e5 2.9e5 31 8026. 35 36. FALSE 1.1 1.2
194
- # > 6 2024-06-01 2.5e5 2.9e5 30 8310. 35 35. TRUE 1.2 1.2
195
- # > 7 2024-07-01 2.5e5 2.9e5 31 8053. 35 36. FALSE 1.1 1.2
196
- # > 8 2024-08-01 2.5e5 2.9e5 31 8041. 35 36. FALSE 1.1 1.2
197
- # > 9 2024-09-01 2.5e5 2.9e5 30 8324. 35 35. TRUE 1.2 1.2
198
- # > 10 2024-10-01 2.5e5 2.9e5 31 8084. 35 36. FALSE 1.1 1.2
199
- # > 11 2024-11-01 2.5e5 2.9e5 30 8353. 35 35. TRUE 1.2 1.2
200
- # > 12 2024-12-01 2.5e5 2.9e5 31 8040. 35 36. FALSE 1.1 1.2
201
- # > # ℹ abbreviated names: ¹ratio_ideal, ²ratio_actual
202
- # > # ℹ 5 more variables: ratio_diff <dbl>, earb_target <dbl>, earb_diff <dbl>,
203
- # > # gct_pct <dbl>, earb_pct <dbl>
204
194
```
205
195
196
+ #> # A tibble: 12 × 15
197
+ #> date gct earb ndip adc dart dar dar_pass ratio_id…¹ ratio_ac…²
198
+ #> <date> <int> <int> <int> <dbl> <dbl> <dbl> <lgl> <dbl> <dbl>
199
+ #> 1 2024-01-01 2.5e5 2.9e5 31 8021. 35 36. FALSE 1.1 1.2
200
+ #> 2 2024-02-01 2.5e5 2.9e5 29 8604. 35 34. TRUE 1.2 1.2
201
+ #> 3 2024-03-01 2.5e5 2.9e5 31 8066. 35 36. FALSE 1.1 1.2
202
+ #> 4 2024-04-01 2.5e5 2.9e5 30 8339. 35 35. TRUE 1.2 1.2
203
+ #> 5 2024-05-01 2.5e5 2.9e5 31 8047. 35 36. FALSE 1.1 1.2
204
+ #> 6 2024-06-01 2.5e5 2.9e5 30 8329. 35 35. TRUE 1.2 1.2
205
+ #> 7 2024-07-01 2.5e5 2.9e5 31 8099. 35 36. FALSE 1.1 1.2
206
+ #> 8 2024-08-01 2.5e5 2.9e5 31 8061. 35 36. FALSE 1.1 1.2
207
+ #> 9 2024-09-01 2.5e5 2.9e5 30 8302. 35 35. TRUE 1.2 1.2
208
+ #> 10 2024-10-01 2.5e5 2.9e5 31 8049. 35 36. FALSE 1.1 1.2
209
+ #> 11 2024-11-01 2.5e5 2.9e5 30 8313. 35 35. TRUE 1.2 1.2
210
+ #> 12 2024-12-01 2.5e5 2.9e5 31 8054. 35 36. FALSE 1.1 1.2
211
+ #> # ℹ abbreviated names: ¹ratio_ideal, ²ratio_actual
212
+ #> # ℹ 5 more variables: ratio_diff <dbl>, earb_target <dbl>, earb_diff <dbl>,
213
+ #> # gct_pct <dbl>, earb_pct <dbl>
214
+
206
215
<br >
207
216
208
217
> Quarterly
@@ -219,25 +228,34 @@ tibble(
219
228
earb ,
220
229
dart = 35 ,
221
230
by = " quarter" )
222
- # > # A tibble: 4 × 15
223
- # > date earb gct ndip adc dart dar dar_pass ratio_id…¹ ratio_ac…²
224
- # > <date> <int> <int> <int> <dbl> <dbl> <dbl> <lgl> <dbl> <dbl>
225
- # > 1 2024-03-01 285562 7.5e5 91 8249. 35 35. TRUE 0.38 0.38
226
- # > 2 2024-06-01 285591 7.5e5 91 8253. 35 35. TRUE 0.38 0.38
227
- # > 3 2024-09-01 285469 7.5e5 92 8149. 35 35. FALSE 0.38 0.38
228
- # > 4 2024-12-01 285639 7.5e5 92 8131. 35 35. FALSE 0.38 0.38
229
- # > # ℹ abbreviated names: ¹ratio_ideal, ²ratio_actual
230
- # > # ℹ 5 more variables: ratio_diff <dbl>, earb_target <dbl>, earb_diff <dbl>,
231
- # > # gct_pct <dbl>, earb_pct <dbl>
232
231
```
233
232
234
- ## Code of Conduct
233
+ #> # A tibble: 4 × 15
234
+ #> date earb gct ndip adc dart dar dar_pass ratio_id…¹ ratio_ac…²
235
+ #> <date> <int> <int> <int> <dbl> <dbl> <dbl> <lgl> <dbl> <dbl>
236
+ #> 1 2024-03-01 284676 7.5e5 91 8245. 35 35. TRUE 0.38 0.38
237
+ #> 2 2024-06-01 285645 7.5e5 91 8262. 35 35. TRUE 0.38 0.38
238
+ #> 3 2024-09-01 285768 7.5e5 92 8162. 35 35. FALSE 0.38 0.38
239
+ #> 4 2024-12-01 285689 7.5e5 92 8133. 35 35. FALSE 0.38 0.38
240
+ #> # ℹ abbreviated names: ¹ratio_ideal, ²ratio_actual
241
+ #> # ℹ 5 more variables: ratio_diff <dbl>, earb_target <dbl>, earb_diff <dbl>,
242
+ #> # gct_pct <dbl>, earb_pct <dbl>
243
+
244
+ ------------------------------------------------------------------------
245
+
246
+ ## :balance_scale : Code of Conduct
235
247
236
248
Please note that the ` forager ` project is released with a [ Contributor
237
249
Code of
238
250
Conduct] ( https://andrewallenbruce.github.io/forager/CODE_OF_CONDUCT.html ) .
239
251
By contributing to this project, you agree to abide by its terms.
240
252
253
+ ## :classical_building : Governance
254
+
255
+ This project is primarily maintained by [ Andrew
256
+ Bruce] ( https://github.com/andrewallenbruce ) . Other authors may
257
+ occasionally assist with some of these duties.
258
+
241
259
[ ^ 1 ] : < https://dictionary.cambridge.org/dictionary/english/forager >
242
260
243
261
[ ^ 2 ] : Me.
0 commit comments