Hospital AR System · Documentation home

System documentation

One hospital operations and clinical-care platform with role-based dashboards, ward-scoped access, floor maps, geofences, AR bed markers, medication administration, handoffs, reports, and printable summaries.

3 role guidesDeveloper referenceStandalone HTMLPrint-friendly
01

System overview

A single same-origin web application for hospital setup, daily clinical work, and bedside AR lookup.

The Hospital AR System connects operational structures such as hospitals, floors, wards, beds, and zones with patient records and clinical workflows. Each account belongs to one hospital, and staff and doctors see only the wards assigned to them.

Operations

Hospital admins maintain staff and doctor accounts, ward assignments, beds, marker and QR identifiers, floor plans, geofences, and map geometry.

Clinical care

Staff and doctors manage admissions, vitals, alerts, medicines, MAR doses, handoffs, reports, and patient summaries within their assigned wards.

Location and AR

Leaflet maps show wards and beds, zone tracking supports QR check-in, and the AR page identifies patients from bed markers.

Safety and access

Hospital scoping, ward memberships, JWT authentication, audit records, printable sheets, and staff/doctor idle protection support controlled access.

Current offline behavior: the PWA caches the application shell and non-API assets, but clinical data still requires a live connection. Full offline clinical data and synchronization are deferred to a future version.
02

Documentation library

Choose the guide that matches your role or task.

Hospital Admin

For operational administrators who set up hospital users, structures, assignments, maps, and zones.

  • People and ward assignments
  • Beds, markers, and QR codes
  • Floors, geofences, and map editor
  • Setup and daily workflows
Open Hospital Admin guide

Staff

For nursing and operational staff performing ward-scoped clinical and patient-care tasks.

  • Admissions and bed assignment
  • Vitals, alerts, MAR, and reports
  • Shift handoffs
  • Read-only wards, floors, zones, and maps
Open Staff guide

Doctor

For doctors reviewing assigned patients and documenting diagnoses, medicines, comments, MAR, and handoffs.

  • Ward and patient detail
  • Diagnosis and medicines
  • MAR, handoffs, and reports
  • Maps, zones, and Scan AR
Open Doctor guide

The three role guides embed their screenshots directly in the HTML. The developer guide is also self-contained.

03

Roles and access

Access is enforced by the backend, not only hidden in the user interface.

RolePrimary responsibilityData scope
super_adminManage hospitals and privileged accounts; oversee the full system.Cross-hospital administrative access.
hospital_adminCreate staff/doctors and maintain wards, beds, floors, zones, maps, and assignments.Own hospital; operational data only, not clinical records.
staffAdmissions, vitals, alerts, MAR, handoffs, and reports.Assigned wards and their patients.
doctorReview patients; update diagnosis, medicines, comments, MAR, and handoffs.Assigned wards and their patients.
Fail-closed ward access: a staff or doctor account with no ward memberships sees no ward-scoped rows. Missing access must be corrected through ward assignment, never by sharing another account.
04

Architecture at a glance

A no-build JavaScript frontend talks to a Slim API backed by MySQL and private file storage.

Browser + AR page
Hash router + API client
Slim middleware
Controllers + PDO
MySQL + uploads

Frontend

Vanilla ES modules, hash routing, Leaflet maps, Chart.js vitals, A-Frame/AR.js markers, and a PWA shell. There is no bundler or frontend build step.

Backend

PHP 8.2+, Slim 4, PHP-DI, Firebase PHP-JWT, and PDO MySQL. Controllers apply hospital scope, ward membership checks, validation, and audit logging.

Database

Seventeen InnoDB tables cover hospitals, users, structures, patients, vitals, reports, notes, medicines, MAR, handoffs, memberships, tracking, and audit.

Storage and delivery

Uploaded reports and floor images are private files. The service worker never caches /api responses and requires a cache-version bump when shell assets change.

For exact routes, middleware order, table relationships, migration rules, and safe change procedures, use the Developer Guide.

05

Core workflows

Most work follows one of these paths.

Hospital setup

Create staff and doctors, add floors and wards, place beds, assign ward access, upload floor plans, position map geometry, and publish zone QR codes.

Patient admission

Confirm the correct ward, register the patient with an MRN, select an available bed, verify the location, then begin clinical documentation.

Clinical shift

Review alerts and assigned patients, record measured vitals, administer scheduled medicines, upload reports, and complete or acknowledge handoff notes.

Bedside lookup

Search the patient list, open the ward map, or scan the bed QR/marker with the AR page. Confirm patient identity before viewing or changing clinical data.

06

Using these documents

Read online or from a local folder, and print only when necessary.

  • Open docs/index.html in any modern browser.
  • Use the role cards above to open the correct guide.
  • Use each guide’s table of contents to jump between sections.
  • Select any role-guide screenshot to enlarge it; press Escape to close.
  • Use Print / Save PDF for a paper or PDF copy.
  • Keep the four HTML files together so relative links continue to work.
Protect patient information: screenshots use demonstration data, but printed summaries, exported PDFs, and real application screens may contain protected health information. Store and dispose of them through approved hospital processes.

These documents describe the current four-role release. When behavior changes, update the relevant guide and the developer reference together.