- Shipped
- August 26, 2026 at 5:05 AM UTC
- Author
- Kamo
- Commit
- 22fba8d
Two things a practice cannot operate without, and neither is a bigger version of reading a chart. BULK EXPORT (clinical/bulk). The FHIR Bulk Data model: a job, its NDJSON files, and a manifest. Three decisions worth stating. transactionTime is stamped at KICKOFF, not completion. Clients chain incremental exports by feeding it back as _since; stamped at completion, everything charted during an hour-long run falls into a gap between the two exports that the client is never told about. Keyset pagination on uid, never OFFSET — a system export walks whole tables, and with OFFSET page ten thousand costs ten thousand pages of work. The reader is written ONCE and parameterised by entity rather than as a finder on each of eight repositories, because eight identical queries is seven that get a fix and one that does not. Cohorts are explicit membership rows with joined/left dates, not a stored query. A cohort defined by criteria re-evaluates on every read, so two exports of "the same group" a week apart cover different people without saying so — and an accounting asking "was my record in the March extract" cannot be reconstructed from criteria that have since changed. C-CDA (clinical/cda). What the hospital down the road can actually import; FHIR is what a modern integration uses. The narrative block is generated first and the entries reference it, because the narrative is what a human is shown and what the document legally asserts — a section with perfect entries and no narrative renders blank in every viewer a clinician will open. Every section is emitted even when empty, and an empty allergy list carries an explicit negated "no known allergies" entry. An omitted section means UNKNOWN, and the clinician on the other end prescribes as if there are none. An unmappable code system is nullFlavoured rather than guessed at: a receiver told the wrong system looks the code up in the wrong dictionary and either finds nothing or, worse, finds something. RIGHTS 265-267. All three are ROOTS, not children of VIEW_CHART, which is the tempting parent and the wrong one: viewing a chart is bounded by a care relationship with ONE patient, and all three of these read across the whole population by design. BULK_EXPORTS storage domain, on its own line because a weekly full export is a weekly full copy — the fact a bill should make visible before the invoice does.