{"v":"<p dir=\"auto\"><strong>Built (19 Oct).<\/strong> Owner&#39;s decisions: edits apply to new visits without a release; choices are switched off rather than removed, so stored answers stay valid; a new right controls who may edit.<\/p>\n<p dir=\"auto\"><strong>Admin \u2192 Answer Lists<\/strong> (<code>\/admin\/answer-lists<\/code>) edits the allergies (#81) and equipment (#135) lists:<\/p>\n<ul dir=\"auto\">\n<li><strong>Reword<\/strong> a choice, <strong>add<\/strong> choices (one per line), <strong>reorder<\/strong>, or untick <strong>Offered<\/strong> to stop offering one.<\/li>\n<li><strong>Nothing is deleted<\/strong>, because an earlier visit&#39;s answer may name the choice. A choice&#39;s stored value never changes; only its wording does.<\/li>\n<li><strong>&#34;No Known Allergies&#34; \/ &#34;None&#34; stay marked as excluding the rest<\/strong> and can&#39;t be switched off. A list must keep at least one other offered choice.<\/li>\n<li><strong>An edit reaches visits started after the save.<\/strong> Each visit copies the lists when it is prepared, so a visit in progress never changes under the supervisor. The paper prints the wording the visit copied.<\/li>\n<li><strong>Who may edit<\/strong> is set by the new rights <code>admin.answerLists\/View<\/code> and <code>admin.answerLists\/Edit<\/code> on the role grid. No role holds them yet: a Superuser can open the screen and hand them out. <em>Question for the customer: who should get them?<\/em><\/li>\n<li>Only a list printed on one line can be edited. A list printed as a box per choice has a measured box for each choice, and a new choice would have nowhere to print.<\/li>\n<\/ul>\n<p dir=\"auto\">Technical: a definition field names its list with <code>options_from<\/code>; its own options are the list until it is first saved. Tables <code>form_answer_list<\/code> \/ <code>form_answer_list_choice<\/code>, column <code>form_v2_visit.answer_lists_json<\/code> (<code>migrations\/20261019_answer-lists.sql<\/code>). Rules in <code>code\/form_answer_list_rules.inc.php<\/code> (pure), DB half in <code>code\/form_answer_lists.inc.php<\/code>; tests in <code>test-form-answer-lists<\/code> and <code>test-form-answer-lists-state<\/code>, plus the copy at preparation in <code>test-form-v2-visit-state<\/code>.<\/p>\n<p dir=\"auto\"><strong>On production:<\/strong> <code>php scripts\/migrate.php --apply<\/code>, then <code>php scripts\/sync-perms.php --apply<\/code>, then publish the next SOC\/AO release (which carries <code>options_from<\/code>).<\/p>\n"}