Layman manual
One manual for CDR 1–5. All five CDR instances run the identical
software and the same storage design; they differ only in role (see
§5). This manual applies to every one of them.
A CDR (Clinical Data Repository) is the platform's authoritative store for
patient health data — the "single source of truth" for observations, no matter
how they arrived. It mirrors the shape of Cambio's real CDR, so the rest of the
platform can treat it exactly like the production record.
You don't usually use a CDR directly — services write to it and read from it.
This manual explains, in plain terms, what it does and how to tell it's
healthy.
When a provider reports a measurement (a weight, a blood pressure, a glucose
reading, a questionnaire answer), that data is normalised by gateway.pdhc and
handed to the CDR. The CDR keeps it safely, in three increasingly useful forms,
and makes it available to dashboards and analysis tools.
gateway.pdhc ──(normalised observation)──► CDR ──► dashboards / analysis
└──► Cambio CDR (real record)
Every observation is kept in three layers, from "exactly as received" to
"ready for a dashboard":
This means the same reading can be read back as raw JSON, as FHIR, as openEHR,
or as a simple metric — whichever a consumer needs.
The CDR doesn't just store data — it automatically forwards concept-mapped
observations to the real Cambio CDR sandbox, so the platform's data reaches
the production clinical record. Delivery is tracked, retried on failure, and
auditable.
Each CDR exposes a health check at /healthz returning
{status, database, service, version} — status: ok (HTTP 200) when the app
and its database are both up, degraded (HTTP 503) otherwise. This is what the
platform status page (www.pdhc.se/services.html) polls to show the green dot.
Reads and writes are authenticated (a service key per calling service), and
every read is written to an audit log so access can be traced.
All CDR instances are the same application with the same 39-table
schema. What differs is what each one is for:
cdr.pdhc.se) — the canonical, live repository. This is wheregateway.pdhc forwards real provider-reported observations; it is thecdr2…5.pdhc.se) — analysis replicas. Identical software,sim.pdhc) so the(There is also an internal CDR 6 — a deliberately lighter, loopback-only
"sim sink" with a different, simpler design; it is documented under the Sim
service, not here.)