Run a staffed measurement kiosk
Record readings at a shared ward tablet with no patient sign-in, keeping patient details in your own Supabase instead of Ovok.
- Complexity
- 3/5
- Clients
- Web
- Time
- 45–90 minutes, plus a Supabase instance
Build a measurement station that nurses share during a shift. A nurse signs in once, scans each patient's card, checks the patient's name and date of birth, and saves a blood-pressure reading to Ovok. Patients never sign in.
The patient register (names, dates of birth and card codes) lives in your own self-hosted Supabase. Ovok holds a Patient that carries only a pseudonym, plus the readings. Measurements, Signals and EHR connections work on that Patient as they do on any other.
The finished example is Ovok-Dev/staffed-kiosk-example.
What each system holds
| Supabase (yours) | Ovok | |
|---|---|---|
| Patient | Name, date of birth, card code, pseudonym | A Patient with only identifier = the pseudonym |
| Readings | Nothing | Blood-pressure Observations on that Patient |
| Staff | Nothing | Practitioner accounts; each reading records the nurse who saved it in meta.author |
| Who can read it | The patients Edge Function, with Supabase's service role | Practitioners of the project, under their access policy |
The pseudonym is the register row's id. Only the register can turn it back into a person.
Set upConsole
You need:
- An Ovok sandbox project and a practitioner account in it.
- Docker, to run Supabase on your machine. In production you self-host Supabase the same way.
- Node.js 24 or newer.
Build the kiosk
- Set up the patient register
- Configure the Ovok project
- Add the patients function
- Build the kiosk app
- Run it on the ward
- Optional: Receive readings over HL7 v2
How a reading flows
- The nurse signs in to Ovok as a practitioner. The kiosk keeps the session until the browser tab closes.
- A scanner types the card code. The kiosk sends it, with the nurse's Ovok token, to the
patientsEdge Function. - The function asks Ovok who the token belongs to (
GET /v1/auth/me) and refuses anyone who is not a practitioner of your project. It returns the patient's name, date of birth and Ovok Patient id. - The nurse checks name and date of birth with the patient, then enters the reading.
- The kiosk saves it with
ovok.measurements.save({ patientId }). Ovok stores the Observations. For a Patient enrolled in Signals, Ovok forwards eligible readings as Data Ingestion describes.
When a patient is registered, the function creates the Ovok Patient with a conditional create, so a retry never creates a second one.
Optional: send readings to a clinical system
The kiosk's readings are ordinary Observations, so any system can take them through Connect to your EHR:
- Your own Supabase over HL7 v2: make the connection with the register's identifier system, and every reading comes back with the pseudonym in
PID-3. See Receive readings over HL7 v2. - A FHIR-native EHR pulls or subscribes to Observations. It finds the patient by the pseudonym, which only your register can resolve.
- A hospital's HL7 v2 system matches on its own MRN. Store the MRN in the register, add it as a second
identifierwhen the function creates the Patient, and make the connection with the hospital's MRN system. The message carries the MRN with the name and date of birth fields empty; confirm with the hospital's interface team that their system matches on MRN alone.
Test your integration
- Register a patient at the kiosk with a test card code.
- Scan the card, confirm the identity, and save a reading.
- Search Patients in your Ovok project and open the new one.
| Scenario | How to trigger it | Expected result |
|---|---|---|
| Reading saved | Save a reading for a scanned patient | It appears under "Recent readings in Ovok" |
| No patient details in Ovok | Read the Patient in Ovok | It has identifier and active only |
| Unknown card | Scan a code nobody has | The kiosk offers to register the card |
| Card taken | Register a code another patient has | The kiosk says the card is taken (409) |
| Patient token | Call the function with a patient's token | 403 |
| Station left open | Leave a patient on screen for 90 seconds | The kiosk returns to scanning |
See also
Last updated on