{"v":"<h2 id=\"user-content-where-the-code-stands-today\" dir=\"auto\">Where the code stands today<\/h2>\n<p dir=\"auto\">Per visit type, part of this is already handled and part is not.<\/p>\n<table>\n<thead>\n<tr>\n<th>Varies by visit type<\/th>\n<th>Today<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Which forms<\/strong><\/td>\n<td><span class=\"emoji\" aria-label=\"check mark button\" data-alias=\"white_check_mark\">\u2705<\/span> The packet (<code>docs\/form-packets\/*.json<\/code>) decides, including <code>when<\/code> choices (PAS\/PHC vs PCS consent on the program).<\/td>\n<\/tr>\n<tr>\n<td><strong>Which questions, order, wording, conditions<\/strong><\/td>\n<td><span class=\"emoji\" aria-label=\"check mark button\" data-alias=\"white_check_mark\">\u2705<\/span> The structure allows it: there is one interview file per packet (<code>docs\/form-v2-interviews\/{PACKET}.json<\/code>). But <strong>only <code>SOC_AO.json<\/code> exists<\/strong>. The other 14 packets have no interview yet.<\/td>\n<\/tr>\n<tr>\n<td><strong>Answer choices<\/strong><\/td>\n<td><span class=\"emoji\" aria-label=\"warning\" data-alias=\"warning\">\u26a0\ufe0f<\/span> Only partly. Choices come from the form definition, which is global. An interview can relabel a choice and add <code>option_info<\/code>, but it can&#39;t offer a <strong>subset<\/strong> of the choices.<\/td>\n<\/tr>\n<tr>\n<td><strong>Fixed answers (never asked)<\/strong><\/td>\n<td><span class=\"emoji\" aria-label=\"cross mark\" data-alias=\"x\">\u274c<\/span> Not per visit type. A <code>derived<\/code> + <code>fixed<\/code> element in <code>code\/form_v2_shared.inc.php<\/code> is <strong>install-wide<\/strong>. Examples are supervision level = Non-RN and frequency = Q12\/PRN. Nothing lets a fixed value depend on the visit type.<\/td>\n<\/tr>\n<tr>\n<td><strong>Fixed answers that are <em>shown<\/em><\/strong><\/td>\n<td><span class=\"emoji\" aria-label=\"cross mark\" data-alias=\"x\">\u274c<\/span> A <code>fixed<\/code> element is never shown. A step&#39;s <code>shows<\/code> can only list values pinned from the record (<code>auth.*<\/code> etc.), not derived ones.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"user-content-concrete-cases-already-in-the-files\" dir=\"auto\">Concrete cases already in the files<\/h3>\n<ul dir=\"auto\">\n<li><strong>Client Information Sheet <code>visit_type<\/code><\/strong> (Start of Care \/ Annual Reassessment) is currently <em>asked<\/em> in SOC_AO, with help text &#34;almost always Start of Care&#34;. It should be fixed by the visit type: SOC_AO \u2192 <code>soc<\/code>, AR \u2192 <code>ar<\/code>.<\/li>\n<li><strong>3040 <code>attendant_{a,b,c}_visit_type<\/code><\/strong> (AO \/ SV \/ SA) is asked once per attendant. It is probably fixed by the visit type (SOC_AO \u2192 AO, SV \u2192 SV\u2026). There may be an exception when one attendant is new and another is being supervised.<\/li>\n<li><strong>3040 <code>visit_setting<\/code><\/strong> has help text &#34;Tick it at a first visit&#34;, so it is also visit-type dependent.<\/li>\n<\/ul>\n<h2 id=\"user-content-ideas\" dir=\"auto\">Ideas<\/h2>\n<ol dir=\"auto\">\n<li>\n<p dir=\"auto\"><strong>Make the visit type a fact.<\/strong> Add a pinned <code>visit.packet_code<\/code> (or <code>visit.type<\/code>) to <code>form_packet_facts()<\/code> \/ the visit&#39;s pins. Then every existing mechanism can key off it:<\/p>\n<ul dir=\"auto\">\n<li>conditions: <code>{&#34;==&#34;: [{&#34;field&#34;: &#34;visit.type&#34;}, &#34;AR&#34;]}<\/code><\/li>\n<li><code>shows<\/code> can show it (&#34;This is an Annual Reassessment&#34;)<\/li>\n<li>a derive can map it, e.g. <code>derive: {op: &#34;map&#34;, from: &#34;visit.type&#34;, values: {SOC_AO: &#34;soc&#34;, AR: &#34;ar&#34;}}<\/code><\/li>\n<\/ul>\n<p dir=\"auto\">This reuses the existing <code>map<\/code> op (#105) instead of inventing a new concept.<\/p>\n<\/li>\n<li>\n<p dir=\"auto\"><strong>Fixed answers per visit type: choose the file that declares them.<\/strong><\/p>\n<ul dir=\"auto\">\n<li><strong>(a)<\/strong> Use a <code>map<\/code>-from-visit-type derive in <code>form_v2_shared.inc.php<\/code> (the idea above). Everything stays in one place, but that file starts knowing about packets.<\/li>\n<li><strong>(b)<\/strong> Add a <code>fixed<\/code> block to each interview file (<code>&#34;fixed&#34;: {&#34;form.client-information-sheet.visit_type&#34;: &#34;soc&#34;}<\/code>), with an optional <code>&#34;show&#34;: true<\/code> per entry for answers the supervisor should see. This keeps &#34;what this visit type does&#34; in one file per visit type, as interviews are now.<\/li>\n<\/ul>\n<p dir=\"auto\">I lean towards <strong>(b)<\/strong> for anything that varies per visit type. I&#39;d keep <code>form_v2_shared<\/code> <code>fixed<\/code> for things that never vary at this customer. The publish check should refuse a key that is both fixed in the interview and asked in it.<\/p>\n<\/li>\n<li>\n<p dir=\"auto\"><strong>Shown vs hidden fixed answers:<\/strong> extend <code>shows<\/code> to accept a fixed\/derived element (read-only, in words, as pinned values are shown now). Anything not listed there stays silent and only prints.<\/p>\n<\/li>\n<li>\n<p dir=\"auto\"><strong>Choice subsets:<\/strong> allow an interview question to carry <code>&#34;only&#34;: [&#34;ao&#34;, &#34;sv&#34;]<\/code>. The rule would be that it may narrow a form&#39;s choices but never add one, the same principle as &#34;<code>required<\/code> can only be made stricter&#34;. If only one choice is left, it becomes a fixed answer.<\/p>\n<\/li>\n<li>\n<p dir=\"auto\"><strong>Write the next interview to test the design.<\/strong> AR is the obvious one, since it shares most forms with SOC_AO. Writing <code>AR.json<\/code> will show exactly which SOC_AO questions turn into fixed or shown answers, and which choices narrow.<\/p>\n<\/li>\n<\/ol>\n<h2 id=\"user-content-questions\" dir=\"auto\">Questions<\/h2>\n<ol dir=\"auto\">\n<li><strong>Combined visits.<\/strong> V2 runs <strong>one packet per visit<\/strong> today, even though <code>form_packet_merge()<\/code> can union several. Will staff ever do two visit types at once (e.g. AR + SV, or SOC + a transfer)? If so, two visit types may fix the same box differently (CIS <code>visit_type<\/code> = soc vs ar). We&#39;d need a precedence rule, or the publish check refuses the combination. Interviews would also need merging, which nothing does yet.<\/li>\n<li><strong>Which fixed answers should the supervisor see?<\/strong> Is the rule &#34;show anything the client is told or signs&#34; and hide administrative boxes? Or does the customer want to list them one by one?<\/li>\n<li><strong>3040 attendant visit type:<\/strong> is it always the same for every attendant on a visit, or can one attendant be AO while another is SV on the same visit?<\/li>\n<li><strong>Is there a list from the customer<\/strong> of per-visit-type differences, or do we derive it from the packets and the paper? The <code>Compliance RVSD. 5.13.2025<\/code> checklist names the forms but not the answers.<\/li>\n<li>Should a supervisor ever be able to <strong>override<\/strong> a fixed answer (e.g. a visit started as the wrong type)? Or is the answer always &#34;start the right visit type&#34;? I&#39;d suggest the latter, so the paper can&#39;t disagree with the visit record.<\/li>\n<\/ol>\n"}