Find a patient by name, phone or MR number…
DHA Phase 5, Lahore DHA Phase 5
Dashboard/Styleguide

MedX design system

Every component used in the prototype. Class names map to future React components.

Colours

Steel blue sampled from pics/color reference.jpg. #72a6bb is for decoration only (white text on it is 2.7:1). Buttons use blue-600 (4.9:1 with white), links and active text blue-700 (7.0:1). Light is the default; dark applies only when chosen in the account menu.

blue-50Row hover
blue-100Active nav, soft buttons
blue-200Tile borders
blue-400Brand · decoration only
blue-600Primary buttons, focus
blue-700Links, active text
--c-bgPage
--c-surfaceCards, sidebar
--c-text17:1 on white
--c-text-3Muted, 5.4:1
--c-input-borderFields, 3.2:1
--c-borderCard lines

Typography

Heading 1 · 28px · Atkinson Hyperlegible Next

Heading 2 · 21px

Heading 3 · 17px

Heading 4 · 15px

Body text is 16px. Tables are 15px, labels 14px, small text 13.5px, and nothing is smaller than 13px. Muted text. Small text.

One family everywhere, designed by the Braille Institute so that look-alike characters never look alike: Il1 O0 B8 rn m · MR 10-24781 · K⁺ 6.8 (Atkinson Hyperlegible Mono for IDs).

ایک گولی صبح، ایک گولی شام کھانے کے بعد — Noto Nastaliq Urdu

Form controls

As per CNIC
+92

Chips · pills · tags · flags · badges

FeverCough ✓Headache ×
WaitingVitalsWith doctorBillingDoneCriticalInfoTeleDefaultPlain
TagPenicillin allergyDiabeticPanel: EngroPaidNewHLCRITICAL5DUPLICATE

Avatars

MI
AS
HQ
SM
UT
FN
ZB
MI
AR

Dose & Rx

℞1+0+1Tab. Augmentin 625 mg · 5 days · after meals

Print helpers

KPI tiles

₨Collection
Rs 286,450
▲ 8% vs last week
No-shows
6.1%
▼ 3.4%

Vitals

BP
128/82 mmHg
Temp
102.4 °F
SpO₂
97 %

Card with table

Action →
PatientMRNAmountStatus
MI
Muhammad Imran
45 y · M
10-244112,600Paid
Zainab Bibi10-118731,850Critical
Total4,450

Tabs (CSS radio)

Overview panel content.
Visits panel content.
Bills panel content.

Alerts

Info

Follow-up is free within 7 days.

Possible duplicate

Same phone and similar name found.

Allergy conflict

Patient is allergic to Penicillin.

Saved

Prescription signed and sent on WhatsApp.

Timeline

13 Oct 2026
Visit · Dr. Ayesha Siddiqui
Acute URTI (J06.9)
13 Oct 2026
Prescription RX-118203
02 Sep 2026
Lab · HbA1c 7.4%
02 Sep 2026
Invoice paid Rs 3,450

Stepper & progress

✓Doctor
2Slot
3Details
Cash
166,100

Bar chart

Mon
Tue
Wed
Thu

Token cards

A-24Waiting 12m
Muhammad Imran
Dr. Ayesha Siddiqui · Follow-up
A-25Priority
Zainab Bibi (62)
Elderly · Walk-in
B-14Room 4
Ahmed Raza
Dr. Hamza Qureshi

WhatsApp bubble

Lists, key-value, modal

MRN
10-24411
CNIC
35202-1234567-1
Panel
Engro Fertilizers
No documents yetOpen modal

Loading skeletons (shimmer)

Use for component-level loads after the page frame is visible; skip for waits under ~200 ms. Shape matches the real content so nothing jumps when it arrives.

Toasts, tooltips & live state

Prescription sent
Muhammad Imran received the Rx PDF on WhatsApp.
Critical value
Potassium 6.4 mmol/L · Zainab Bibi · notify Dr. Ayesha
Live · queue syncing In consultation

Motion & theme system

  • Theme: light by default on every device, even when the computer is set to dark. "Dark mode" is a switch in the account menu and is remembered per device (assets/js/theme.js).
  • Motion: short colour and border changes on hover and focus, and dialogs fade in. No page entrance animation, shimmer, glow or gradients.
  • Accessibility: all motion is removed when the computer asks for reduced motion. Red, amber and green always come with a word or an icon.

Status colour map

One meaning per colour across every module (badges, pills, banners, nav counts). Defined in tokens.css as --st-*, aliased to the semantic tokens so dark mode follows automatically. Never use red for anything except danger or critical.

--st-okNormal, paid, verified, in stock
--st-warnNeeds attention: near expiry, approval, TAT at risk
--st-critCritical value, QC lock, allergy, overdue
--st-infoIn progress, informational
--st-pendingWaiting on someone else
--st-doneClosed, archived, cancelled
9!2VerifiedAwaiting approvalCriticalRunningWith pathologistClosed

App shell · one sidebar

