API reference
RheumaComposites
— ModuleRheumaComposites
A Julia package for composite scores in Rheumatology.
Types
RheumaComposites.AbstractComposite
— TypeAbstractComposite
Abstract type that specifies the category of composites.
It is either ContinuousComposite
, BooleanComposite
, or ModifiedComposite
.
RheumaComposites.ContinuousComposite
— TypeContinuousComposite <: AbstractComposite
Abstract type for composites whose scores are floating point numbers.
See also score
, BooleanComposite
.
RheumaComposites.BooleanComposite
— TypeBooleanComposite <: AbstractComposite
Abstract type for composites only implementing a definition of remission.
See also isremission
, ContinuousComposite
.
RheumaComposites.ModifiedComposite
— TypeModifiedComposite <: AbstractComposite
Abstract type representing alterations to existing composites.
RheumaComposites.DAS28
— TypeRheumaComposites.DAS28ESR
— TypeDAS28ESR(; 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
- $<$ 3.2 = Remission
- $\leq$ 3.2 = Low
- $\leq$ 5.1 = Moderate
- $>$ 5.1 = High
External links
See also score
, categorise
, isremission
.
RheumaComposites.DAS28CRP
— TypeDAS28CRP(; 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.9 = Remission
- $\leq$ 2.9 = Low
- $\leq$ 4.6 = Moderate
- $>$ 4.6 = High
External links
See also score
, categorise
, isremission
.
RheumaComposites.SDAI
— TypeSDAI(; 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
- $\leq$ 11.0 = Remission
- $\leq$ 11.0 = Low
- $\leq$ 26.0 = Moderate
- $>$ 26.0 = High
External links
See also score
, categorise
, isremission
.
RheumaComposites.CDAI
— TypeCDAI(; 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
- $<$ 10.0 = Remission
- $\leq$ 10.0 = Low
- $\leq$ 22.0 = Moderate
- $>$ 22.0 = High
External links
See also score
, categorise
, isremission
.
RheumaComposites.BASDAI
— TypeBASDAI(; 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.DAPSA
— TypeDAPSA(; 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
- $\leq$ 14.0 = Remission
- $\leq$ 14.0 = Low
- $\leq$ 28.0 = Moderate
- $>$ 28.0 = High
External links
See also score
, categorise
, isremission
.
RheumaComposites.Faceted
— TypeFaceted{T} <: ModifiedComposite
This type indicates a further grouping of the stored composite's components.
RheumaComposites.BooleanRemission
— TypeBooleanRemission(; 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.Revised
— TypeRevised{T} <: ModifiedComposite
This type indicates that the stored composite's threshold for remission has been revised.
See also BooleanRemission
.
RheumaComposites.Partial
— TypePartial{T}
Redefine a composite as a subset of its components.
Interface
Base.values
— Functionvalues(x::AbstractComposite)
Return the values stored in x
.
values(x::ModifiedComposite)
Return the values of the unmodified composite, i.e., x.root.values
.
values(x::Partial{N,<:BooleanComposite})
Return the values kept by x
.
RheumaComposites.root
— Functionroot(x::ModifiedComposite)
Return the unmodified composite.
RheumaComposites.offsets
— Functionoffsets(x::Revised{<:BooleanComposite})
Return the offsets to remission thresholds.
Functions
RheumaComposites.intercept
— Functionintercept(x::ContinuousComposite)
Return the intercept.
This function can be useful if you want to implement custom decomposition or component reweighting.
RheumaComposites.weight
— Functionweight(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)
RheumaComposites.score
— Functionscore(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.isremission
— Functionisremission(::Type{T}, s::Real) where {T<:ContinuousComposite}
Check whether a composite fulfils remission criteria.
Examples
julia> isremission(DAS28ESR, 3.9)
false
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.decompose
— Functiondecompose(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
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.categorise
— Functioncategorise(::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"
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"
categorise(x::Faceted{<:ContinuousComposite})
Convert the root
composite of x
to a discrete value.
RheumaComposites.faceted
— Functionfaceted(root::ContinuousComposite, facets::NamedTuple)
Specify a custom grouping along which the composite can be analysed.
See also decompose
.
RheumaComposites.revised
— Functionrevised(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.partial
— Functionpartial(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.threeitem
— Functionthreeitem(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
.
Index
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.values
RheumaComposites.categorise
RheumaComposites.decompose
RheumaComposites.faceted
RheumaComposites.intercept
RheumaComposites.isremission
RheumaComposites.offsets
RheumaComposites.partial
RheumaComposites.revised
RheumaComposites.root
RheumaComposites.score
RheumaComposites.threeitem
RheumaComposites.weight