Study assessment detail
Scope: This document covers the study version on the
studybranch. It does not describe the production version onmain.
This reference was checked against c2fit-app-frontend branch study at 37d886d9 and c2fit-bff branch origin/study at 6c01289. The BFF uses Assessment/Result Service model v0.0.18-study5 and forwards frontend and BFF version headers so the downstream services can select the matching assessment version.
The local c2fit-assessment-result repository does not contain a study branch. Its study model package is available locally, but the study journey generators, seed data, and scoring engines are not. This document therefore states study-specific flows and visible behavior only when the study frontend, BFF, or study model contract proves them. Shared scoring details come from the Assessment/Result Service main implementation when the study contract uses the same tasks and result fields. Deployed question pools may differ from checked-in seed data.
Open production assessment detail → for production behavior. Open business logic and dataflow → for the surrounding journey, submission, and service flow.
How to read the flows
An assessment contains an ordered list of tasks. A task can contain one or more phases. The BFF owns the current assessment, task, and phase indexes. The frontend renders the current screen and submits the user's actions. The Result Service scores submitted phases. The BFF then advances normally or applies an assessment-specific branch.
INTROandRESULTare tasks without phases.TRAININGis practice and does not contribute to the displayed score.TESTING_*phases are assessment trials unless a section identifies a listen-only task.- A variant identifies the question or configuration assigned to one phase.
- Unless a section says otherwise, the app submits phase actions to
POST /result-service/api/v1/journey/submit. - The study app shows a blocking message and returns home if the BFF sends a task name that the app does not recognize. It also reports the mismatch to Sentry.
The requirement tables focus on behavior visible to users, PMs, and UX designers. Implementation details are listed separately.
Difference markers
Study difference marks a flow step or requirement that differs from the production main version. Each assessment also starts with a short difference summary. Requirements without this marker match production behavior.
Attention Hold/Release
What it is
The user presses and holds the green button until a configured light turns on, releases the hold, and taps the light within its response window. The single task shows one light. The complex task shows three lights and requires the user to tap the light that turned on.
Study difference The study version adds a phase progress bar and a 100 ms aura after a valid target tap. The trial count, warnings, skip rules, and scoring match production.
Ordered flow
| Step | Task | Phase | What happens |
|---|---|---|---|
| 1 | INTRO | None | Shows the assessment introduction and starts the journey when the user continues. |
| 2 | AHR_SINGLE | TRAINING | Runs three local practice trials with hold durations of 500, 750, and 1,000 ms. The practice light appears for 900 ms. |
| 3 | AHR_SINGLE | TESTING_1 to TESTING_27 | Runs 27 scored one-light trials. Before the first trial, a transition displays ชุดที่ 1/2 and ไฟ 1 ดวง. |
| 4 | AHR_COMPLEX | TESTING_1 to TESTING_27 | Runs 27 scored three-light trials. Before the first trial, a transition displays ชุดที่ 2/2 and ไฟ 3 ดวง. |
| 5 | RESULT | None | Polls for the result, then shows the combined score and separate one-light and three-light statistics. |
Detailed requirements
Trial content and interaction
| ID | Requirement |
|---|---|
| S-AHR-01 | The assessment must run 27 one-light trials followed by 27 three-light trials. Question order must vary while using questions assigned to the user's age group. |
| S-AHR-02 | Each trial must use its assigned hold duration, light duration, target light, and valid response window. The shared question data uses age groups younger than 50 and 50 or older. |
| S-AHR-03 | The user must press and hold the green button for the required duration. Releasing before the hold completes returns the trial to waiting for a new hold. |
| S-AHR-04 | Completing the hold turns on the target light. The user must release the green button and tap the target light. A light tap made while the green button is still held cannot be correct. |
| S-AHR-05 | Study difference: A valid target tap must show a colored aura around that light for 100 ms. The aura appears only when the tap is within the minimum and maximum response time and the user has released the hold button. |
| S-AHR-06 | Study difference: Tapping a wrong light, tapping too early, tapping too late, or tapping while still holding must not show the valid-tap aura. |
| S-AHR-07 | The trial ends after the user taps a light, taps the background after a light has appeared, misses the response window, or starts another hold after the light has appeared. The app then advances without a correctness screen. |
| S-AHR-08 | Training must demonstrate the interaction through three practice trials. It must show practice feedback and allow the user to repeat training or continue. Training does not affect the score. |
| S-AHR-09 | Study difference: Training and testing must show phase progress. The bar must fill before the app leaves a completed or skipped task. |
Warnings and task skipping
The idle warning has a 10-second recovery timer and a cumulative warning count. The release warning has a separate 30-second timer and does not increase that count.
| ID | Requirement |
|---|---|
| S-AHR-10 | At the start of a normal testing trial, the user has 10 seconds to complete the required hold. Starting a hold without completing it does not prevent the idle warning. |
| S-AHR-11 | If the user does not complete the hold within 10 seconds, the app must display กดปุ่มสีเขียวค้างไว้ เพื่อรอให้ดวงไฟติด and start a 10-second recovery window. |
| S-AHR-12 | During the first and second idle warnings, the user may recover by completing the hold before the recovery window ends. Releasing before the hold completes leaves the warning active. |
| S-AHR-13 | If the user does not complete the hold during the recovery window, the app must skip the current task. This can happen on the first or second idle warning. |
| S-AHR-14 | The third idle warning must skip the current task immediately. It must not start another recovery window. The warning count carries across testing phases. |
| S-AHR-15 | If the hold button is already pressed when a trial starts, the app must display ปล่อยมือจากปุ่ม และกดค้างใหม่อีกครั้ง. Releasing starts the normal 10-second trial window. |
| S-AHR-16 | If the user does not release the button within 30 seconds of the release warning, the app must skip the current task. This warning does not increase the idle-warning count. |
| S-AHR-17 | Skipping must move to the next task. Unanswered trials in the skipped task remain in its total and receive no points. |
| S-AHR-18 | A permanent timeout during training ends the practice interaction and opens its result step. It must not call the scored-task skip route. |
| S-AHR-19 | If result loading takes longer than five seconds, the app must replace the loading indicator with the request-timeout warning. |
Technical notes
- The study app derives the testing progress total from the journey path returned by the start endpoint. This avoids waiting for the next-state response before drawing progress.
- Trial events include
START_PHASE,HOLD,RELEASE,LIGHT_ON,CLICK_LIGHT_BTN,CLICK_BACKGROUND, andTIMEOUT. - A permanent testing failure clears unsubmitted actions and calls
POST /api/v1/journey/skip-task. - The aura is visual confirmation only. The Result Service still determines the score from submitted events and the assigned question timing.
Scoring
A testing phase is correct only when the assigned light turns on, the user taps that light after releasing the hold button, and the tap falls inside the phase's inclusive minimum and maximum response times.
Each correct phase is worth 1 point. The one-light and three-light tasks are scored separately, then displayed as:
score = single_score + complex_score
maximum = single_total_score + complex_total_scoreThe shared 27 plus 27 path has a maximum of 54. Training does not count.
Digit Span Speak
What it is
The app plays spoken digits. The user repeats them in the same order for the forward task and in reverse order for the backward task. The sequence grows from 2 to 12 digits.
No material assessment requirement differs from production. The study branch moves the shared progress component and adds unknown-task error handling, but the user flow, timing, retry rules, and scoring stay the same.
Ordered flow
| Step | Task | Phase | What happens |
|---|---|---|---|
| 1 | INTRO | None | Shows the assessment introduction. |
| 2 | DSS_FORWARD | TRAINING | Plays a two-digit forward example, records the answer, shows feedback, and allows repeat or continue. |
| 3 | DSS_FORWARD | TESTING_1_1 to TESTING_11_2 | Runs up to 11 levels. Each level has two possible trials and contains 2 to 12 digits. |
| 4 | DSS_BACKWARD | TRAINING | Plays a two-digit example and asks for the digits in reverse order. |
| 5 | DSS_BACKWARD | TESTING_1_1 to TESTING_11_2 | Runs the same level structure using reverse-order answers. |
| 6 | RESULT | None | Shows forward, backward, and combined results. |
Detailed requirements
| ID | Requirement |
|---|---|
| S-DSS-01 | The assessment must test forward recall first and backward recall second. Each task has 11 levels. Sequence length grows from 2 digits at level 1 to 12 digits at level 11. |
| S-DSS-02 | The app must play digits one at a time before recording starts. The shared configuration uses a 10 ms gap between digit files. |
| S-DSS-03 | A forward answer must match the played order. A backward answer must match the reverse order. The number of digits and every position must match. |
| S-DSS-04 | The user has 10 seconds to record. Manual submission remains disabled during the first second, then becomes available. The app submits when time expires if the user does not submit. |
| S-DSS-05 | Moving the app to the background while answering must pause recording and the countdown. Both must continue after the app returns to the foreground. |
| S-DSS-06 | A correct first attempt at a level must skip its second attempt. An incorrect first attempt must open the second attempt at the same level. |
| S-DSS-07 | A correct answer clears the consecutive-error count. Two consecutive incorrect answers must end the current forward or backward task. |
| S-DSS-08 | The first scored trial of each task must introduce the new round. Testing must show progress through the current task. |
| S-DSS-09 | Forward and backward training must use a two-digit example, record the answer, and show feedback. The user may repeat training or continue. Training does not affect the score. |
| S-DSS-10 | The result must show forward, backward, and combined scores. Separate task statistics must preserve half points. |
Technical notes
- Digit audio comes from bundled
digit-span-speak-{digit}.wavfiles. - Audio answers use the Digit Span Speak upload endpoint. The Result Service transcribes Thai speech and keeps only characters that parse as digits.
- The BFF waits for the current phase score before deciding whether to skip the second trial or end a task.
Scoring
For each level:
- A correct first attempt earns 1 point and skips the second attempt.
- A correct second attempt earns 0.5 points.
- Two incorrect attempts earn 0 points and end the task.
Forward and backward each have a maximum of 11. The result statistics keep half points. The large combined score converts the sum to an integer with toInt(), so it truncates any remaining fractional part.
Modified Visuospatial
What it is
The assessment uses 12 cards around the edge of a 5-by-3 layout. Baseline asks the user to identify a card that opened. Forward and backward show a position sequence and a symbol, then ask the user to reproduce the position order and choose the symbol.
Study difference The study app adds local Modified Visuospatial symbol assets for sets 101 through 140. The assessment flow, baseline branch, timing, and scoring match production.
Ordered flow
| Step | Task | Phase | What happens |
|---|---|---|---|
| 1 | INTRO | None | Shows the assessment introduction. |
| 2 | MV_BASELINE | TRAINING | Demonstrates choosing one opened card from the four active corner cards. |
| 3 | MV_BASELINE | TESTING_1_1 to TESTING_4_1 | Runs four scored baseline trials. Each active corner is the target once in randomized order. |
| 4 | RESTART_MODAL | RESTART_MODAL | Appears only when all four baseline trials are incorrect. |
| 5 | MV_FORWARD | TRAINING | Demonstrates position-order recall followed by symbol selection. |
| 6 | MV_FORWARD | TESTING_1_1 to TESTING_8_2 | Runs up to eight levels with 2 to 9 positions and two possible trials per level. |
| 7 | MV_BACKWARD | TRAINING | Demonstrates selecting positions in reverse order, then selecting the symbol. |
| 8 | MV_BACKWARD | TESTING_1_1 to TESTING_8_2 | Runs up to eight reverse-order levels with 2 to 9 positions. |
| 9 | RESULT | None | Shows forward and backward results. Baseline is not part of the displayed result. |
Detailed requirements
Layout and baseline
| ID | Requirement |
|---|---|
| S-MV-01 | The assessment must show 12 cards around a 5-by-3 layout. Baseline uses four designated corner cards. Forward and backward use all 12. |
| S-MV-02 | Baseline training must identify the four selectable corners, demonstrate one card opening and closing, and let the user choose the demonstrated card. It must show feedback and allow repeat or continue. |
| S-MV-03 | Before the first scored baseline trial, a transition must display ชุดที่ 1/3 and เลือกไพ่ที่เปิด. |
| S-MV-04 | Each scored baseline trial must open one corner card for 1 second, close it, and enable answers only after the close animation finishes. |
| S-MV-05 | Each baseline trial accepts one selection from the four corners. The first accepted selection submits that trial and cannot be changed. The other eight cards remain disabled. |
| S-MV-06 | Baseline has no answer countdown or automatic timeout. It waits for a card selection. |
| S-MV-07 | The user must complete all four baseline trials. Trials 1 to 3 advance without correctness feedback. After trial 4, the app evaluates the baseline branch. Each corner must be the target once, and the first target must differ from the training example. |
| S-MV-08 | At least one correct baseline answer must continue to forward training. Four incorrect answers must open the restart decision. |
Forward and backward
| ID | Requirement |
|---|---|
| S-MV-09 | Forward and backward must contain eight levels. The sequence grows from 2 positions to 9, and generated positions must not be adjacent. |
| S-MV-10 | The app must reveal positions one at a time. Each card stays open for 1 second. It must then show the target symbol for 3 seconds. |
| S-MV-11 | The user has 10 seconds to reproduce the position sequence and 5 seconds to select the symbol. Completing the required number of card selections ends position entry. Selecting a symbol submits immediately. A timeout submits the incomplete attempt. |
| S-MV-12 | During position entry, the user may select only active cards that are closed. The symbol step must show four choices in the center. |
| S-MV-13 | Forward requires the shown order. Backward requires the reverse order. Both tasks also require the assigned symbol. |
| S-MV-14 | A symbol set must not repeat within one assessment attempt. Study difference: The study app includes local assets for the expanded symbol range through set 140. The assigned question still comes from the Assessment Service. |
| S-MV-15 | A correct first attempt must skip the second attempt at that level. An incorrect first attempt must open the second. Two consecutive incorrect attempts must end the task. |
| S-MV-16 | Forward and backward training must demonstrate position recall and symbol selection. Backward training must demonstrate reverse-order selection. Training does not count. |
Restart and result
| ID | Requirement |
|---|---|
| S-MV-17 | Restart must request new questions and return to baseline testing without replaying the introduction or baseline training. The alternative action depends on where the user started the assessment. |
| S-MV-18 | The result must show forward and backward results. Baseline decides whether the user may continue, but it must not appear in the final assessment score. |
Technical notes
- Baseline uses card indexes
0,2,6, and8. Training uses index0, and the scored order prevents index0from appearing first. - Baseline submits one
CLICK_CARDaction per trial and has noTIMEOUTaction. - Forward and backward record
CLICK_CARDandCLICK_SYMBOLactions. Backward scoring reverses submitted card selections before comparison. - The BFF uses per-phase baseline correctness for the restart branch. It does not use the aggregate baseline task score for that decision.
Scoring
Baseline stores its own task score from 0 to 4 with a total of 4. The final Modified Visuospatial result omits that task. The BFF separately counts correct baseline phases to choose the continuation or restart path.
Each forward and backward score starts at 1 and has a maximum of 9. The starting point is not copied from baseline. Passing a level on either attempt adds 1 point. A second-attempt pass is not reduced to half a point. Failing both attempts at one level ends the task, while unattempted levels remain in the maximum.
score = forward_score + backward_score
maximum = forward_total_score + backward_total_scoreThe full displayed maximum is 18.
Drawing Memory
What it is
The user reproduces line patterns on a 5-by-5 point grid. Matching keeps the reference visible. Mirror asks for a reflected pattern. Delayed tasks show a pattern, hide it for a configured delay, and then ask the user to draw it from memory.
Study difference The study version uses direct line removal. The user taps a drawn line to remove that line. There is no separate last-line removal button. Production instead has a ลบเส้น button that removes only the most recently drawn line.
Ordered flow
| Step | Task | Phase | What happens |
|---|---|---|---|
| 1 | INTRO | None | Shows the assessment introduction. |
| 2 | DM_MATCHING_SIMPLE | TRAINING, TESTING_1 | Study difference: Teaches direct copying and tap-to-remove, then runs one simple scored copy. |
| 3 | DM_MATCHING_COMPLEX | TESTING_1 | Runs one complex direct copy without another training phase. |
| 4 | DM_MIRROR_SIMPLE | TRAINING, TESTING_1 | Teaches reflected drawing, then runs one simple scored mirror drawing. |
| 5 | DM_MIRROR_COMPLEX | TESTING_1 | Runs one complex reflected drawing. |
| 6 | RESTART_MODAL | RESTART_MODAL | Appears only when all four matching and mirror tests are incorrect. |
| 7 | DM_DELAY_1_SIMPLE | TRAINING, TESTING_1, TESTING_2 | Teaches delayed recall, then runs two simple patterns with a 6-second scored delay. Training waits 4 seconds. |
| 8 | DM_DELAY_1_COMPLEX | TESTING_1, TESTING_2 | Runs two complex patterns with a 6-second delay. |
| 9 | DM_DELAY_2_SIMPLE | TESTING_1, TESTING_2 | Runs two simple patterns with a 12-second delay. |
| 10 | DM_DELAY_2_COMPLEX | TESTING_1, TESTING_2 | Runs two complex patterns with a 12-second delay. |
| 11 | DM_DELAY_3_COMPLEX | TESTING_1 | Runs one complex pattern with a 300-second delay and shows the countdown. |
| 12 | RESULT | None | Shows total correctness and average response time across correct testing phases. |
Detailed requirements
| ID | Requirement |
|---|---|
| S-DM-01 | The assessment must select patterns for the user's age group, younger than 50 or 50 and older. Pattern selection must vary between attempts. |
| S-DM-02 | Every drawing task must use a 5-by-5 point grid and allow 30 seconds to answer. |
| S-DM-03 | A line must connect neighboring points horizontally, vertically, or diagonally. A dragged line snaps to a point only when the pointer is close enough. |
| S-DM-04 | Study difference: The screen must tell the user ลากเส้นเพื่อวาด แตะเส้นเพื่อลบ, meaning drag to draw and tap a line to remove it. |
| S-DM-05 | Study difference: Tapping a drawn line must remove that selected grid connection, regardless of draw direction. It must not remove an unrelated newer line. If the same connection exists more than once, the tap removes every matching copy. |
| S-DM-06 | Study difference: The footer must contain one full-width ส่งคำตอบ button. The study version must not show the production ลบเส้น button. |
| S-DM-07 | Study difference: Matching training must demonstrate tap-to-remove with an animated draw-and-remove example before testing. |
| S-DM-08 | Matching tasks must keep the reference visible while the user copies it. The simple task includes training. The complex task starts with testing. |
| S-DM-09 | Mirror tasks must keep the reference visible while the user draws its reflection. The simple task includes training. The complex task starts with testing. |
| S-DM-10 | Delayed tasks must show the reference, hide it, wait for the configured delay, then show an empty drawing grid and start the 30-second answer timer. |
| S-DM-11 | For scored delayed trials, TESTING_1 shows the reference for 2.25 seconds to users younger than 50 and 3 seconds to users 50 or older. TESTING_2 uses 1.5 and 2.25 seconds respectively. The five-minute task uses the TESTING_1 duration. |
| S-DM-12 | Delay 1 must wait 6 seconds, Delay 2 must wait 12 seconds, and Delay 3 must wait 300 seconds. Delayed training waits 4 seconds. |
| S-DM-13 | The five-minute wait must show a countdown. Shorter waits show a waiting screen without a numeric countdown. When more than 60 seconds remain, the app schedules a reminder for the final minute and cancels it when the wait ends or the user leaves. |
| S-DM-14 | The user may submit before the answer timer ends. If time expires, the app submits the drawing in its current state. |
| S-DM-15 | A drawing is correct only when it contains every required line and no extra line. Direction does not matter. Mirror scoring compares against the reflected reference. |
| S-DM-16 | At least one correct answer across the four matching and mirror tests must continue to delayed training. Four incorrect answers must open the restart decision. |
| S-DM-17 | Restart must request new questions and return to matching testing without replaying the introduction, matching training, or mirror training. |
| S-DM-18 | The result must show correct testing phases and average drawing time for correct phases. Training does not affect either value. |
Technical notes
- Adding a line records
SHOW_LINE. Tapping a line recordsCLICK_REMOVEwith that line's endpoints, followed byHIDE_LINEfor each matching connection. - Tap hit-testing selects the nearest drawn segment only when it falls inside the configured selection distance.
- Scoring reduces visible line actions to an undirected adjacency matrix. Long straight lines are split at each integer grid point. Coordinates outside the grid are rejected.
- Drawing duration runs from
SHOW_GRIDuntilCLICK_NEXTorTIMEOUT.
Scoring
Each testing phase earns 1 point for an exact path match. Each task score is its correct phases over its testing-phase total. A task also stores the average duration of correct phases, or -1 if none are correct.
The assessment sums task scores and totals and calculates a score-weighted average duration across correct phases. The shared path contains 13 scored phases. The app displays the average in seconds.
Verbal Memory
What it is
Study difference The study flow asks for immediate recall three times. Before immediate recall rounds 2 and 3, it plays the same 15 words again in listen-only relearning tasks. Production has one immediate recall task and no listen-only relearning tasks.
Ordered flow
| Step | Task | Phase | What happens |
|---|---|---|---|
| 1 | INTRO | None | Shows the assessment introduction. |
| 2 | VM_ENCODE | TRAINING | Study difference: Combines the word-repeat tutorial with recall practice and explains the three-round recall flow. |
| 3 | VM_ENCODE | TESTING_1 to TESTING_15 | Round 1 learning. Plays one word per phase and asks the user to repeat it. |
| 4 | VM_IMMEDIATE_RECALL_1 | TESTING_1 | Study difference: Uses the renamed first immediate recall task and gives 60 seconds to recall the 15 words in any order. |
| 5 | VM_ENCODE_LISTENING_1 | TESTING_1 to TESTING_15 | Study difference: Round 2 relearning. Shows and plays each word, then advances without recording an answer. |
| 6 | VM_IMMEDIATE_RECALL_2 | TESTING_1 | Study difference: Gives another 60-second immediate recall period. |
| 7 | VM_ENCODE_LISTENING_2 | TESTING_1 to TESTING_15 | Study difference: Round 3 relearning. Shows and plays each word, then advances without recording an answer. |
| 8 | VM_IMMEDIATE_RECALL_3 | TESTING_1 | Study difference: Gives the third 60-second immediate recall period. |
| 9 | VM_DELAYED_RECALL | TESTING_1 | Waits 300 seconds, then gives 60 seconds to recall the same words. |
| 10 | VM_DELAYED_RECOGNITION | TRAINING | Teaches choosing the previously presented word. |
| 11 | VM_DELAYED_RECOGNITION | TESTING_1 to TESTING_15 | Shows one learned word and one distractor per phase. The user has 10 seconds to select one. |
| 12 | VM_DELAYED_RECOGNITION | RESULT_TASK | Shows the recognition score and per-phase choices. Continuing opens the assessment result. |
| 13 | RESULT | None | Study difference: Shows all three immediate recall scores, delayed recall, recognition, and their combined score. |
The 15-phase counts above follow the study frontend's 15-word flow and result layout. The unavailable study Assessment Service source remains the authority for the generated deployed path.
Detailed requirements
Learning and immediate recall
| ID | Requirement |
|---|---|
| S-VM-01 | The assessment must use one target-word list throughout learning, delayed recall, and recognition. Study difference: The same list must also be used for all three immediate recall rounds. Recognition pairs each target with a distractor. |
| S-VM-02 | During round 1 learning, the app must play one target word and ask the user to repeat it. The user has 10 seconds. A correct repetition ends the phase early. Otherwise, the phase ends when time expires. |
| S-VM-03 | Study difference: Immediate recall rounds 1, 2, and 3 must each give the user 60 seconds to say target words in any order. Each round must have a separate score. |
| S-VM-04 | A recall round must count each recognized target word once. Repeating the same target within that round must not increase the score. Recognizing all target words ends the round early. |
| S-VM-05 | After each recall round, the app must show the recognized-word result for up to 10 seconds. The user may continue immediately, or the app continues when the timer ends. |
| S-VM-06 | Study difference: Before recall rounds 2 and 3, the app must run a listen-only relearning round over the target list. It must display and play one word at a time, show progress, and move on when playback ends. |
| S-VM-07 | Study difference: Listen-only phases must not open the microphone, request an answer, submit a scored phase response, or contribute to the displayed result. |
| S-VM-08 | Study difference: If a listen-only word fails to play, the app retries that word once. If the retry also fails, the app advances so the assessment does not remain stuck. |
| S-VM-09 | Study difference: The first three words in each listen-only round must show the reminder to remember the full word list for the next recall. |
Delayed recall and recognition
| ID | Requirement |
|---|---|
| S-VM-10 | Delayed recall must show a five-minute countdown before recording starts. The app must schedule a reminder for the final 60 seconds, then give the user 60 seconds to recall the words. |
| S-VM-11 | Delayed recall follows the same unique-word and early-completion rules as each immediate recall round. |
| S-VM-12 | Recognition training must teach the user to choose the word presented earlier. Each scored recognition trial must show two choices and allow 10 seconds for one selection. |
| S-VM-13 | Selecting a recognition word must submit immediately. If time expires, the app must submit the unanswered phase and continue. Choice order must remain stable within the assessment attempt. |
| S-VM-14 | After all recognition phases, the app must show the recognition task result and the choice from each phase before opening the full result. |
| S-VM-15 | Study difference: The final result must show five scored groups: immediate recall 1, immediate recall 2, immediate recall 3, delayed recall, and recognition. Round 1 word repetition and both listen-only rounds must not appear in the displayed total. |
| S-VM-16 | Training must not contribute to the displayed score. |
Technical notes
- The study task contract replaces the production
VM_IMMEDIATE_RECALLpath withVM_IMMEDIATE_RECALL_1,VM_ENCODE_LISTENING_1,VM_IMMEDIATE_RECALL_2,VM_ENCODE_LISTENING_2, andVM_IMMEDIATE_RECALL_3. The study backend model keeps the old task name only for legacy validation. - Learning and recall stream microphone audio through the speech WebSocket. The app validates transcripts once per second and when ASR returns a final result.
- Recall and learning store
TRANSCRIBE_WORD; early completion storesALLOW_CORRECT_SKIP; expiry storesTIMEOUT. - The app uploads recorded audio separately after phase submission. A failed upload is logged but does not block progress.
- Recognition records
CLICK_WORD.RESULT_TASKis a presentation phase and does not create another test answer.
Scoring
Each recall task counts unique matched target words. Recognition counts correct choices. The study result response exposes separate scores and totals for the three immediate recall tasks, delayed recall, and delayed recognition.
The study app displays:
score = immediate_recall_1_score
+ immediate_recall_2_score
+ immediate_recall_3_score
+ delayed_recall_score
+ delayed_recognition_score
maximum = immediate_recall_1_total
+ immediate_recall_2_total
+ immediate_recall_3_total
+ delayed_recall_total
+ delayed_recognition_totalVM_ENCODE has separate backend result fields but is omitted from this displayed calculation. The two listen-only tasks have no fields in the study result model. The exact study scorer and deployed totals could not be checked because the local Assessment/Result Service repository has no study branch.
Trail Making Test
What it is
The user draws a continuous ordered trail through numbered and symbolic nodes. C2Fit has character and dice variants. Both use the same task and scoring rules. Only the symbol presentation differs.
Study difference The study version enlarges node labels, adjusts Thai-character alignment, and uses revised dice images. The task flow, interaction rules, timing, and scoring match production.
Ordered flow
| Step | Task | Phase | What happens |
|---|---|---|---|
| 1 | INTRO | None | Shows the character or dice introduction. |
| 2 | TMT_NUMBER | TRAINING | Runs a frontend-only four-part tutorial for number order, symbol order, numbers with distractors, and alternating number and symbol order. |
| 3 | TMT_NUMBER | TESTING_1 | Connects 1-2-3...8. The shared question allows 60 seconds and has 8 scored nodes. |
| 4 | TMT_SYMBOL | TESTING_1 | Connects Thai characters or dice quantities in order. The shared question allows 90 seconds and has 8 scored nodes. |
| 5 | TMT_NUMBER_WITH_DISTRACTION | TESTING_1 | Connects numbers without entering distractors. The shared question allows 90 seconds and has 8 scored plus 2 distractor nodes. |
| 6 | TMT_NUMBER_AND_SYMBOL | TESTING_1 | Alternates number and character or dice nodes. The shared question allows 180 seconds and has 10 scored nodes. |
| 7 | RESULT | None | Shows all four task scores and their combined total. |
Detailed requirements
| ID | Requirement |
|---|---|
| S-TMT-01 | The assessment must support character and dice versions with the same task rules. Symbol nodes use Thai characters in the character version and dice quantities in the dice version. |
| S-TMT-02 | The layout must scale to the available screen while preserving configured positions and relative node sizes. Study difference: Study node labels use larger 28 px text. Thai characters are shifted upward within their hexagons, and the study dice assets use the revised proportions. |
| S-TMT-03 | Training must cover number order, symbol order, numbers with distractors, and alternating number and symbol order. The four sections allow 10, 15, 15, and 30 seconds and finish after 3, 3, 3, and 4 required nodes. |
| S-TMT-04 | Number testing must connect 1-2-3...8 within 60 seconds. Symbol testing must connect eight characters or dice quantities within 90 seconds. |
| S-TMT-05 | Number-with-distraction testing must contain eight required nodes and two distractors with a 90-second limit. Number-and-symbol testing must contain ten required alternating nodes with a 180-second limit. |
| S-TMT-06 | A trail must begin inside the first required node and continue through required nodes in displayed order. Distractors must never be part of the required order. |
| S-TMT-07 | Entering the next required node marks it correct and advances progress. Starting on or entering a wrong node marks an error and prevents further drawing until undo. |
| S-TMT-08 | The outer hint ring must preview whether the node under the trail is the next correct node. Moving away without entering restores its previous state. |
| S-TMT-09 | Undo must remove only the latest stroke. If the stroke caused an error, undo unlocks drawing. If it reached a correct node, undo also moves progress back by one required node. |
| S-TMT-10 | Reaching every required node must submit automatically. If time expires first, drawing stops and the app submits the partial trail. |
| S-TMT-11 | A required node earns 1 point only when its final state is correct. Distractors do not add to the total. A task is fully correct only when every required node is correct at submission. |
| S-TMT-12 | The result must show all four task scores and their combined total. Training does not count. |
Technical notes
- Character and dice versions start from the shared
TRAIL_MAKING_TESTpath. The Assessment Service maps generic symbol nodes to character or dice nodes. - Testing uses a logical 340-by-645 canvas before the frontend scales it.
- The detail upload retains node changes, sampled points, strokes, and undo events. Scoring uses each known node's final state.
Scoring
Each task has one testing phase. Its score is the number of scored nodes whose final state is GREEN_SOLID. Its total is the configured count of number and character or dice nodes.
The shared question set has a maximum of 8 + 8 + 8 + 10 = 34. Character and dice results use separate result collections.
Implementation source map
Paths are relative to the three C2Fit repositories listed in the project documentation. Branches and packages are explicit because there is no local Assessment/Result Service study branch.
| Area | Evidence used |
|---|---|
| Study task contract | c2fit-app-frontend study: lib/feature/journey/domain/enum/task.dart, lib/feature/journey/domain/enum/action.dart; local Go module c2fit-assessment-result/pkg/model@v0.0.18-study5/enum/ |
| Study version routing | c2fit-app-frontend study: lib/feature/api/network/api_service.dart; c2fit-bff origin/study: internal/pkg/middleware/version_context.go, internal/pkg/engine/journey_eng.go, internal/pkg/adaptor/convert.go |
| Shared journey branching | c2fit-bff origin/study: internal/pkg/engine/journey_eng.go |
| Attention Hold/Release | c2fit-app-frontend study: lib/feature/attention_hold_release/; shared scorer and seed files in c2fit-assessment-result main |
| Digit Span Speak | c2fit-app-frontend study: lib/feature/digit_span_speak/; shared path, question, and scorer files in c2fit-assessment-result main |
| Modified Visuospatial | c2fit-app-frontend study: lib/feature/modified_visuospatial/, lib/asset/mv-symbols/; shared path, branch, and scorer files in c2fit-assessment-result main and c2fit-bff origin/study |
| Drawing Memory | c2fit-app-frontend study: lib/feature/drawing_memory/; CLICK_REMOVE in the study model package; shared path and scorer files in c2fit-assessment-result main |
| Verbal Memory | c2fit-app-frontend study: lib/feature/verbal_memory/; study task names in the study model package; result aggregation in lib/feature/verbal_memory/util/calculate_assessment_score.dart |
| Trail Making Test | c2fit-app-frontend study: lib/feature/trail_making_test/, lib/asset/trail-making-test-dice/; shared path and scorer files in c2fit-assessment-result main |