Skip to content

Main content

Activity Context Source Gap Tool

Calculate activity context source gap from explicit caller-supplied inputs.

Loading tool…

Description

Count knownPairs where neither context equals unknownContext, contextDisagreements for unequal known pairs, and unknownPairs where either matches the unknown token.

Activity and assistive-task records distinguish planned, attempted, completed, assisted, observed, and optional components. Shares depend on the selected denominator and credit policy. A supplied code, geometry, or time-budget calculation is separate from evaluating an individual's function or safe access.

Count knownPairs where neither context equals unknownContext, contextDisagreements for unequal known pairs, and unknownPairs where either matches the unknown token.

When to use this tool

Use Activity Context Source Gap when you need this specific task-count, assistance-code, timing, equipment-budget, or participation-record component.

How to use the tool and how it works

  1. Enter activityIds, recordedContexts, sourceContexts, unknownContext. Keep parallel arrays aligned. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read knownPairs, contextDisagreements, unknownPairs. Use the output convention below.

Require aligned activityIds, recordedContexts, and sourceContexts. Count knownPairs where neither context equals unknownContext, contextDisagreements for unequal known pairs, and unknownPairs where either matches the unknown token.1

Input fieldMeaning and unitsAccepted input
activityIdsActivity IdsRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
recordedContextsRecorded ContextsRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
sourceContextsSource ContextsRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
unknownContextUnknown ContextRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
knownPairsKnown PairsRequired. Safe integer.
contextDisagreementsContext DisagreementsRequired. Safe integer.
unknownPairsUnknown PairsRequired. Safe integer.
json
{
  "input": {
    "activityIds": [
      "a",
      "b"
    ],
    "recordedContexts": [
      "home",
      "?"
    ],
    "sourceContexts": [
      "work",
      "home"
    ],
    "unknownContext": "?"
  },
  "output": {
    "knownPairs": 1,
    "contextDisagreements": 1,
    "unknownPairs": 1
  }
}

Limitations and assumptions

  • Matching uses exact labels and repeated activity rows count repeatedly. The source context is supplied rather than independently verified; agreement does not establish accuracy, participation capacity, or clinical relevance.
  • 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.

Alternative or Complementary methods

Use the intended assessment and a complete task or access model when a local check is insufficient. Verify task definitions, credit policies, measurement units, and the context of the underlying observations.

References

  1. Calculation and input contract: occupational-therapy/activity-context-source-gap — tool.io

Similar or alternative tools

  • Handoff Source Support Share

    Count exact nonempty source IDs and those also present in verifiedSources; return requiredFieldsCount, fieldsWithSource, verifiedFields, and share=verifiedFields/requiredCount when positive, otherwise zero with defined=false.

  • Oral Procedure Source Share

    Sum all durations, documented durations, and durations both documented and source-verified.