Once records accumulate in the database, MedLens turns them into trends. The charting system is built around one clinical insight that ordinary financial or fitness dashboards get wrong: in medicine, “up” is not always good.

Context-aware coloring

Every trackable metric carries a “good direction” — up, down, or stable — and the UI colors changes by whether the movement is medically favorable, not by whether the number rose or fell.

Metric groupGood directionWhy
WBC, RBC, hemoglobin, platelets, ANCupRecovery during chemotherapy
Tumor markers (CA-125, CA 19-9, CEA, PSA)downCancer response
Creatinine, BUN, ALT, ASTdownReduced organ stress
Electrolytes (sodium, potassium)stableHomeostasis
Oxygen saturationupBetter oxygenation
Heart rate, temperature, respiratory ratestableStability indicates health
Pain leveldownLess pain is better

A rising white-blood-cell count during chemo recovery is good news and shows green; a rising tumor marker is bad news and shows red, even though both arrows point up.

Delta display

Each reading shows its change against the previous one as an arrow, an absolute delta, and a percentage. Color follows the rules above:

  • Green — the change is in the good direction.
  • Red — the change is in the bad direction.
  • Gray — negligible change, or a “stable” metric still inside its range.
  • Orange — the value is out of its reference range, regardless of direction. Out-of-range always wins as a warning signal.

Chart types

  • Lab trends — area chart with a gradient fill and a reference-range band, with data points colored by flag status.
  • Blood pressure — a dual-line chart plotting systolic and diastolic together.
  • Other vitals — a single area chart with a reference-range band.
  • Historical table — below each chart, a grid of date, value, change (with +/- coloring), and flag.

Summary cards

The dashboard’s “at a glance” view is a grid of reading cards. Each card shows the latest value, large and colored by flag status, plus a delta badge with the arrow, change, and percentage. Tapping a card drills into the full trend chart for that metric on the trend detail route.

A note on clinical safety

Context-aware coloring is intentionally a display aid, not a clinical judgement. MedLens shows what was captured and whether a value sits inside or outside a reference range; it deliberately does not generate “this looks dangerous” alerts or any other clinical interpretation. That boundary is load-bearing — see the SaMD firewall.