API
RheumaComposites.RheumaComposites
RheumaComposites.AbstractComposite
RheumaComposites.BASDAI
RheumaComposites.BooleanComposite
RheumaComposites.BooleanRemission
RheumaComposites.CDAI
RheumaComposites.ContinuousComposite
RheumaComposites.DAPSA
RheumaComposites.DAS28
RheumaComposites.DAS28CRP
RheumaComposites.DAS28ESR
RheumaComposites.Faceted
RheumaComposites.ModifiedComposite
RheumaComposites.Partial
RheumaComposites.Revised
RheumaComposites.SDAI
Base.names
Base.values
Base.values
Base.values
RheumaComposites.categorise
RheumaComposites.categorise
RheumaComposites.categorise
RheumaComposites.decompose
RheumaComposites.decompose
RheumaComposites.faceted
RheumaComposites.intercept
RheumaComposites.isremission
RheumaComposites.isremission
RheumaComposites.named_vals
RheumaComposites.offsets
RheumaComposites.partial
RheumaComposites.revised
RheumaComposites.root
RheumaComposites.score
RheumaComposites.threeitem
RheumaComposites.units
RheumaComposites.uvalues
RheumaComposites.weight
RheumaComposites.RheumaComposites Module
RheumaComposites
A Julia package for composite scores in Rheumatology.
sourceRheumaComposites.AbstractComposite Type
AbstractComposite
Abstract type that specifies the category of composites.
It is either ContinuousComposite
, BooleanComposite
, or ModifiedComposite
.
RheumaComposites.BASDAI Type
BASDAI(; tjc, sjc, pga, jpn[; units])
Store component measures of the Bath Ankylosing Spondylitis Disease Activity Index, or BASDAI.
Optionally specify the units for each component using Unitful.@u_str
.
Components
q1
(cm) fatigue or tirednessq2
(cm) AS neck, back, or hip painq3
(cm) pain or swelling in other jointsq4
(cm) discomfort from tender areasq5
(cm) morning stiffness severityq6
(cm) morning stiffness duration
Categories
The only cutoff I am aware of checks if a person's BASDAI is below 4. This is currently implemented in categorise
and isremission
, making them effectively redundant. Feel free to open an issue on the GitHub page of this package if you know about other cutoffs.
External links
See also score
.
RheumaComposites.BooleanComposite Type
BooleanComposite <: AbstractComposite
Abstract type for composites only implementing a definition of remission.
See also isremission
, ContinuousComposite
.
RheumaComposites.BooleanRemission Type
BooleanRemission(; tjc, sjc, pga, crp[; units])
Store the components of the original ACR/EULAR Boolean remission.
Optionally specify the units for each component using Unitful.@u_str
.
Components
tjc
28 tender joint countsjc
28 swollen joint countpga
(cm) patient's global assessmentcrp
(mg/dL) C-reactive protein
See also isremission
.
RheumaComposites.CDAI Type
CDAI(; tjc, sjc, pga, ega[; units])
Store component measures of the Clinical Disease Activity Index, or CDAI.
Optionally specify the units for each component using Unitful.@u_str
.
Components
tjc
28 tender joint countsjc
28 swollen joint countpga
(cm) patient's global assessmentega
(cm) evaluator's global assessment
Categories
2.8 = Remission 10.0 = Low 22.0 = Moderate 22.0 = High
External links
See also score
, categorise
, isremission
.
RheumaComposites.ContinuousComposite Type
ContinuousComposite <: AbstractComposite
Abstract type for composites whose scores are floating point numbers.
See also score
, BooleanComposite
.
RheumaComposites.DAPSA Type
DAPSA(; tjc, sjc, pga, jpn[; units])
Store component measures of the index for Disease Activity in Psoriatic Arthritis, or DAPSA.
Optionally specify the units for each component using Unitful.@u_str
.
Components
tjc
66 tender joint countsjc
68 swollen joint countpga
(cm) patient's global assessmentjpn
(cm) joint pain
Categories
4.0 = Remission 14.0 = Low 28.0 = Moderate 28.0 = High
External links
See also score
, categorise
, isremission
.
RheumaComposites.DAS28CRP Type
DAS28CRP(; tjc, sjc, pga, apr[; units])
Store the component measures of the DAS28CRP.
Optionally specify the units for each component using Unitful.@u_str
.
Components
tjc
28 tender joint countsjc
28 swollen joint countpga
(cm) patient's global assessmentapr
(mg/L) active phase reactant, here CRP
Categories
2.4 = Remission 2.9 = Low 4.6 = Moderate 4.6 = High
External links
See also score
, categorise
, isremission
.
RheumaComposites.DAS28ESR Type
DAS28ESR(; tjc, sjc, pga, apr[; units])
Store the component measures of the DAS28ESR.
Optionally specify the units for each component using Unitful.@u_str
.
Components
tjc
28 tender joint countsjc
28 swollen joint countpga
(cm) patient's global assessmentapr
(mm/hr) active phase reactant, here ESR
Categories
2.6 = Remission 3.2 = Low 5.1 = Moderate 5.1 = High
External links
See also score
, categorise
, isremission
.
RheumaComposites.Faceted Type
Faceted{T} <: ModifiedComposite
This type indicates a further grouping of the stored composite's components.
sourceRheumaComposites.ModifiedComposite Type
ModifiedComposite <: AbstractComposite
Abstract type representing alterations to existing composites.
See also faceted
, revised
, threeitem
.
RheumaComposites.Partial Type
Partial{T}
Redefine a composite as a subset of its components.
sourceRheumaComposites.Revised Type
Revised{T} <: ModifiedComposite
This type indicates that the stored composite's threshold for remission has been revised.
See also BooleanRemission
.
RheumaComposites.SDAI Type
SDAI(; tjc, sjc, pga, ega, crp[; units])
Store component measures of the Simplified Disease Activity Index, or SDAI.
Optionally specify the units for each component using Unitful.@u_str
.
Components
tjc
28 tender joint countsjc
28 swollen joint countpga
(cm) patient's global assessmentega
(cm) evaluator's global assessmentcrp
(mg/dL) c-reactive protein
Categories
3.3 = Remission 11.0 = Low 26.0 = Moderate 26.0 = High
External links
See also score
, categorise
, isremission
.
Base.values Method
values(x::ModifiedComposite)
Return the values of the unmodified composite, i.e., x.root.values
.
RheumaComposites.categorise Method
categorise(x::ContinuousComposite)
Convert x
to a discrete value.
Examples
julia> DAS28ESR(tjc=4, sjc=5, pga=12u"mm", apr=44u"mm/hr") |> categorise
"moderate"
RheumaComposites.categorise Method
categorise(x::Faceted{<:ContinuousComposite})
Convert the root
composite of x
to a discrete value.
RheumaComposites.categorise Method
categorise(::Type{T}, s::Real) where {T<:ContinuousComposite}
Convert score s
to a discrete value using T
's thresholds.
Examples
julia> categorise(SDAI, 3.6)
"low"
RheumaComposites.decompose Method
decompose(x::ContinuousComposite; digits=3)
Return the proportion to which each component contributes to the composite's score.
Optionally specify the number of digits to round the results to.
See also score
.
Examples
julia> SDAI(tjc=4, sjc=5, pga=1.6u"cm", ega=1.2u"cm", crp=3u"mg/dL") |> decompose
Dict{Symbol, Float64} with 5 entries:
:tjc => 0.27
:ega => 0.081
:sjc => 0.338
:pga => 0.108
:crp => 0.203
RheumaComposites.decompose Method
decompose(x::Faceted{<:ContinuousComposite}; digits=3)
Return the proportion to which each facet contributes to the composite's score.
Examples
julia> root = DAS28ESR(tjc=4, sjc=5, pga=14u"mm", apr=12u"mm/hr");
julia> faceted(root, (objective=[:sjc, :apr], subjective=[:tjc, :pga])) |> decompose
Dict{Symbol, Float64} with 2 entries:
:subjective => 0.357
:objective => 0.642
RheumaComposites.faceted Method
faceted(root::ContinuousComposite, facets::NamedTuple)
Specify a custom grouping along which the composite can be analysed.
See also decompose
.
RheumaComposites.intercept Method
intercept(x::ContinuousComposite)
Return the intercept.
This function can be useful if you want to implement custom decomposition or component reweighting.
sourceRheumaComposites.isremission Method
isremission(x::AbstractComposite)
Check whether a composite fulfils remission criteria.
Examples
julia> DAS28ESR(tjc=4, sjc=5, pga=44u"mm", apr=23u"mm/hr") |> isremission
false
julia> BooleanRemission(tjc=1, sjc=0, pga=1.4u"cm", crp=0.4u"mg/dL") |>
revised |>
isremission
true
RheumaComposites.isremission Method
isremission(::Type{T}, s::Real) where {T<:ContinuousComposite}
Check whether a composite fulfils remission criteria.
Examples
julia> isremission(DAS28ESR, 3.9)
false
RheumaComposites.named_vals Method
named_vals(x::AbstractComposite)
Return the values of x
and their names in a NamedTuple.
RheumaComposites.offsets Method
offsets(x::Revised{<:BooleanComposite})
Return the offsets to remission thresholds.
sourceRheumaComposites.partial Method
partial(root::AbstractComposite, keep::Vector{Symbol})
Redefine a composite as a subset of its components.
Functions like score
or isremission
act on the subset of components.
RheumaComposites.revised Method
revised(root::BooleanRemission, offset::NamedTuple)
revised(root::BooleanRemission; offset::NamedTuple=(; pga=10u"mm"))
Modify the remission thresholds of a composite.
The values passed to offset
will be added to the default thresholds of root
.
See also isremission
.
RheumaComposites.score Method
score(c::ContinuousComposite; digits=3)
Score a composite and optionally specify the rounding precision.
Examples
julia> DAS28ESR(tjc=4, sjc=2, pga=64u"mm", apr=44u"mm/hr") |> score
5.061
RheumaComposites.threeitem Method
threeitem(root::BooleanRemission)
Change the calculation of Boolean remission to exclude patient global assessment.
Alias for partial(root::BooleanRemission, [:sjc, :tjc, :crp])
.
See also partial
, isremission
, BooleanRemission
.
RheumaComposites.uvalues Method
uvalues(x::AbstractComposite)
Return the values stored in x
in their units.
RheumaComposites.weight Method
weight(x::T) where {T}
Weight a composite score's components according to its weighting scheme.
Example
julia> DAS28CRP(tjc=2, sjc=2, pga=54u"mm", apr=19u"mg/L") |> weight
(0.7919595949289333, 0.39597979746446665, 0.756, 1.0784636184794367)