




































Updated: 23 November 2026
This document describes the current conversational search and booking implementation, the latest product requirements, and known gaps. It is a developer handoff, not a claim that every requirement in earlier design documents is implemented.
Later explicit product instructions override older diagrams and PDFs. In particular:
Offer these four conversation starters:
Follow-up and prescription renewal belong inside the known-doctor journey, not in separate starter tiles.
The normal application header has a guest sign-in button. Do not add a separate sign-in control to the Care Guide header or restore the removed floating bottom chat bubble.
Keep conversation, clinic selection, authentication, and booking in the same panel:
Conversation → Clinic selection → Guest authentication, if needed → Booking form
Never open another sidebar underneath or behind the active panel. Desktop panels share the existing approximately 420px width. Mobile layouts must fit the viewport without horizontal overflow.
I know my specialist
→ Patient enters the doctor's name
→ Show matching doctor identity
→ Offer direct Book, Follow-up, and Prescription renewal
→ Follow-up or renewal selected
→ “See available medical centers.”
→ Show clinic-location cards for that doctor
→ Patient selects a clinic
→ Guest: sign in or create an account
→ Signed in: booking form immediately
→ Review accepted coverage, date preference and visit details
→ Explicitly save
Each card displays:
Rules:
Current implementation identifies additional location records by normalized doctor name and matching category, then deduplicates normalized addresses. A stable provider identity with separate clinic-location records would be safer if the directory grows; matching names alone is not an authoritative identity registry.
Do not offer Today / Tomorrow / Later / Not sure pills or ask when medication runs out in this journey.
Do not make patients re-enter city/postcode before showing the selected doctor's centers. Preserve previously supplied location, coverage and preferred date.
Legacy conversations that still contain the retired run-out question resume at clinic selection.
| Selection | Conversation intent | Booking reason |
|---|---|---|
| Follow-up | follow_up |
Follow-up |
| Prescription renewal | prescription |
Prescription renewal |
Keep the selected doctor, clinic record, and purpose through login/signup and into the booking form.
Renewal uses accepted public or private coverage, not Self pay. Clear a previously selected Self pay value only for this local renewal journey; do not overwrite the patient's saved preference globally.
Selecting renewal does not guarantee a prescription. A clinician decides whether renewal is appropriate.
Patient describes symptoms
→ Safety checks / triage
→ Tentative, symptom-appropriate specialist suggestion
→ Coverage pills immediately
→ Collect only missing search details
→ Exact or same-specialty partial results
→ Select doctor and enter booking review
The visible acknowledgement uses controlled symptom descriptions. The triage model's free-text diagnostic summary is not displayed as clinical advice.
Use pills for insurance selection:
Known-doctor booking must use that doctor's accepted options. Selecting a coverage pill is not consent to save a preference to the account.
Saved coverage may be displayed inline with a Make a change link. Avoid duplicate prompts, repeated action pairs, or extra authentication controls.
Public specialist booking normally requires referral confirmation. Do not silently replace the patient's coverage when a doctor does not accept it.
The current search uses address/city/postcode evidence, not verified distance-based geocoding.
When filters do not match exactly, show doctors of the same requested specialty, allowing differences in:
Explain the relevant differences on the cards. Partial matches can open booking review; this is not permission to silently accept incompatible coverage or bypass validation.
Never fill partial results with unrelated specialists solely because their insurance or location matches.
An established specialty remains authoritative across location/coverage edits. Only a deliberate patient specialty change or appropriate new safety/clinical routing should replace it.
Alternatives can only be shown if that specialty exists in the directory. The current catalog does not cover every specialty to which triage can route, including primary care. Therefore, the product goal of always showing a same-specialty alternative is not fully satisfied.
Do not solve absent provider supply by inventing doctors, claiming unsupported coverage, or relabeling an unrelated specialist.
tel:112 call action immediately when Urgent care is selected.Selecting a bookable clinic opens Sign in or create an account inside the booking panel. Nothing is submitted automatically.
Successful authentication returns to the selected doctor's booking form, preserving the clinic and visit purpose.
Selecting a clinic opens the booking form directly, without another login prompt.
The form validates required details, accepted coverage, and referral requirements. A partial mismatch must remain visible and resolvable.
After a successful local save:
/appointments.Do not add another confirmation recap or a required Done action. A failed save keeps the form open and must not navigate away.
Server ownership comes from the authenticated session, never a patient/user ID supplied by the client. Legacy ownerless appointments must not be assigned by guessing from names or emails.
The current flow saves an appointment request/preferred date, not a live confirmed slot.
Calendly has been connected, but the application does not yet provide the fully integrated live-slot selection and confirmed-booking behavior previously requested. Do not describe this handoff as confirmation that this integration is complete.
External/contact-only clinic records open contact information rather than pretending that an appointment has been booked.
| File | Responsibility |
|---|---|
shared/doxy.ts |
Conversation filter state and structured block types |
shared/doxy-presentation.ts |
Deduplicate presentation/actions and constrain same-specialty result cards |
shared/specialist-search.ts |
Specialty aliases and normalized name matching |
shared/location-matching.ts |
Address/city/postcode match evidence |
shared/doxy-safety.ts |
Red flags, emergency blocks and crisis contacts |
shared/verified-clinics.ts |
Verified external-clinic metadata and contact-only behavior |
server/doxyAgent.ts |
Turn orchestration, deterministic shortcuts and controlled tool/model interaction |
server/doxyNamedDoctor.ts |
Name lookup, purpose selection and clinic choices |
server/doxyTools.ts |
Actual provider lookup, coverage checks and booking preparation |
server/doxySymptomGuidance.ts |
Controlled symptom-specific recommendation copy |
server/healthAssistant.ts |
Triage model instructions and legacy assistant support |
server/appointmentRoutes.ts |
Authenticated appointment retrieval and save validation |
client/src/components/DoxyChat.tsx |
Conversation rendering, state and booking handoff |
client/src/components/DoxyBlockRenderer.tsx |
Structured blocks, pills and clinic cards |
client/src/pages/Home.tsx |
Shared side-panel ownership and booking context |
client/src/components/BookingModal.tsx |
Embedded guest authentication and booking form |
client/src/pages/Login.tsx |
Existing custom PIN sign-in/sign-up UI |
Authentication is the project's existing custom PIN/session implementation. This change does not introduce Clerk or Replit Auth.
The follow-up and renewal actions use these internal user-message markers:
__doctor_visit__:<doctorId>:follow-up
__doctor_visit__:<doctorId>:prescription renewal
The server resolves the doctor against the current directory and returns:
type ClinicChoicesBlock = {
type: "clinic_choices";
doctors: DoxyDoctor[];
};
DoxyDoctor snapshots supply identity, address and listed coverage; they are not evidence of a confirmed slot.
The response also includes the updated conversation state with selectedDoctorId, intent, and visit_reason. It clears retired awaitingRunOut state and stale result display state.
On card click, the client:
Current test selectors:
button-known-doctor-follow-up-<doctorId>
button-known-doctor-renewal-<doctorId>
doxy-clinic-choices
button-doxy-clinic-<doctorId>
booking-auth-in-panel
Do not allow an LLM to supply authoritative clinic/provider records or bypass server-side booking validation.
npm run dev
npm run check
node --import tsx --test \
server/doxy.test.ts \
shared/doxy-presentation.test.ts \
client/src/components/DoxyBlockRenderer.test.ts
node --import tsx --test server/doxySymptomGuidance.test.ts
The three-file clinic-flow test set passed 119 tests at this handoff. Type checking also passed.
The narrow-screen guest authentication path was not separately exercised in the latest browser pass.
Keep these gaps explicit. Do not conceal them with fabricated availability, duplicate UI, silently changed filters, or unsupported confirmation language.
Finding the right doctor starts with understanding the patient's need and guide them. Care Guide translates what patients describe into a relevant search, making healthcare easier to navigate without requiring them to understand the medical system first.
Trust comes from transparency and keeping patients in control. Explaining why a doctor matches, making coverage limitations visible and distinguishing exact from partial matches helps patients make informed decisions. The patient should always decide what happens next.
As Doc Connect is still a prototype, I cannot claim that Care Guide improves doctor discovery or booking completion. If used by patients, I would focus on three areas:
The next step is to validate these assumptions with real patients and understand whether Care Guide makes finding and choosing the right doctor easier, clearer and more trustworthy.