Files
portal/runs/physio-2026-09-22/model.json
T
Bendik Aagaard LynghaugandClaude Fable 5.1 255aeb4f4b plan: intake to plan by a model; doors, labelled groups, the whole card
Work from another session, committed as found (tests green):

- `plan` reads an intake into a plan.yaml (a model decides needs,
  stages, forms and budgets; a person reads the result before build).
- Plans gain `doors` (a first question before the forms, when a front
  door would carry more than five needs), `groups` with labels that a
  select may draw its options from (`options_from: groups`), `private`
  fields kept off public pages, `multiple` selects, and `max_fields`
  as what the intake said the person will tolerate.
- `card.rs`: an alternative as the visitor meets it, in text, so the
  answering visitor and `rate` read the served card, not the heading.
- `rate` reads followup pages from the repo and reports "what happens
  next" as not measured rather than zero when it cannot.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L4jrCgLiKKHAEFuZUJjckH
2026-09-23 12:31:51 +02:00

652 lines
17 KiB
JSON

{
"buckets": {
"approvals": {
"desks": [
{
"group": "reception",
"moves": [
{
"from": "open",
"label": "Send request",
"to": "sent"
},
{
"from": "open",
"label": "Mark refused",
"to": "refused"
},
{
"from": "sent",
"label": "Mark approved",
"to": "approved"
},
{
"from": "sent",
"label": "Mark refused",
"to": "refused"
}
],
"page": "/reception"
}
],
"initial": "open",
"self_moves": [],
"transitions": {
"open": [
"sent",
"refused"
],
"sent": [
"approved",
"refused"
]
}
},
"cancellations": {
"desks": [
{
"group": "reception",
"moves": [
{
"from": "open",
"label": "Move to rebooked",
"to": "rebooked"
},
{
"from": "open",
"label": "Release slot",
"to": "released"
}
],
"page": "/reception"
}
],
"initial": "open",
"self_moves": [],
"transitions": {
"open": [
"rebooked",
"released"
]
}
},
"no_shows": {
"desks": [
{
"group": "reception",
"moves": [
{
"from": "contacted",
"label": "Rebook patient",
"to": "rebooked"
},
{
"from": "contacted",
"label": "Close case",
"to": "closed"
},
{
"from": "open",
"label": "Contact patient",
"to": "contacted"
},
{
"from": "open",
"label": "Close case",
"to": "closed"
}
],
"page": "/reception"
}
],
"initial": "open",
"self_moves": [],
"transitions": {
"contacted": [
"rebooked",
"closed"
],
"open": [
"contacted",
"closed"
]
}
},
"referrals": {
"desks": [
{
"group": "reception",
"moves": [
{
"from": "accepted",
"label": "Accept & book",
"to": "booked"
},
{
"from": "accepted",
"label": "Return to referrer",
"to": "returned"
},
{
"from": "booked",
"label": "Mark returned",
"to": "returned"
},
{
"from": "open",
"label": "Accept referral",
"to": "accepted"
},
{
"from": "open",
"label": "Return referral",
"to": "returned"
}
],
"page": "/reception"
},
{
"group": "therapists",
"moves": [
{
"from": "booked",
"label": "Mark as reported",
"to": "reported"
}
],
"page": "/therapists"
}
],
"initial": "open",
"self_moves": [],
"transitions": {
"accepted": [
"booked",
"returned"
],
"booked": [
"reported",
"returned"
],
"open": [
"accepted",
"returned"
]
}
},
"requests": {
"desks": [
{
"group": "reception",
"moves": [
{
"from": "offered",
"label": "Offer & book",
"to": "booked"
},
{
"from": "offered",
"label": "Offer declined",
"to": "declined"
},
{
"from": "open",
"label": "Offer appointment",
"to": "offered"
},
{
"from": "open",
"label": "Decline offer",
"to": "declined"
}
],
"page": "/reception"
}
],
"initial": "open",
"self_moves": [],
"transitions": {
"offered": [
"booked",
"declined"
],
"open": [
"offered",
"declined"
]
}
}
},
"needs": [
{
"done_when": [
"booked",
"declined"
],
"enters_as": null,
"handled_by": "reception",
"id": "new-patient",
"lands_in": "requests",
"steps": [
{
"alternative": "I have pain or an injury",
"expect": [
"I have pain or an injury"
],
"fields": [],
"options": [
{
"description": "You have pain, an injury, or a new appointment you need to manage.",
"name": "I have pain or an injury"
},
{
"description": "You are sending someone to us for treatment or a report.",
"name": "I am a GP or hospital"
}
],
"page": "/",
"question": "Who are you?"
},
{
"alternative": "Book your first appointment",
"expect": [
"Book your first appointment"
],
"fields": [
{
"label": "Your name",
"name": "name",
"optional": false,
"options": [],
"type": "text"
},
{
"label": "Phone number",
"name": "phone",
"optional": false,
"options": [],
"type": "tel"
},
{
"label": "What hurts",
"name": "what_hurts",
"optional": false,
"options": [],
"type": "textarea"
},
{
"label": "When did it start?",
"name": "when",
"optional": false,
"options": [
"Mornings",
"Afternoons",
"Any time"
],
"type": "select"
},
{
"label": "Sent by a doctor?",
"name": "sent_by_doctor",
"optional": true,
"options": [
"Yes",
"No"
],
"type": "select"
}
],
"options": [
{
"description": "We'll match you with a therapist who suits your needs.",
"name": "Book your first appointment"
},
{
"description": "Let us know if you can't make it or need a new time.",
"name": "Move or cancel your appointment"
}
],
"page": "/patients",
"question": "What brings you here today?"
}
],
"success": [
"booked"
],
"wants": "a first appointment with a therapist who suits them",
"who": "someone with something that hurts"
},
{
"done_when": [
"rebooked",
"released"
],
"enters_as": null,
"handled_by": "reception",
"id": "move-or-cancel",
"lands_in": "cancellations",
"steps": [
{
"alternative": "I have pain or an injury",
"expect": [
"I have pain or an injury"
],
"fields": [],
"options": [
{
"description": "You have pain, an injury, or a new appointment you need to manage.",
"name": "I have pain or an injury"
},
{
"description": "You are sending someone to us for treatment or a report.",
"name": "I am a GP or hospital"
}
],
"page": "/",
"question": "Who are you?"
},
{
"alternative": "Move or cancel your appointment",
"expect": [
"Move or cancel your appointment"
],
"fields": [
{
"label": "Your name",
"name": "name",
"optional": false,
"options": [],
"type": "text"
},
{
"label": "Phone number",
"name": "phone",
"optional": false,
"options": [],
"type": "tel"
},
{
"label": "Appointment day",
"name": "appointment_day",
"optional": false,
"options": [],
"type": "date"
},
{
"label": "New time preference",
"name": "new_time_wish",
"optional": true,
"options": [],
"type": "text"
}
],
"options": [
{
"description": "We'll match you with a therapist who suits your needs.",
"name": "Book your first appointment"
},
{
"description": "Let us know if you can't make it or need a new time.",
"name": "Move or cancel your appointment"
}
],
"page": "/patients",
"question": "What brings you here today?"
}
],
"success": [
"rebooked"
],
"wants": "the time moved, or the slot freed",
"who": "a patient who already has a time and cannot come"
},
{
"done_when": [
"reported",
"returned"
],
"enters_as": null,
"handled_by": "reception",
"id": "referral",
"lands_in": "referrals",
"steps": [
{
"alternative": "I am a GP or hospital",
"expect": [
"I am a GP or hospital"
],
"fields": [],
"options": [
{
"description": "You have pain, an injury, or a new appointment you need to manage.",
"name": "I have pain or an injury"
},
{
"description": "You are sending someone to us for treatment or a report.",
"name": "I am a GP or hospital"
}
],
"page": "/",
"question": "Who are you?"
},
{
"alternative": "Send a patient for physiotherapy",
"expect": [
"Send a patient for physiotherapy"
],
"fields": [
{
"label": "Patient's full name",
"name": "patient_name",
"optional": false,
"options": [],
"type": "text"
},
{
"label": "Patient's phone number",
"name": "patient_phone",
"optional": false,
"options": [],
"type": "tel"
},
{
"label": "Your name and clinic",
"name": "referrer",
"optional": false,
"options": [],
"type": "text"
},
{
"label": "Reason for referral",
"name": "what_for",
"optional": false,
"options": [],
"type": "textarea"
},
{
"label": "How urgent is the need?",
"name": "urgency",
"optional": false,
"options": [
"This week",
"Within a month",
"Routine"
],
"type": "select"
}
],
"options": [
{
"description": "Tell us about the patient and we will contact them to start treatment.",
"name": "Send a patient for physiotherapy"
}
],
"page": "/referrers",
"question": "Are you sending a patient to us, or do you have a question about a referral?"
}
],
"success": [
"reported"
],
"wants": "the patient seen, and a report back when the course ends",
"who": "a GP or a hospital ward sending a patient"
},
{
"done_when": [
"approved",
"refused"
],
"enters_as": "reception",
"handled_by": "reception",
"id": "insurance-approval",
"lands_in": "approvals",
"steps": [
{
"alternative": "Request insurance approval",
"expect": [
"Request insurance approval"
],
"fields": [
{
"label": "Patient name",
"name": "patient_name",
"optional": false,
"options": [],
"type": "text"
},
{
"label": "Insurer",
"name": "insurer",
"optional": false,
"options": [],
"type": "text"
},
{
"label": "Number of sessions",
"name": "sessions",
"optional": false,
"options": [],
"type": "text"
},
{
"label": "Case number",
"name": "case_number",
"optional": true,
"options": [],
"type": "text"
}
],
"options": [
{
"description": "Send the insurance approval request and keep the answer attached to the patient's case file.",
"name": "Request insurance approval"
}
],
"page": "/reception/insurance-approval",
"question": "Do you need insurance approval for this patient's treatment?"
}
],
"success": [
"approved"
],
"wants": "the request sent and its answer kept where the patient's case is",
"who": "the receptionist, before a course that an insurer has to approve"
},
{
"done_when": [
"rebooked",
"closed"
],
"enters_as": "therapists",
"handled_by": "reception",
"id": "no-show",
"lands_in": "no_shows",
"steps": [
{
"alternative": "Report a no-show patient",
"expect": [
"Report a no-show patient"
],
"fields": [
{
"label": "Patient name",
"name": "patient_name",
"optional": false,
"options": [],
"type": "text"
},
{
"label": "Appointment date",
"name": "appointment_day",
"optional": false,
"options": [],
"type": "date"
},
{
"label": "Additional note",
"name": "note",
"optional": true,
"options": [],
"type": "text"
}
],
"options": [
{
"description": "Report a patient who didn't show up so we can follow up and fill the slot.",
"name": "Report a no-show patient"
}
],
"page": "/therapists/no-show",
"question": "Did a patient miss their appointment without calling?"
}
],
"success": [
"rebooked"
],
"wants": "the reception to ring them and get them back in",
"who": "a therapist whose patient did not turn up and did not call"
}
],
"personas": [
{
"id": "runner-knee",
"need": "new-patient",
"text": "I've been running for years and the outside of my right knee has started hurting after about five kilometres. I'd like someone to have a look, preferably in the mornings."
},
{
"id": "post-surgery-mother",
"need": "new-patient",
"text": "My mother had a hip replacement three weeks ago and the hospital said she needs training. She can't do much on her own and I'll drive her."
},
{
"id": "sick-child",
"need": "move-or-cancel",
"text": "I have a session on Thursday at ten but my daughter has a fever and I can't come. Can I move it?"
},
{
"id": "sent-abroad",
"need": "move-or-cancel",
"text": "Work is sending me abroad next week so my appointment on the 3rd is off. Just free the slot, I'll be in touch when I'm back."
},
{
"id": "gp-shoulder",
"need": "referral",
"text": "I'm a GP. A patient of mine has a frozen shoulder that isn't improving with what I can offer. I'd like her to start with you and hear how it goes."
},
{
"id": "hospital-discharge",
"need": "referral",
"text": "Orthopaedic ward here. We're discharging a man after an ankle fracture on Friday and need follow-up rehab arranged near where he lives. He'll need a report for his sick leave."
},
{
"id": "reception-approval",
"need": "insurance-approval",
"text": "The patient in room two has a policy that covers twelve sessions if the insurer signs off first. I need to send that off and keep track of the answer."
},
{
"id": "therapist-no-show",
"need": "no-show",
"text": "My two o'clock didn't turn up and didn't call. Second time. Someone needs to ring him."
}
]
}