-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
167 lines (122 loc) · 3.67 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
echo = TRUE,
message = FALSE,
warning = FALSE,
error = TRUE,
comment = "#>",
dpi = 300,
out.width = "100%",
fig.path = "man/figures/README-"
)
```
# forager <a href="#"><img src="man/figures/logo.svg" align="right" width="25%" min-width="120px"/></a>
> ***Forager** (noun)*
>
> *A person that goes from place to place searching for things that they
> can eat or use.*[^1]
> ***Ager** (noun)*
>
> *A person that calls from place to place searching for payment before
> insurance can refuse.*[^2]
<br>
<!-- badges: start -->
![GitHub R package version](https://img.shields.io/github/r-package/v/andrewallenbruce/forager?style=flat-square&logo=R&label=Package&color=%23192a38)
[![R-CMD-check](https://github.com/andrewallenbruce/forager/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/andrewallenbruce/forager/actions/workflows/R-CMD-check.yaml)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://choosealicense.com/licenses/mit/)
[![Code Size](https://img.shields.io/github/languages/code-size/andrewallenbruce/forager.svg)](https://github.com/andrewallenbruce/forager)
[![last commit](https://img.shields.io/github/last-commit/andrewallenbruce/forager.svg)](https://github.com/andrewallenbruce/forager/commits/master)
[![Codecov test coverage](https://codecov.io/gh/andrewallenbruce/forager/branch/master/graph/badge.svg)](https://app.codecov.io/gh/andrewallenbruce/forager?branch=master)
<!-- badges: end -->
<br>
## :package: Installation
You can install `forager` from [GitHub](https://github.com/) with:
``` r
# install.packages("pak")
pak::pak("andrewallenbruce/forager")
```
## :beginner: Usage
```{r setup, echo=TRUE, message=FALSE, warning=FALSE}
library(tidyverse)
library(clock)
library(ymd)
library(forager)
library(fuimus)
```
## The Lifecycle of a Claim
```{r, echo=TRUE, warning=FALSE}
(x <- mock_claims(15000))
```
<br>
```{r echo=TRUE}
(x <- prep_claims(x))
```
<br>
```{r}
summarise_claims(x) |>
glimpse()
```
```{r echo=TRUE}
x |>
group_by(
year = year(date_service),
month = month(date_service),
payer
) |>
summarise_claims() |>
arrange(payer) |>
select(year, month, payer, n_claims, ending_ar, mean_dar)
```
<br>
```{r echo=TRUE}
x |>
group_by(
year = year(date_service),
qtr = quarter(date_service),
payer
) |>
summarise_claims() |>
arrange(payer) |>
select(year, qtr, payer, n_claims, ending_ar, mean_dar)
```
## Days in AR Calculation
> Monthly
```{r echo=TRUE}
tibble(
date = date_build(2024, 1:12),
gct = rpois(12, 250000:400000),
earb = rpois(12, 290000:400000)
) |>
avg_dar(
date,
gct,
earb,
dart = 35,
by = "month")
```
<br>
> Quarterly
```{r echo=TRUE}
tibble(
date = date_build(2024, 1:12),
gct = rpois(12, 250000:400000),
earb = rpois(12, 285500:400000)
) |>
avg_dar(
date,
gct,
earb,
dart = 35,
by = "quarter")
```
------------------------------------------------------------------------------
## :balance_scale: Code of Conduct
Please note that the `forager` project is released with a [Contributor Code of Conduct](https://andrewallenbruce.github.io/forager/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.
## :classical_building: Governance
This project is primarily maintained by [Andrew Bruce](https://github.com/andrewallenbruce). Other authors may occasionally assist with some of these duties.
[^1]: <https://dictionary.cambridge.org/dictionary/english/forager>
[^2]: Me.