Platform operator guide to the public sandbox hospital: the real HMS on made-up data, passwordless role entry, the nightly reset, its guardrails and commands.
Sandbox Hospital
The sandbox is a normal hospital on the platform that is marked as a sandbox. It runs the real HMS (every screen, every workflow, the real APIs) on made-up people, so anyone can try any role without an account. It is reset every night.
What visitors see
- On the sandbox address (for example
demo.letsupdoc.com),/sa/try/{role}signs the visitor in as that role's demo account with no password:orgAdmin,receptionist,nurse,doctor,lab,radiology,pharmacy,billing,clinicalSupportorpatient./sa/tryopens the role chooser (/sa/hub). - Every staff and patient screen shows a banner: Sandbox — made-up data, reset nightly (بيئة تجريبية — بيانات وهمية، يُعاد ضبطها كل ليلة).
- Each dashboard has a queue: today's visits in every state (unpaid booking, paid, checked in, Fast-Track with the nurse, with the doctor, completed, no-show), a video visit, a patient due a free follow-up, an insured patient with a co-pay, lab orders (unpaid, paid, sample collected, resulted), radiology orders (unpaid, paid, study done, reported), prescriptions to prepare, collect and dispense, cash, card and insurance invoices, a remote inquiry, risk alerts, a PDPL data request, an incident, a break-glass grant to review, retention rules and audit activity.
- Names are Saudi, in Arabic and English. National IDs start with
0999(real IDs and Iqamas start with 1 or 2), phones are05000001xx, and every address ends with@sandbox.letsupdoc.test.
/sa/try returns Not found on every real hospital and on letsupdoc.com/sa.
Nightly reset
php artisan sa:sandbox:reset --all runs every night at 02:00 Riyadh time. For each sandbox it:
- Deletes only that hospital's rows (the same per-table list as export and delete) and the people who belong only to it, including staff and patients that visitors added. Other hospitals are never touched.
- Keeps the hospital, its addresses and its branches; re-creates the default roles and privileges and the PDPL vendor defaults.
- Seeds the made-up staff, patients and workflow states again, with times relative to now.
- Removes uploaded files stored under the hospital's folder.
The reset runs in one database transaction: if anything fails, the previous data stays and the error is logged. A reset takes well under a minute.
Guardrails
| Area | In the sandbox |
|---|---|
| Text messages and email | Never sent. SMS always goes to the log (kept in the notification log as stubbed); invites are never mailed. |
| AI | Works, up to SA_SANDBOX_AI_CALLS_PER_DAY calls a day (default 300). After that the features show their rule-based answers and the banner says so. AI requests are limited to SA_SANDBOX_AI_PER_MINUTE per IP (default 6 a minute). |
| Video | Works between the sandbox's own doctor and patients; a call ends after SA_SANDBOX_VIDEO_MAX_MINUTES (default 15). |
| Uploads | Images or PDF only, up to 2 MB, stored under the sandbox's own folder and deleted on reset. |
| Hospital settings | Roles and privileges, staff, doctor hours and PDPL settings can be changed (they are reset). The hospital's addresses, logo and branding cannot. |
| New staff and patient logins | The email address is always rewritten onto @sandbox.letsupdoc.test, so a visitor can never attach or reserve a real person's address. |
| Downloads | Allowed (the data is made up). File names start with SANDBOX- and CSV files start with a SANDBOX - made-up data line. |
| Entry | At most SA_SANDBOX_ENTRIES_PER_HOUR role entries per IP per hour (default 20). |
| Audit | Every action is still audited, so the audit log shows activity. |
Commands
| Command | What it does |
|---|---|
php artisan sa:sandbox:create sandbox demo |
Creates the sandbox hospital sandbox (enterprise plan, active) at demo.letsupdoc.com and seeds it. |
php artisan sa:sandbox:reset sandbox |
Resets one sandbox now. Refuses any hospital that is not a sandbox. |
php artisan sa:sandbox:reset --all |
Resets every sandbox (the nightly job). |
Make it the public demo
Set SA_SANDBOX_PUBLIC_URL=https://demo.letsupdoc.com (then php artisan config:cache). The role cards on /sa/hub and Try the Demo on the /sa landing page then open the sandbox. Without it they keep opening the fixture demo at /sa/demo, which keeps working either way.