StealThis .dev

Clinic — Referral / Consult Request

A referral and consult request form for sending a patient to a specialist. A read-only patient chip anchors the request, a specialty select and segmented Routine / Urgent / Emergent urgency control set its scope, and twin textareas capture the reason and relevant history. An Attach results checklist toggles Labs, Imaging and Notes while a live preview card mirrors every field, then submit validates required fields and flips to a confirmation state with a generated reference number and toast.

लैब में खोलें
html css vanilla-js
Targets: JS HTML

Code

Referral / Consult Request

A two-column referral workspace for routing a patient to a specialist. The patient is fixed as a locked, read-only chip so the request can never be misattributed, while the Refer to specialty select, a segmented Routine / Urgent / Emergent urgency control, and two textareas for the reason and relevant history make up the body of the request. An Attach results checklist lets the referrer pull in Labs, Imaging and clinical Notes already on file.

Alongside the form sits a live preview card that mirrors the referral as it is written — the urgency badge changes tone, the specialty, reason, history and attachment tags fill in, and a draft pill flips from Draft to Ready to send once the required fields are present. Character counters track each textarea and the urgency control is fully keyboard-operable with arrow keys.

Submitting validates the required specialty and reason, surfacing inline errors and a toast if anything is missing. When the request is complete the preview flips to a confirmation state with a generated reference number such as REF-2026-0481, a summary of the routed details, and a path to start a new referral. All interactions are vanilla JS.

Illustrative UI only — not intended for real medical use.