Description
Calculate a completed-opportunity fraction under explicit cancelled and excused-session denominator policies.
Movement research distinguishes elapsed time, active time, cycle phase, measured force, and assessment-score conventions. Normalizing or remapping these quantities can help compare records when their units and definitions agree. A local arithmetic term does not by itself validate a functional assessment or an exercise program.
Calculate a completed-opportunity fraction under explicit cancelled and excused-session denominator policies.
When to use this tool
Use Rehabilitation Diary Adherence Opportunity Base when you need this motion, timing, force, annotation, or score-mapping component for supplied research records.
How to use the tool and how it works
- Enter scheduled, completed, cancelled, excused, includeCancelled, includeExcused. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read opportunities, fraction. Use the output convention below.
For positive scheduled and nonnegative integer completed, cancelled, and excused, require their sum no greater than scheduled and scheduled-cancelled-excused>0. Build opportunities by excluding cancelled and excused unless their respective include flags are true; return fraction=completed/opportunities.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| scheduled | Scheduled | Required. Safe integer; minimum 1. |
| completed | Completed | Required. Safe integer; minimum 0. |
| cancelled | Cancelled | Required. Safe integer; minimum 0. |
| excused | Excused | Required. Safe integer; minimum 0. |
| includeCancelled | Include Cancelled | Required. Boolean. |
| includeExcused | Include Excused | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| opportunities | Opportunities | Required. Safe integer. |
| fraction | Dimensionless fraction under the stated numerator and denominator. | Required. Finite number. |
{
"input": {
"scheduled": 20,
"completed": 12,
"cancelled": 3,
"excused": 2,
"includeCancelled": false,
"includeExcused": false
},
"output": {
"opportunities": 15,
"fraction": 0.8
}
} Limitations and assumptions
- The positive opportunity check applies even when inclusion flags would leave a larger denominator. Categories must be distinct supplied counts; this ratio does not verify diary accuracy or prescribe treatment.
- 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. Signed zero is exported as zero.
Alternative or Complementary methods
Use the intended assessment or motion-analysis protocol with verified timing, units, and event annotations. A complete interpretation needs the relevant measurement properties and task context beyond this local calculation.
References
Similar or alternative tools
- Rehabilitation Goal Attainment Anchor Map
Interpolate an explicit goal-anchor map without supplying a clinical scale.
- Rehabilitation Group Contact Time Share
For positive integer groupSize, nonnegative sessionMinutes and individualMinutes, and overlapMinutes within both, return groupPersonMinutes=sessionMinutes*groupSize, uniqueDirectMinutes=session+individual-overlap, and allocatedMinutes=session/groupSize+individual-overlap/groupSize.