Generated into every app page by tools/build_shell.py from one table (NAV). Run it after adding a page. Everything works without JavaScript: the nav is plain links, menus use <details>, dialogs use :target.

One sidebar (256px)Every item has an icon and a plain label. Groups: daily work, Departments, Business, then Settings and Help at the bottom. Only the section you are in opens to show its pages.
Only your workEach role sees 4 to 8 items; the owner sees everything. The role comes from sign-in (?role= in the prototype). Badges only show work that role can act on.
SearchOne box at the top: "Find a patient by name, phone or MR number". It also finds pages and common actions. Open it
Top barBranch (a switch for the owner), notifications with urgent items first, and the account menu: switch role (demo), dark mode, settings, sign out.
HelpThe Help sheet explains the layout and lists the few optional shortcuts (Ctrl K, /, ?, Esc). Shortcuts are not advertised anywhere else.
Phones and tabletsBelow 1024px the sidebar opens from a labelled "Menu" button. Below 760px a bottom bar shows 4 tabs for the role plus More.

v4 building blocks

Used on the role homes and the patient visit pages. One primary action per screen; at most 2 secondary.

  1. Check-in
  2. Vitals
  3. Doctor
  4. Billing
  5. Pharmacy or lab
UrgentAttention item: possible patient harm
At most one red item per area of the screen
Attention item: needs someone soon
One button per item
  1. 6To collect
  2. 64Need review
  3. 72.8%Checked automatically

Table kit · views, filters, row actions, bulk bar, pager

Used on Patients, Lab worklists and Inventory. Tick a row to see the bulk bar; the count comes from a CSS counter, and Clear is a form reset (no script). Untick a column in Columns on the Patients page to hide it.

Payer: Engro Clear all
SelectPatientMRNPayerActions
Abdul Rehman10-18842Engro Fertilizers
Kashif Mehmood10-20077Engro Fertilizers
Saima Akhtar10-21934Engro Fertilizers
Rows 1–3 of 128
Classes: .views .view .view__count · .filter-bar .chip--filter .chip__x .chip--add · .table--sticky .table--zebra .row-select .row-actions(.row-actions--float) · .table-card .bulk-bar · .pager

Empty, no-results, error & loading states

Every list needs all four. Say what happened, why, and the next best action, never just "No data".

No samples to receive

Bags from collection centres appear here when riders hand them over.

No matches for "Imraan"

Try the phone, MRN or CNIC, or clear the filters.

Couldn't reach the analyzer

MedX Bridge at Gulberg is offline. Results are buffered and will sync; nothing is lost.

PatientMRNLast visitPayer

Forms · validation, sections, stepper, sticky footer

Errors appear only after the user leaves a field (:user-invalid), never on first load. Hints sit under the field and are replaced by the error. Live example: Register patient (also in Urdu).

  1. Contact
  2. Identity
  3. Address
  4. Payer
Identity

Name and ID exactly as on the CNIC / B-form.

RequiredName is required
13 digits with dashesFormat: 35202-1234567-1
Pakistani mobileToo short: 11 digits needed
All changes savedUnsaved changes
CancelSave draft
Classes: .field__hint .field__error .field.is-invalid label.is-required · fieldset.form-section > legend · .form-section__desc · .form-stepper li.is-done/.is-current · .form-foot (sticky) .form-foot__status .unsaved-dot

Urdu & right-to-left

Put dir="rtl" lang="ur" on a container. Nastaliq gets taller fields and line-height; numbers, MRNs, phones and CNICs stay left-to-right (.mono, .ltr, type="tel"). A language switch is a .i18n wrapper with radios value="en"/"ur" and [data-lang] blocks.

Clinical safety

Safety cues are never decoration: they use the status map, always pair colour with an icon and words, and cannot be dismissed while the risk is open.

Patient banner .patient-banner

First child of <main> on every screen that acts on one patient. Sticky under the topbar. Allergy pill always visible (.pb-allergy, --none for NKDA); chips .pb-chip--warn/--crit/--info/--payer; encounter .pb-enc; "Not this patient?" opens the palette.

MI
Muhammad Imran10-2478145 y · MCNIC 35202-•••••••-1
Allergy: SulfonamidesHTNSelf pay
OPD · Token A-24 · Dr. Ayesha Siddiqui · Room 2 Not this patient?

Critical-value banner .crit-banner

No close button. Shows the call-timer (.crit-timer) and a single primary action. Clears only after a call is logged with read-back (.readback).

Other patterns

PatternClassesLive example
Allergy hard stop: modal with no close, required override reason, safer alternatives.modal--hardstop .hardstop__* .alt-chips .rx-suggestconsultation.html#allergy-stop
Two-identifier check before labels print (CSS :has(:checked) gate).id-check .needs-id-check .when-pending .when-readylab-accession.html
Destructive confirm: reason code + type-to-confirm + undo toast.danger-confirm .needs-confirm .consequences .confirm-typebilling.html#cancel-invoice
Toast with undo (any element with data-toast + data-undo).toast-stack .toast