-
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.
Merge branch 'main' of https://github.com/simonsteiger/RheumaComposit…
- Loading branch information
Showing
12 changed files
with
331 additions
and
105 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,44 @@ | ||
# RheumaComposites.jl | ||
|
||
[](https://github.com/simonsteiger/RheumaComposites.jl/actions/workflows/CI.yml?query=branch%3Amain) | ||
[](https://simonsteiger.github.io/RheumaComposites.jl/dev/) | ||
|
||
This package implements the most common composite scores used for evaluating disease activity across different rheumatic diseases: | ||
|
||
- DAS28ESR | ||
- DAS28CRP | ||
- SDAI | ||
- CDAI | ||
- ACR / EULAR Boolean remission | ||
- Revised ACR / EULAR Boolean remission | ||
- Three-item ACR / EULAR Boolean remission | ||
|
||
In addition to composite measures, this package allows testing for further remission definitions: | ||
|
||
- SJC28 remission | ||
- PGA remission | ||
A Julia package for composite scores used in Rheumatology. | ||
|
||
## Getting started | ||
|
||
Since this package is not currently registered with the Julia package registry, you have to install it via url: | ||
This package is not yet registered with the Julia package registry, so you have to install it via url: | ||
|
||
```julia | ||
import Pkg | ||
Pkg.add(url="https://github.com/simonsteiger/RheumaComposites.jl") | ||
``` | ||
|
||
## Examples | ||
|
||
This package is effectively undocumented right now, so I hope that these basic examples give an idea of its use: | ||
Now you're ready to start working with composite scores: | ||
|
||
```julia | ||
using RheumaComposites | ||
|
||
das28 = DAS28ESR(t28=4, s28=3, pga=41u"mm", apr=19u"mm/hr"); | ||
|
||
using RheumaComposites, Unitful | ||
das28 = DAS28ESR(t28=4, s28=3, pga=41u"mm", apr=19u"mm/hr") | ||
score(das28) | ||
# 4.24 | ||
|
||
isremission(das28) | ||
# false | ||
categorise(das28) | ||
``` | ||
|
||
This package uses [Unitful.jl](https://painterqubits.github.io/Unitful.jl/stable/) to ensure correctness between different measurement systems, such as PGA measured in mm or cm or CRP measured in mg/dL or mg/L. | ||
Have a look at the [documentation](https://simonsteiger.github.io/RheumaComposites.jl/dev/) for more examples! | ||
|
||
## Supported composites | ||
|
||
This package currently supports the following composites: | ||
|
||
## Resources | ||
| Rheumatoid Arthritis | Psoriatric Arthritis | Spondyloarthritis | Lupus | ... | | ||
|:---------------------|:---------------------|:------------------|:------|:----| | ||
| DAS28 | | | | ... | | ||
| SDAI | | | | ... | | ||
| CDAI | | | | ... | | ||
| Boolean remission | | | | ... | | ||
|
||
Not much here yet! | ||
Additional subtypes and modifications of these composites are available, e.g., the DAS28CRP or the Revised Boolean Remission. | ||
|
||
The above example generalises to the other constructors, namely `DAS28CRP`, `SDAI`, `BooleanRemission`, and its modifications `revised(x::BooleanRemission)`, `threeitem(x::BooleanRemission)`. | ||
## Contributing | ||
|
||
**NOTE**: This project is a very early work in progress and far from complete. For many functions, documentation is still missing. | ||
If you spot a bug or want to ask for a new feature, please [open an issue](https://github.com/simonsteiger/RheumaComposites.jl/issues) on the GitHub repository. |
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,57 @@ | ||
# API reference | ||
|
||
```@docs | ||
RheumaComposites | ||
``` | ||
|
||
## Types | ||
|
||
```@docs | ||
AbstractComposite | ||
ContinuousComposite | ||
BooleanComposite | ||
ModifiedComposite | ||
DAS28 | ||
DAS28ESR | ||
DAS28CRP | ||
SDAI | ||
CDAI | ||
Faceted | ||
BooleanRemission | ||
Revised | ||
ThreeItem | ||
AbstractComponent | ||
PGA | ||
SJC28 | ||
``` | ||
|
||
## Interface | ||
|
||
```@docs | ||
t28 | ||
s28 | ||
pga | ||
apr | ||
ega | ||
crp | ||
``` | ||
|
||
## Functions | ||
|
||
```@docs | ||
intercept | ||
weight | ||
score | ||
isremission | ||
decompose | ||
categorise | ||
faceted | ||
revised | ||
threeitem | ||
value | ||
``` | ||
|
||
## Index | ||
|
||
```@index | ||
``` |
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,74 @@ | ||
```@meta | ||
EditURL = "../../../examples/basics.jl" | ||
``` | ||
|
||
# Creating Composites | ||
|
||
This tutorial shows you how to set up different composite scores. | ||
|
||
````@example basics | ||
using RheumaComposites | ||
```` | ||
|
||
Creating composites requires specifying the units of some components. | ||
|
||
This protects us from accidentally specifying a DAS28 score on a 0-10 cm visual analogue scale (VAS), or vice versa, an SDAI on a 0-100 mm (VAS). | ||
The only exception are joint counts, which are simply integers. | ||
|
||
We will use [`Unitful.jl`](https://painterqubits.github.io/Unitful.jl/stable/) for specifying units throughout. | ||
|
||
````@example basics | ||
using Unitful | ||
```` | ||
|
||
Creating units is easy thanks to the [`@u_str`](https://painterqubits.github.io/Unitful.jl/stable/manipulations/#Unitful.@u_str) macro. | ||
|
||
````@example basics | ||
18u"mm", 64u"mg/L" | ||
```` | ||
|
||
Converting a unitless value stored in a variable is simple, too: | ||
|
||
````@example basics | ||
x = 7; | ||
x * u"cm" | ||
```` | ||
|
||
Under the hood, the composites will be converted to the unit matching scoring weights and remission cutoffs. | ||
This means that you do not have to remember that SDAI requires a 0-10 cm VAS scale and C-reactive protein in mg/dL, while the DAS28 requires millimeters and mg/L. | ||
|
||
Let's try this by creating a DAS28CRP composite with patient's global assessment measured in centimeters: | ||
|
||
````@example basics | ||
das28_cm = DAS28CRP(t28=1, s28=0, pga=2.2u"cm", apr=4u"mg/L") | ||
```` | ||
|
||
As you can see, centimeters were automatically converted to millimeters. | ||
Providing the same score in millimeters return the same result: | ||
|
||
````@example basics | ||
das28_mm = DAS28CRP(t28=1, s28=0, pga=22u"mm", apr=4u"mg/L") | ||
score(das28_cm) == score(das28_mm) | ||
```` | ||
|
||
This principle holds for all supported composites. | ||
|
||
## Components | ||
|
||
If you are not sure about the component names of a composite, you can check the docstring of that composite for guidance. | ||
To see the docstring, first hit `?` in the REPL, then type the name of the composite, and hit enter. | ||
|
||
This is all we need to explore the most important aspects of many different composite scores! | ||
|
||
````@example basics | ||
sdai = SDAI(s28=3, t28=4, pga=34u"mm", ega=28u"mm", crp=21u"mg/L") | ||
```` | ||
|
||
````@example basics | ||
score(sdai), isremission(sdai), categorise(sdai) | ||
```` | ||
|
||
--- | ||
|
||
*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* | ||
|
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 |
---|---|---|
@@ -1,57 +1,48 @@ | ||
# API reference | ||
|
||
```@docs | ||
RheumaComposites | ||
```@meta | ||
EditURL = "https://github.com/simonsteiger/RheumaComposites.jl/blob/main/README.md" | ||
``` | ||
|
||
## Types | ||
|
||
```@docs | ||
AbstractComposite | ||
ContinuousComposite | ||
BooleanComposite | ||
ModifiedComposite | ||
DAS28 | ||
DAS28ESR | ||
DAS28CRP | ||
SDAI | ||
CDAI | ||
Faceted | ||
BooleanRemission | ||
Revised | ||
ThreeItem | ||
AbstractComponent | ||
PGA | ||
SJC28 | ||
``` | ||
# RheumaComposites.jl | ||
|
||
## Interface | ||
[](https://github.com/simonsteiger/RheumaComposites.jl/actions/workflows/CI.yml?query=branch%3Amain) | ||
[](https://simonsteiger.github.io/RheumaComposites.jl/dev/) | ||
|
||
```@docs | ||
t28 | ||
s28 | ||
pga | ||
apr | ||
ega | ||
crp | ||
``` | ||
A Julia package for composite scores used in Rheumatology. | ||
|
||
## Functions | ||
|
||
```@docs | ||
intercept | ||
weight | ||
score | ||
isremission | ||
decompose | ||
categorise | ||
faceted | ||
revised | ||
threeitem | ||
value | ||
## Getting started | ||
|
||
This package is not yet registered with the Julia package registry, so you have to install it via url: | ||
|
||
```julia | ||
import Pkg | ||
Pkg.add(url="https://github.com/simonsteiger/RheumaComposites.jl") | ||
``` | ||
|
||
## Index | ||
Now you're ready to start working with composite scores: | ||
|
||
```@index | ||
```julia | ||
using RheumaComposites, Unitful | ||
das28 = DAS28ESR(t28=4, s28=3, pga=41u"mm", apr=19u"mm/hr") | ||
score(das28) | ||
isremission(das28) | ||
categorise(das28) | ||
``` | ||
|
||
Have a look at the [documentation](https://simonsteiger.github.io/RheumaComposites.jl/dev/) for more examples! | ||
|
||
## Supported composites | ||
|
||
This package currently supports the following composites: | ||
|
||
| Rheumatoid Arthritis | Psoriatric Arthritis | Spondyloarthritis | Lupus | ... | | ||
|:---------------------|:---------------------|:------------------|:------|:----| | ||
| DAS28 | | | | ... | | ||
| SDAI | | | | ... | | ||
| CDAI | | | | ... | | ||
| Boolean remission | | | | ... | | ||
|
||
Additional subtypes and modifications of these composites are available, e.g., the DAS28CRP or the Revised Boolean Remission. | ||
|
||
## Contributing | ||
|
||
If you spot a bug or want to ask for a new feature, please [open an issue](https://github.com/simonsteiger/RheumaComposites.jl/issues) on the GitHub repository. |
Oops, something went wrong.