[Epic] Connect the end-to-end patient journey (request → intake → evaluator → referral → session → notes)

Open
#285 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Domain
full-stack

Research direction

Start with the stage-status table and work breakdown, then read the linked child issues (#287–#300) rather than treating this epic as one change. The mentioned entry points include createAccount.vue, contactForm.vue, prisma/seed.ts, and the session appointment and referral endpoints. Done means the documented patient journey works end to end without manual database edits.

Written by the indexing model from the issue text.

Description

enhancement P1: high

The intended user journey

The core business flow the app exists to support:

  1. A patient/guardian submits a request form.
  2. USER_SERVICE reviews it and creates the patient record (intake).
  3. USER_SERVICE sets up an appointment between the patient and a neurodeveloper (EVALUATOR).
  4. The evaluator sends therapist referrals.
  5. USER_SERVICE books therapy sessions with the referred therapists.
  6. Therapists and patients attend those sessions.
  7. Therapists take notes for those sessions.

…plus the prerequisite: adding the staff users (therapists, evaluators, user-service, etc.) into the system in the first place.

Current verdict

Each stage largely works in isolation, but the journey is a chain and the links between stages are missing — the stages are disconnected islands that each re-key or re-create data. Two foundational problems sit underneath: you cannot add any user through the UI, and patients/guardians effectively cannot log in. A real patient cannot travel from "submitted a request" to "therapist wrote a note" without someone editing the database in the middle.

This epic tracks the work to connect the journey end-to-end.

Stage status (from the analysis)
# Stage Status The catch
0 Add users 🔴 Broken createAccount.vue is a dead stub; no endpoint. Only prisma/seed.ts makes login-capable typed users.
1 Request form 🟢 Works Public form → Request row.
2 Intake → create patient 🟡 Partial Works via intake; no dedupe; never creates a ContactForm.
2→3 Handoff 🔴 Missing Intake never creates an AppointmentRequest.
3 Assign evaluator + book eval appt 🔴 Dead Machinery works, but operates on rows nothing creates; evaluator picked by raw UUID.
4 Therapist referrals 🟢 Works Create + review + assign-therapist all wired.
4→5 Handoff 🔴 Missing Assigning a therapist to a referral creates no session; no referral→session link.
5 Book therapy sessions 🟡 Partial Works, but purely manual; blocked on empty SessionType (fresh DB).
6 Attend sessions 🟡 Partial Therapist side works; patient side coded but unreachable (no patient login).
7 Session notes 🟡 Partial Works from patient profile; but per-patient not per-session, and author never recorded.

The broken seams (the heart of the problem)

  • Intake → evaluator queue: completing intake creates a Patient and sets Request.status = SCHEDULING, but creates no AppointmentRequest. The only appointmentRequest.create (server/api/session/appointments/index.post.ts) has no caller anywhere, so the evaluator-assignment screen is always empty.
  • Referral → therapy booking: server/api/session/referrals/index.put.ts connects a therapist to a referral and stops — no Session, and TherapistReferral has no FK to Session. Referrals never become booked sessions.
  • Patient identity is re-created at each step: the public contactForm.vue, intake, and the appointment endpoint each create their own Patient with no shared dedupe.

Work breakdown

A — Account foundation (unblocks everything):

  • #286 — Build account-creation endpoint + fix createAccount.vue
  • #287 — First-login / invite path (OTP + disableSignUp blocks new users)
  • #288 — Patient/guardian login capability

B — Reconnect the pipeline:

  • #289 — Intake → create AppointmentRequest (evaluator queue)
  • #290 — Referral → create bookable therapy Session
  • #291 — Single Patient identity + dedupe across paths
  • #292 — Replace raw-UUID evaluator/therapist pickers with real lists

C — Notes correctness:

  • #293 — Tie TherapyNote to a session (sessionId)
  • #294 — Record note authorship (submitterId fix)
  • #295 — Align note edit (PUT) validation with create (POST)

D — Robustness / cleanup:

  • #296 — Guarantee SessionType rows (seed/UI)
  • #297 — Access-control inconsistencies
  • #298 — Orphaned progress-report feature (Report)
  • #299 — Misleading component/route names
  • #300 — Scheduling edge cases (past-session attendance, edit-time unique collision)

🤖 Generated with Claude Code

Dominant language
Vue
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from UTDallasEPICS/connected-care

All issues in UTDallasEPICS/connected-care

Similar issues

More Web Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.