Medical AI

How a Specialist Referral Network Uses OpenClaw to Match Patients to the Right Doctor

Choosing the right specialist is confusing and time-consuming for patients and GPs alike. Learn how OpenClaw helps referral networks match patients to available specialists based on condition, location, insurance, and urgency — via a simple WhatsApp or Telegram interface.

Huzaifa Tahir
7 min read

How a Specialist Referral Network Uses OpenClaw to Match Patients to the Right Doctor


Getting a referral to the right specialist is harder than it should be. A GP who wants to refer a patient with suspected inflammatory bowel disease needs to find a gastroenterologist who: accepts the patient's insurance, is accepting new patients, has availability within the appropriate timeframe, has experience with IBD specifically (not just general gastroenterology), and is within a reasonable distance of the patient.


This matching process takes time that GPs do not have, and patients often navigate it alone — making phone calls, hitting full appointment books, and waiting weeks or months to see the right doctor.


OpenClaw enables specialist referral networks to offer an intelligent matching service via WhatsApp or Telegram — giving both GPs and patients a fast, accurate route to the right specialist.


Setting Up OpenClaw for a Referral Network


```bash

curl -fsSL https://openclaw.ai/install.sh | bash

openclaw onboard --install-daemon

```


Connect WhatsApp Business for the patient-facing channel and Slack for the network coordinator team. Maintain a structured specialist database (JSON, CSV, or API from the network's scheduling system) that OpenClaw can query.


The Patient-Facing Matching Skill


```

Skill: specialist-match-patient

Trigger: incoming WhatsApp message to the referral network number

Prompt: "A patient (or their GP's receptionist) is looking for a specialist referral. Collect the following information conversationally:

1. 'What type of specialist are you looking for?' (or what condition / what the GP referral says)

2. 'What suburb or area are you located in?'

3. 'What health insurance do you have, or are you self-paying?'

4. 'How urgent is this referral — routine (within 3 months), semi-urgent (within 4 weeks), or urgent (within 1 week)?'

5. 'Is there anything else specific about what you are looking for — for example, a female doctor, telehealth option, or experience with a particular condition?'


Then search the specialist database for matches. Return the top 3 matches with: specialist name, clinic name, address, phone number, earliest available appointment, and a direct booking link if available. Format clearly for WhatsApp reading. If no match within their criteria, widen the radius and note this.


End with: 'Would you like me to send your referral details to the specialist's booking team so they can contact you directly?'"

```


The GP-Facing Referral Tool


GPs and their practice staff can send referral queries via a dedicated Slack integration:


```

Skill: gp-referral-query

Trigger: message in Slack #referral-requests channel

Format: [Condition] | [Location] | [Insurance] | [Urgency] | [Special requirements]

Example: "Suspected celiac disease | Patient in Parramatta NSW | Medibank Private | Semi-urgent | Paediatric patient age 8, needs paediatric gastro"

Prompt: "Search the specialist database for the GP's requirements. Return top 3 matches with full details. If urgency is urgent (within 1 week), also send an email alert directly to the specialist's rooms flagging an urgent referral incoming. Log the referral query with timestamp and GP practice name."

```


Waitlist Management


When a patient's preferred specialist has no immediate availability, OpenClaw manages the waitlist:


```

Skill: waitlist-manager

Trigger: patient added to specialist waitlist

Prompt: "Confirm to the patient via WhatsApp that they have been added to [Specialist Name]'s waitlist for an appointment. Send them an estimated wait time and the next available date. Set a check-in reminder at 2 weeks: 'Hi [Name], just checking in on your referral to [Specialist Name]. Your current estimated wait is [X] weeks. If your situation has become more urgent, reply URGENT and we will review options. If you no longer need this appointment, reply CANCEL so we can offer the spot to another patient.'"

```


Referral Confirmation and Reminder


Once a specialist appointment is booked, OpenClaw sends the patient a confirmation and reminder:


```

Skill: referral-confirmation

Trigger: appointment booked in specialist scheduling system (webhook)

Prompt: "Send the patient a WhatsApp confirmation: 'Your appointment with [Specialist Name] is confirmed for [Date] at [Time] at [Clinic Name, Address]. Please bring: your referral letter (we have sent a copy to the specialist), your health insurance card, a list of your current medications, and any relevant test results or scans. Arrive 10 minutes early for paperwork. Reply HELP if you need to reschedule.' Send a 48-hour reminder before the appointment."

```


What Referral Networks Gain


Referral networks using OpenClaw for patient matching report:

  • Significant reduction in "phone tag" between GP practices and specialist rooms
  • Fewer patients lost in the referral process (a common and underrecognised problem)
  • Better appropriate matching — patients see specialists who have the right sub-specialty experience
  • Improved urgent referral pathways with automated escalation

  • The coordination expertise of the network team is unchanged. OpenClaw handles the information gathering and matching logistics so the team can focus on complex cases that need human judgement.

    Share this article

    Related Articles