Schema reference
PostgreSQL tables compiled from openEHR archetypes and FHIR profiles.
A PostgreSQL schema compiled from two source specifications: openEHR archetypes from the CKM and FHIR profiles from hl7.fhir.us.core@9.0.0. Nothing here is hand-written — every table, column and constraint is derived, and every column names the archetype path or FHIR element it came from.
| Count | |
|---|---|
| Entry archetypes | 155 |
| Cluster archetypes | 37 |
| Administrative tables | 13 |
| Tables in total | 465 |
| Columns | 7460 |
How to read a page
Each page documents one source model and every table it produces. Source names the archetype or profile it came from; where a page lists more than one, the models were merged and the columns carry a From marker showing which contributed them.
Columns list the archetype path (/data[at0001]/events[at0002]/…) or FHIR element id (Patient.birthDate) they were lowered from, so any value can be traced back to the specification that defines it.
Conventions
- Every table has a
uuidprimary key namedid. - A child table links to its parent with
<parent_table>_idand is deleted with it. - Coded values occupy a group:
<field>(display text),<field>_code,<field>_system,<field>_valueset_id, with a foreign key intovalueset_codethat checks all four agree. - Quantities occupy
<field>_magnitudeand<field>_units, with the units and range the archetype allows. - Every foreign key is indexed except those into the terminology tables.
See Provenance for the full source-model to table mapping, including what was deliberately left out.