{"v":"<h2 id=\"user-content-where-this-stands-today\" dir=\"auto\">Where this stands today<\/h2>\n<p dir=\"auto\">The visit sidebar (<code>renderSteps()<\/code> in <code>pages\/visit-v2.php<\/code>) shows each section with an <strong>answered \/ shown<\/strong> count. Nothing records which sections the filler has actually opened. The visit stores only <code>current_step<\/code>. So when an answer reveals new questions in a later section, the only sign is a count changing from 4\/4 to 4\/6, which is easy to miss. The Check step lists missing <em>required<\/em> answers, but an optional question that newly appears is never pointed out at all.<\/p>\n<h2 id=\"user-content-proposed-plan\" dir=\"auto\">Proposed plan<\/h2>\n<p dir=\"auto\"><strong>Track what has been shown, per question, on the server.<\/strong> Do not track it per section, and do not track it in the browser.<\/p>\n<ul dir=\"auto\">\n<li>Record a question as <strong>seen<\/strong> when its section is open and the question is visible at that moment. The page already saves on every step change (<code>pendingStep<\/code>), so the save carries the visible question keys of the section being left and the server records them. Question keys are not PHI. I&#39;d use a small table, <code>form_v2_visit_seen (fk_form_v2_visit, question_key, first_seen_at, seen_by)<\/code>, through a migration. It lives on the server so a visit resumed on another iPad, or after a reload, keeps it.<\/li>\n<li><strong>Waiting<\/strong> = visible now, not yet seen, and not answered. The server computes it beside <code>form_v2_visit_progress()<\/code> (pure, in <code>form_v2_visit_rules.inc.php<\/code>) and returns it per section with the progress.<\/li>\n<li><strong>The re-flag from the description comes for free.<\/strong> A question revealed by a later answer was never seen, so its section lights up. If the answer is changed back and the question hides again, the flag goes away. If it was seen once, hidden, then shown again, it stays seen. See question 2.<\/li>\n<\/ul>\n<p dir=\"auto\"><strong>On screen:<\/strong><\/p>\n<ul dir=\"auto\">\n<li>The sidebar shows a dot and &#34;<em>N new<\/em>&#34; on a section with waiting questions, beside the existing count. Inside the section, the waiting questions carry a small <strong>New<\/strong> label until the section is left.<\/li>\n<li>After a save that reveals questions in <em>another<\/em> section, show a short notice: &#34;This answer added questions in <em>Emergencies<\/em>&#34;, with a link.<\/li>\n<li>The Check step lists &#34;Sections with questions you haven&#39;t seen&#34; above the issues, each with a link.<\/li>\n<\/ul>\n<p dir=\"auto\"><strong>Tests:<\/strong> pure rule cases (seen\/visible\/answered combinations; hidden then revealed), plus a state test showing the seen set survives a reload and that a step change records only that section&#39;s visible questions.<\/p>\n<h2 id=\"user-content-questions\" dir=\"auto\">Questions<\/h2>\n<ol dir=\"auto\">\n<li><strong>Should a question that is already filled in from VESTA count as waiting if nobody has opened its section?<\/strong> Its value came from the record, not from the client. My recommendation: <strong>yes<\/strong>. &#34;Seen&#34; means the filler looked at it, and a prefilled authorization answer is exactly the kind that may be out of date. The flag would then mean &#34;not looked at&#34;, not &#34;not answered&#34;. The catch: on a fresh visit every section starts flagged, which is arguably right.<\/li>\n<li><strong>Seen once, hidden, then revealed again with its old answer:<\/strong> flag it again? The plan (\u00a76) says a reactivated branch &#34;requires review before those saved answers become current again&#34;. That suggests <strong>yes<\/strong>, so I&#39;d clear &#34;seen&#34; when a question hides. Please confirm.<\/li>\n<li><strong>Does a waiting question block Generate forms?<\/strong> I&#39;d <strong>block<\/strong>, with the list of sections as the reason. Otherwise forms can be printed with a question nobody asked. The alternative is a warning the filler can override. This is the same decision as question 3 on #165.<\/li>\n<\/ol>\n<p dir=\"auto\">#165 depends on this for its &#34;revisit these sections&#34; half, so I&#39;d build this one first.<\/p>\n"}