Screening modalities are accessed via the tt(Modalities) object. The
modalities object provides the interface to modalities that are defined for
screening rounds. All modalities that are thus accessible are derived from a
base class tt(ModBase). tt(ModBase) defines the interface that must be offered
by classes derived from tt(ModBase). This allows reuse of existing components
of s() that use modalities, irrespective of what actual modalities are
configured for the various screening rounds.

The structure of this design is illustrated in Figure ref(MODFIG).

    figure(modalities/modalities)(The Modalities design)(MODFIG)

Figure ref(MODFIG) shows the tt(Modality) object in blue. It communicates with
tt(ModBase) objects. tt(ModBase) is a polymorphic base clase completely
defining the interface modalities must provide. What modalities there are or
will be at some poiny in the future is irrelevant, as long as these future
modalities implement the interface required by tt(ModBase).

Currently three modalities are available: an MRI modality, a Mammo modality
and a Tomo modality. The arrows pointing down from tt(ModBase) suggest time:
MammoTomo was originally implemented. At some later point in time MRI was
added. At some point in the future another, as yet unknown, modality may be
added. At that point only the new modality must be implemented, but the
program using the new modality can be reused, not requiring additional
modifications.

The tt(Modality) constructor receives the tt(modality) parameter
specifications from the configuration file. Modality parameters specify the
name of the modality; the costs of using the modality; optionally
specifications of radiation doses for the treatment of the four bi-rads
categories; the modality's sensitivity (optionally differently specified for
the four bi-rads categories, and the modality's specificity, optionally using
age groups, like the age groups that were used when specifying breast density
parameters. E.g.,
        verb(
#                       bi-rads bi-rads             (agegroups: values)
# modalities id    cost dose    sensitivity         specificity
#                       1..4    1..4
modality:    Mammo 64   3 3 3 3 0.87 0.84 0.73 0.65 0-40: 0.961 40-*: 0.965
modality:    MRI   64           0.00                0.00
        )

The constructor uses the specification ID to create the matching
modality-handling object. Modality handlers are derived from the (polymorphic)
modality base class tt(ModBase) (see the next section).

When a screening is performed for a specific screening age (cf. section
ref(SCREEN)) then all modalities that were specified for that screening age
are visited in turn. Screening round specifications define the modalities that
are used for those rounds (cf. section ref(SCREENINGCLASS)). The tt(Screening)
class provides, per screening round, the names (IDs) of the modalities that
are used for those rounds, The member tt(Modality::use) receives these IDs and
returns pointers to the modalities that are associated with those IDs. Those
modalities are then applied in turn to the current case.
