Blueprint · Health

Clinic referral handoff

One clinic refers a patient to another. The receiving clinic accepts or declines the referral with a reason. Both clinics can see every referral still waiting for an answer, and one that has waited too long is chased automatically.

L2–L4

Level range

8

Sprints

40

Tasks

Backend and frontend

Built as

By the last sprint

What you’ll build

A referral system between clinics. One clinic sends a referral that carries only what the other clinic needs to see. The receiving clinic accepts or declines it with a reason, and the sending clinic is told by email, without watching the screen. Both clinics see everything still waiting on the other side, and referrals nobody has answered are chased automatically.

What you’ll learn

A skill in every sprint

You show you have it in a pull request your team reviews, then explain it in a walkthrough.

01

Authentication

You can register and sign in a user, keep a request authenticated without asking for the password again, and explain where the credential lives in the browser and why there rather than somewhere else.

02

Referring a patient onward

You can create a referral, share exactly the records it covers, and show that access ends when the referral does.

03

Search and filtering

You can search a list by keyword, combine that with filters, and say what the database does to answer the query — including which part uses an index and which part cannot.

04

Notifications people do not mute

You can notify a user when an event concerns them, show an unread count that survives a refresh, and honour a preference that says stop.

05

Background jobs

You can hand work to a worker, tell the user it is in progress, and show the result when it lands — and say what happens to that work if the process dies halfway.

06

Email verification

You can issue a verification link, activate the account when it is followed, and explain what the link contains and why it cannot simply be a user id.

07

Going live

Somebody who has never met you can open a URL and use the product — and you can say what is different about the copy running there, where its secrets come from, and what you do when a release turns out to be wrong.

The roadmap

8 sprints, 40 tasks

Every sprint has a goal and a set of tasks. Open a sprint to see the tasks you will pick up.

  1. Sprint 01

    Two clinics, two front doors

    Somebody can register a clinic, invite a colleague into it, and sign back in to the same clinic the next day.

    4 tasks
    1. Let a clinic register and start using the product straight away
    2. Let staff sign in again later and sign out safely on a shared computer
    3. Let staff invite a colleague into their clinic
    4. Make the clinic, not the person who registered it, own everything
  2. Sprint 02

    Sending it

    One clinic writes a referral and sends it to another clinic, which can read that referral and nothing else about the patient.

    5 tasks
    1. Let clinics say what they treat and find each other in a directory
    2. Let a clinic write a referral and save it before it is finished
    3. Send a referral so it appears at the receiving clinic
    4. Let a clinic read only the referrals it sent or received
    5. Let the sending clinic withdraw a referral sent to the wrong clinic
  3. Sprint 03

    The other end answers

    The receiving clinic accepts a referral or declines it with a reason, a referral can only ever have one answer, and a clinic that declines loses access to the patient's details.

    5 tasks
    1. Let the receiving clinic accept a referral
    2. Let the receiving clinic decline a referral with a reason
    3. Make sure a referral can only ever have one answer
    4. End a clinic's access to the patient's details when it declines
    5. Show both clinics the same history of each referral
  4. Sprint 04

    Neither side loses track

    Each clinic opens one screen that lists its outstanding work, and no referral is skipped while colleagues work through it.

    5 tasks
    1. Record when the receiving clinic first opens a referral
    2. Give the receiving clinic one queue of referrals to answer
    3. Give the sending clinic a list of everything it is waiting on
    4. Let both clinics filter and search their referral lists
    5. Stop referrals being skipped when the queue changes during paging
  5. Sprint 05

    Told without watching the screen

    Each clinic is told by email what happened to its referrals without keeping the product open, with routine news in one daily summary and urgent news straight away.

    5 tasks
    1. Email the receiving clinic when a referral arrives
    2. Email the sending clinic when its referral is accepted or declined
    3. Keep every detail that identifies the patient out of emails
    4. Gather routine referral news into one daily summary per clinic
    5. Send urgent referrals and their answers straight away
  6. Sprint 06

    Nothing waits forever

    The product notices an unanswered referral by itself, chases it once rather than four times, and reports when its own work fails.

    5 tasks
    1. Send each clinic's daily summary automatically at its chosen hour
    2. Let each clinic set how quickly it aims to answer each urgency
    3. Chase referrals that pass their target without an answer
    4. Make sure the same chase is never sent twice
    5. Report failed scheduled work to whoever runs the product
  7. Sprint 07

    Proving the address

    A clinic can only send or receive referrals once somebody there has proved they can read its email address.

    5 tasks
    1. Ask each new clinic to prove it can read its email address
    2. Keep clinics with unconfirmed addresses out of the directory
    3. Make the confirmation link unguessable, single use and short lived
    4. Help a clinic whose confirmation email is slow, lost or mistyped
    5. Keep the old address working until a new clinic address is confirmed
  8. Sprint 08

    Where both clinics are

    Two clinics on two different networks use the same product at the same web address, and nobody has to keep a laptop open.

    6 tasks
    1. Put the product on a server two clinics can reach from anywhere
    2. Move every setting and secret out of the code and onto the server
    3. Run the scheduled summaries and chases on the server
    4. Deliver the product's emails to real inboxes
    5. Give the product a short web address with a secure connection
    6. Make a bad release quick to undo
The reading

Read before you build

Senior engineers read the docs before they touch the code. Every Blueprint comes with short documents on the product and its world, the kind a team hands a new hire. Read them well and you ask sharper questions and walk into every review prepared.

What you are building

The product, the two clinics that use it, what it does not do, and what finished means.

Both ends of a handoff

Background on referrals: what one contains, why the wait for an answer is the risky part, what a decline is for, and two designs we chose not to build.

More health Blueprints

More to build

Not the one for you?

Every Blueprint is planned the same way, across health, shopping, money, education and more.

Browse all Blueprints
Ready?

Build clinic referral handoff.

Start your free week. Adaeze runs your kickoff, and Lars reviews every pull request.

Start today, for free