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
|
exit status legend:
1: natural death, no tumor, before the 1st screening round
2: natural death, undetected tumor, before the first screening round
3: self-detected tumor before the 1st screening round
4: natural death, no tumor, between screening rounds
5: natural death, undetected tumor, between screening rounds
6: self-detected tumor between screening rounds
7: screening-detected tumor
8: natural death, no tumor, after the last screening round
9: natural death, undetected tumor, after the last screening round
10: self-detected tumor after the last screening round
enum Status // labels in data.cc
{
PRESENT, // 0
NATURAL_PRE, // 1 natural death before the 1st screening round
UNDETECTED_PRE, // 2 nat. death, undetected tumor, before 1st scr.
SELF_PRE, // 3 self-detected tumor before 1st scr.
NATURAL_DURING, // 4 nat. death between screening rounds
UNDETECTED_DURING, // 5 nat. death, undetected tumor, between scr.
SELF_DURING, // 6 self-detected tumor between scr. rounds
SCREEN_DETECTED, // 7 screening-detected tumor
NATURAL_POST, // 8 nat. death after the last screening round
UNDETECTED_POST, // 9 nat. death, undetected tumor, afer last scr.
SELF_POST, // 10 self-detected tumor after last scr. round
Status_END
};
At the case initialization the following parameters are determined
(loop/naturaldeathage.cc, tumor/reset.cc):
1. The case's natural death age (d_deathAge, d_naturalDeathAge)
2. Whether or not a tumor starts (d_tumor.selfDetectable())
and if so:
3. the tumor's self-detection age (d_tumor.selfDetectAge())
4. the tumor's onset age (d_tumor.onset())
5. the tumor's death age (d_tumor.deathAge())
Time scale, starting at birth:
d_deathAge
|----...----|
screening round ages (normally multiple y ages are defined)
x y
|-------|-----------|------------>
A B C
pre- screening post-
scr. rounds scr
Since phases A and B's descriptions are identical, they're merged in a single
phase (A). In A it is checked whether the screening age x is the age of the
1st screening round or not. If not, there's, e.g., no interval cancer.
phase: (loop/screening.cc)
A: (loop/leaving.cc)
no tumor.at(x): // A1
nat. death <= x ?
// death age = nat. death age
// (already determined at case initialization)
case leaves because of nat. death (LEFT_PRE or LEFT_DURING)
[else] // A2: a tumor exists at x
nat. death < x and not selfDetectableBefore(nat.death) ? // A3
// death age = nat. death age
// (already determined at case initialization)
determine tumor characteristics at the nat.death age
deathAge = natural death age
case leaves at natural death (UNDETECTED_PRE/DURING)
[else]
selfDetectableBefore(x) ? // A4
determine tumor characteristics at the self-detection age
death age = tumor death age based on self detect age
addCost treathmentCosts at selfDetectAge
if x is the first screening round:
case leaves at self-detect age
else
intervalCancer at x // case leaves (loop/intervalcancer.cc)
[else]
continue: screen at x (loop/screen.cc)),
-------------------------------------------------
(loop/intervalcancer.cc)
update statistics like
#intervals in the current round
whether or not the case would actually attend round x,
the treatment costs
case leaves at the self-detection age
-------------------------------------------------
(loop/screen.cc)
add the costs of the used screening mode(s)
no tumor at x:
// death age = nat. death age
// (already determined at case initialization)
at a false positive decision: add the costs of the
screening at x
else:
determine tumor characteristics at x
at a false negative decision:
update some statistics
else: (tumor detected at screening round x)
nat.death age < tumor death age?
// death age = nat. death age
// (already determined at case initialization)
case leaves at x, registering the nat. death age
else
death age = tumor death age
case leaves at x, registering the tumor death age
B == A
C: (loop/postscreen.cc)
nothing happens if the case has already left the simulation
no tumor beyond y? // C1
// death age = nat. death age
// (already determined at case initialization)
case leaves at nat. death age
[else] // C2
determine tumor characteristics at the self-detection age
new: self-detection age < nat.death age ?
addCost treathmentCosts at selfDetectAge
determine the tumor-caused death age
deathAge = min(tumor death age, natural death age)
self-detection age < nat.death age ?
case leaves at self-detection age,
[else]
case leaves at nat.death age, but a tumor is present
(added the new state 7:
"undetected tumor and natural death after the last screening
round")
|