This project is not covered by Drupal’s security advisory policy.
A private patient portal for a small clinic: its services and doctors, each patient's own appointments, the clinic's notices, and a calm clinic assistant avatar that helps to book or move an appointment and to prepare questions for the doctor. It gives no medical advice.
A Drupal CMS site template of the Avatar Space family: Family, School, University, Company, Organization, Club, Clinic, Dev and Test Space.
What it gives you
- Services: specialty, minutes, the doctors who offer it, what it is and how to prepare.
- Doctors: specialty, consulting hours, "about", account.
- Patients: birth date, usual doctor, notes for the front desk, accounts. Patients are private.
- Appointments: patient, doctor, service, when, a status (booked, moved, done, cancelled, missed), what to bring. A patient sees only their own.
- Appointment requests: what a patient asks the front desk, to book, move or cancel an appointment, with the days and times that suit them.
- Questions for the doctor: what a patient wants to ask at their appointment, prepared before the visit, in their own words.
- Notices: opening hours, holidays, a vaccination day.
- A Specialties vocabulary, to start with seven.
- Pages (the Webpage content type) for anything else the clinic wants to say, built with Display Builder, and a contact form.
- Tabs: Dashboard (the front page), Appointments, Services, Doctors, Notices, Requests, Questions, Patients.
- Example content to start from: three doctors, five services, three patients, five appointments, two requests, questions for a check-up and three notices. Edit them, or delete them and add your own.
- The Clinic assistant's chat, docked on the left: things to ask first ("What time is my appointment?"), the specialties as topics, quick replies (Yes, No, Tell me more, Show me my appointments), and a menu to start a new chat or show the panel wide, floating or hidden. They are the chat block's Conversation settings.
No medical advice
Clinic Space is for the clinic's front desk work: appointments, services, hours and notices. It is not a medical record system and the Clinic assistant is not a doctor:
- The Clinic assistant never gives medical advice: no diagnosis, no opinion on symptoms, test results, medicines or doses, and nothing judged from a camera picture. It says so, and offers to request an appointment or to add the question to the patient's questions for the doctor.
- For an emergency it tells the person to call the emergency number or go to the nearest emergency department.
- It keeps no notes about patients (its memories are turned off).
- Keep medical notes and results in the clinic's medical record system. The fields here ask for what the front desk needs, and say so.
- The clinic is responsible for the rules on health data where it works, and for the AI provider it chooses: with a provider outside the clinic, what people type or say to the assistant is sent to it. A model the clinic hosts itself keeps it inside.
Roles
- Clinic manager (
clinicmanager): everything, the specialties and the pages included. - Doctor (
doctor): sees the patients, books and updates appointments, reads the questions patients prepared. - Nurse (
nurse): sees the patients, updates appointments, reads the questions patients prepared. - Receptionist (
receptionist): adds and edits patients, books, moves and cancels appointments, handles the requests, writes notices. - Patient (
clinicpatient): sees the clinic's services, doctors and notices and their own appointments, asks to book, move or cancel an appointment, prepares questions for the doctor, and talks to the Clinic assistant.
Dashboards
Each role has its dashboard, built with Web Dashboard, Webpage and Display Builder. The front page is the dashboard of the person who is logged in, and people land on it after they log in. Each list shows the most pressing items first, with a date, a person or a status, and a link to all of them. Change a dashboard in Structure > Web Dashboards.
Every dashboard opens with the space at a glance, the Space cards of Avatar Space: a card for each part of the space, with its icon, what it is for and how many of them the person may see, which opens the list.
- Administrator: The space at a glance, what they may add, a welcome card, Quick tasks.
- Content editor: The space at a glance, a welcome card, what they may add.
- Clinic manager: Coming appointments, Appointment requests, Notices, a welcome card, what they may add, Doctors.
- Doctor: My appointments, Questions for the doctor, a welcome card, what they may add, Notices.
- Nurse: Coming appointments, Questions for the doctor, a welcome card, Notices.
- Receptionist: Appointment requests, Coming appointments, Notices, a welcome card, what they may add, Doctors.
- Patient: My appointments, My requests, My questions for the doctor, Notices, a welcome card, Doctors.
A doctor's "My appointments" follows the account on their doctor profile. A patient's lists are theirs because a patient sees nothing else.
Privacy
Patients see only their own records (Avatar Space):
- A patient's profile and their appointments are seen by the staff and by the patient, through the accounts listed on them (Accounts): their own and, for a child or someone cared for, a parent's or caregiver's. When the front desk books an appointment, it lists the patient's accounts on it.
- An appointment request and questions for the doctor are seen by the staff and by the patient who wrote them.
- No patient sees another patient, in a list, on a page or through the Clinic assistant, which reads the site as the person who is talking.
The space is private: people who are not signed in are asked to sign in. Everyone logs in to use the space, its avatar and its AI: the chat is shown only to people who are logged in.
The guide is how the space works, so its chat loads without asking: the template sets the consent for it in Klaro, the consent manager of Drupal CMS. If your rules ask for consent first, change the Deepchat service under Configuration > Klaro.
Demo content
The template comes with a clinic to try it with: doctors, nurses, the front desk and the clinic manager, services, patients with their appointments, requests and notices.
Test users, with no password: log in as one with drush uli NAME, or set a password first. Delete them, or block them, before the site goes live.
- Patients:
anna.kowalski,daniel.reyes,grace.okafor,jack.wilson,mona.fathi,peter.brown,samir.nasser,theo.reyes,yara.haddad - Doctors:
amir.haddad,elena.park,lisa.tran,marcus.hale,sofia.brandt - Front desk:
karim.aziz,lena.vogel - Nurses:
ben.okoro,nadia.saleh - Clinic manager:
helen.price
Avatar Agent
The Clinic assistant is meant to do the portal's small jobs by voice, with almost no keyboard or mouse: it listens for its name, keeps listening, and looks through the camera only when asked. Each action is a plain change of the clinic's content that the person may also make by hand, and it asks for a yes first. The action tools come with AI Avatar; this template brings the content types, the fields and the permissions they need.
- Patient
- "Book an appointment": create an Appointment request (to book; service, doctor, when suits me).
- "Move my appointment": create an Appointment request (to move; the appointment, when suits me).
- "Cancel my appointment": create an Appointment request (to cancel; the appointment).
- "Prepare questions for the doctor": create or update my Questions for the doctor for an appointment.
- Receptionist
- "Book an appointment": create an Appointment (patient, doctor, service, when, the patient's accounts).
- "Move an appointment": update an Appointment's time and set its status to Moved.
- "Cancel an appointment": update an Appointment's status to Cancelled.
- "This request is done": update an Appointment request's status to Handled.
- "Add a patient": create a Patient.
- "Post a notice": create a Notice.
- Doctor
- "Book a follow-up": create an Appointment.
- "Mark it done" or "They did not come": update an Appointment's status to Done or Missed.
- Nurse
- "Mark it done" or "They did not come": update an Appointment's status to Done or Missed.
- Clinic manager
- Everything the receptionist does, and: create a Service or a Doctor.
A patient never changes an appointment directly: they ask, and the front desk answers with a time.
Connected spaces
A person can be a patient here and a parent or a member in other spaces. The role names of Clinic Space are its own (clinicmanager, doctor, nurse, receptionist, clinicpatient), and so are its content types, views and dashboards (clinic…), so it can be applied to a site that already has another space. The link between spaces, where a parent in Family Space sees their child's appointments here, is planned in Avatar Space and is not part of this template yet.
When a second space is applied to a site (drush recipe), the last one sets the colors, and each space adds its private content types to Avatar Space's list (addPrivatePeople), so the people of every space stay private. Rebuild the content permissions after it, and choose which guide's chat block to show.
Install
With the Drupal CMS installer: choose Clinic Space among the site templates. Or with Drush, on a Drupal CMS codebase. Until its modules have stable releases, the template comes from its development release, and Drupal CMS takes development releases (prefer-stable keeps the rest stable):
composer config minimum-stability dev
composer require drupal/clinicspace:1.0.x-dev
drush site:install drupal_cms_installer installer_site_template_form.add_ons=clinicspaceThe site opens in Gin, front and back, in the clinic's colors, with the toolbar at the top and the Clinic assistant's chat docked on the left of every page (on a phone, in the page).
The Clinic assistant
The Clinic assistant is the face, voice and eyes of the Drupal AI chatbot (DeepChat with the Avatar chat processor of AI Avatar): Nurse, the kind nurse of the Avatar module, in teal scrubs and a white cap with a red cross. Its mind is the site's default Drupal AI chat model: choose a provider and a model in Configuration » AI » AI Settings (or pick one on the avatar's page at Structure » Avatars).
- AI Ask: it answers from the clinic's own content and the person's own appointments, such as "What time is my appointment?", and says so when the clinic's pages do not tell.
- AI Help: it does tasks for the person who is signed in: book or move an appointment, prepare questions for the doctor (see Avatar Agent).
- It gives no medical advice (see No medical advice).
- It speaks its answers, listens when the person holds the microphone button or says its name, and can see through a camera only when the person turns it on and presses Look; nothing is recorded.
- It can fly over the page and point at a menu link or a heading it talks about.
AI providers
The guide's chat needs one chat provider of Drupal AI. Drupal CMS's AI (drupal_cms_ai) comes with the template: AI agents, the AI dashboard, alt text, and the choice of a provider when the site is installed. The template also brings these with Composer, and installs none of them, so pick one under Extend (or drush en <module>), add its key under Configuration > System > Keys, and choose its models under Configuration > AI > AI Default Settings:
- amazee.io (
ai_provider_amazeeio), the Drupal CMS default - Anthropic (
ai_provider_anthropic) - OpenAI (
ai_provider_openai) - Google Gemini (
gemini_provider) - Grok from xAI (
grok) - A command line tool on the server, such as Claude Code, Codex or Gemini CLI (
ai_provider_cli), for a local or private site
The guide's voice
The guide speaks with the ElevenLabs voice "Rajab Natshah - Tech Explainer" (elevenlabs, a text to speech provider of Drupal AI), and moves its mouth with it. Its key is the Key module's elevenlabs key, read from the ELEVENLABS_API_KEY environment variable, so no key is kept in configuration; it must be a key of the ElevenLabs account the voice belongs to. Without a key, or when ElevenLabs fails, the guide speaks with the browser's voice. Change the voice, or turn it off, under Drupal AI voice on the avatar's settings.
Requirements
Drupal CMS 2 (Drupal 11.4 or 12), Drupal AI, Avatar, AI Avatar, Avatar Space, Web Dashboard and Display Builder.
Tests
The webship-js suite in tests/ checks that people log in to use the space, that each role lands on its dashboard, that the chat answers (with the Echo test model of Drupal AI, from tests/recipes/clinicspace_test), and that a patient sees no other patient. The CI pipeline builds a fresh Drupal CMS with this template and runs it; to run it on a local site, create an account for each role, set their passwords in the environment (see cucumber.js), then:
yarn install
LAUNCH_URL=https://example.ddev.site yarn testProject information
- By rajab natshah on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
Releases
Development version: 1.0.x-dev updated 30 Nov 2026 at 03:08 UTC


