Description
Return dayIndex = onsetDay - originDay, adding one when dayOne is true.
Epidemiological timing depends on which event defines the origin, how intervals include their boundaries and whether time is observed. Numeric day coordinates and elapsed intervals do not by themselves select a calendar or a transmission model.
Return dayIndex = onsetDay - originDay, adding one when dayOne is true.
When to use this tool
Use Outbreak Case Onset Day Index when reconciling supplied day coordinates, observation windows or interval boundaries.
How to use the tool and how it works
- Enter onsetDay, originDay, dayOne. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read dayIndex. Use the output convention below.
Return dayIndex = onsetDay - originDay, adding one when dayOne is true. Enter onset and origin as numeric day coordinates on the same calendar and clock basis; dayOne chooses a one-based rather than zero-based origin.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| onsetDay | Onset Day | Required. Safe integer. |
| originDay | Origin Day | Required. Safe integer. |
| dayOne | Day One | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| dayIndex | Day Index | Required. Safe integer. |
{
"input": {
"onsetDay": 110,
"originDay": 100,
"dayOne": true
},
"output": {
"dayIndex": 11
}
} Limitations and assumptions
- No calendar date is parsed and no time-zone or surveillance-week convention is inferred. Negative indexes are permitted and indicate an onset before the chosen origin.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use an explicit calendar conversion for real dates and a suitable transmission or censoring model for inference beyond these local time calculations.
References
Similar or alternative tools
- Epidemic Week Explicit Origin Offset
Use whole day and originDay coordinates and a positive whole daysPerWeek.
- Outbreak Household Member Index
Qualify an explicit household-member ordinal under a supplied zero- or one-based indexing convention.