decisions/republishing-sources.md on GitHub, at the commit these pages were built from
When a source moves, switches vendor or issues a new edition
Status: draft, 2026-10-21, from the review on #130. Adds server and organisation records, a connect act, a Same over
servers and over organisations with a derivation each, and within-organisation matcher rules; changes M2
(organisations are not the subject's records) and M1's triggers, and leaves jdg:currentlySame's amendment open. Names are
naming.md, whose rubric this note applies: a re-published record is a new definition (test 1), its join is a
judgment (test 2), one per server or organisation pair (test 3); which revision is current is
currency.md; what a judgment is and borrows is judgments.md.
Question
A record is named by its server and id, and the research on #130 measured that pair moving: the address a client holds changes while the server stays (2 to 3% of Epic's listed URLs a year, 41% not listed verbatim after one list rewrite); a hospital switches vendor and re-issues every id (1 to 4.5% of US hospitals a year); a hospital hands the person a second summary whose entry ids the generator minted. How are a re-published source's records joined to the ones the pod holds, without a judgment per record where one judgment will do?
What others do
- FHIR has
Provenancefor where a resource came from,Linkagefor "these resources are one thing",Patient.linkfor merged patients, andDocumentReference.relatesTo(replaces, transforms, appends) for editions;CapabilityStatement.implementation.urlis where a server states its own base. - CDA gives a document
setIdandversionNumber, andrelatedDocumentwithRPLCfor the edition it replaces. - openEHR puts the creating system in the version id, so a moved record is visibly from another system.
- SPHN keeps cross-provider sameness in
hasSharedIdentifier; git names remotes and lets a user say two are one.
Sources: FHIR Provenance (https://hl7.org/fhir/R4/provenance.html), Linkage (https://hl7.org/fhir/R4/linkage.html),
Patient.link (https://hl7.org/fhir/R4/patient.html#links), DocumentReference.relatesTo
(https://hl7.org/fhir/R4/documentreference.html), CapabilityStatement.implementation
(https://hl7.org/fhir/R4/capabilitystatement.html); CDA relatedDocument (HL7 CDA R2, §4.2.3.3,
https://www.hl7.org/implement/standards/product_brief.cfm?product_id=7); research 1 to 5 on #130
(https://github.com/the-cascade-protocol/cascade-vocabulary/issues/130#issuecomment-6327416626,
https://github.com/the-cascade-protocol/cascade-vocabulary/issues/130#issuecomment-6328100407,
https://github.com/the-cascade-protocol/cascade-vocabulary/issues/130#issuecomment-6328557801,
https://github.com/the-cascade-protocol/cascade-vocabulary/issues/130#issuecomment-6334427968,
https://github.com/the-cascade-protocol/cascade-vocabulary/issues/130#issuecomment-6334428443); the evidence issue keeping the
churn and self-URL counts and scripts (https://github.com/the-cascade-protocol/cascade-vocabulary/issues/201).
Choice
Everything observed from a source is a record with versions, revisions and a current state, and sameness of sources is one judgment per source-level fact, from which the per-record joins are derived.
| thing | prior art | what we do | borrowed or diverged | Rules that cite it |
|---|---|---|---|---|
| server | FHIR CapabilityStatement |
a record named by the base URL the client used; a connect is an act, and each writes a version of what the server reported: self-asserted base, login endpoint, software, and the client id it was reported to, since a pod holds connects from several apps; an address known only from a document or an export (Apple's copy carries the URL, not what the server said) has a server record with no version (A16, A17); never the subject's record, and taken by the matcher only once it has a version, for the machine's server Same (M2, M20) | ours; the self-URL is evidence, never a name input, diverging from FHIR's own statement of where a server lives |
|
| organisation | prov:Organization; W3C ORG org:Organization; FHIR Organization; CDA custodian |
a record, a prov:Organization and an org:Organization, since its identifiers are org:identifier, whose domain that is, named by server plus Organization/{id} from a server, and by a business identifier from a document, as naming.md maps it (a C-CDA id through HL7's CDA-to-FHIR identifier mapping, a FHIR Organization.identifier, a registered OID as its URI in both, so one NPI is one record in either format); name, address and identifiers on versions; a document names its custodian and author by it, in cascade:CustodianRole and cascade:AuthorRole; a pull writes one for each Organization it holds, and a record from a server names, on its version, the organisation the source says performed it, by prov:wasAttributedTo, as a variant interpretation names its lab: a lab result's Observation.performer (A20); never the subject's record, so never taken by the matcher (M2) |
borrowed from PROV; FHIR's Organization resource treated as any record |
|
| the part a party played in a document | PROV-DM association with a role; FHIR Provenance.agent; US Core ProvenanceTransmitter |
each part is a prov:qualifiedAssociation of the act that generated the document, a blank node with no type that the document's prov:wasGeneratedBy names: the association's prov:agent is the party and its prov:hadRole is cascade:AuthorRole, cascade:CustodianRole or cascade:TransmitterRole; the document is prov:wasAttributedTo its author and its custodian, by the node the association names, never its transmitter; each writer writes its own act, so a document may carry several, read through prov:wasGeneratedBy/prov:qualifiedAssociation; a query that needs no role reads prov:wasAttributedTo (runtime/arrivals.feature, A21; a person's judgment alike, judgments.md, row "maker") |
borrowed from PROV-DM, which puts a role on an association; from FHIR only the grouping, one Provenance per activity and its agents that activity's |
|
| two servers are one | git remotes | a Same whose members are two servers, by a person on the app's proposal, or by the machine when two connects made with one client id report the same self-URL, the same login endpoint and the same host (the Epic path edit: 57 of 57 kept the self-URL, 19 of 19 hosting moves changed it; verified, probed, research 2); with no like-for-like connect, the app proposes and the person decides; derivation: every record of one type and id under both, within one organisation, is one record (M20; same-records-under-same-servers.rq) |
ours; the derivation is Linkage computed rather than asserted |
|
| two organisations are one | Patient.link; SPHN |
a Same whose members are two organisations, usually the machine's from a shared NPI or OID, where one was read from a server or a document named them by different identifiers; derivation: the matcher's within-organisation rules run over both, and the server Same's derivation counts the two as one organisation (queries/derivations/same-organizations.rq, queries/derivations/same-records-under-same-servers.rq; runtime/matcher.feature, M22) |
ours | |
| two documents from one organisation | CDA setId, versionNumber, relatedDocument RPLC; FHIR relatesTo |
no judgment: a document names its custodian and author organisations by an identifier they carry (a C-CDA id; a FHIR document's Organization by an NPI or an identifier whose system is rooted at an OID or a UUID, never by its id in the bundle), as naming.md picks one, so two documents from one organisation point at one organisation record by name; where a document declares that it replaces another, the adapter reads it onto the document's version, once #254 rules what a replaced document is named by, since a pod names a document by its bytes; the overlap between the two is joined by name for C-CDA entries and by the within-organisation rules for a FHIR document's |
borrowed: a declared replacement is the standards' fact, stored as stated; "edition" as a judgment of ours is dropped | No rule cites this row. |
| within-organisation rules | inside one organisation a shared business identifier joins, and a shared code and date joins; which pairs, and what belongs to an organisation when one server serves many, is open (runtime/matcher.feature, M22) |
ours | ||
| what a run compares | a matcher run binds ?record to the records the import, entry or sync that triggered it brought, never the whole pod; a sync is a trigger, named as the run's cause (M1); the matcher queries change to bind it |
ours | ||
| record from a FHIR document | FHIR documents | named per document; joined across documents like any re-published record; a C-CDA's entries are named across documents by CDA id, per naming.md (runtime/naming.feature, N1) |
borrowed from FHIR's within-one-bundle promise | |
| what leaves the pod | a shared view carries records, by their opaque names, and their current states; never a server or organisation record, an act, or a Same over them, so a name outside the pod is stable and citable and says nothing of where the record came from; the keyed scheme is for a pod that must hide it even from one who knows the address, and the URL scheme for one that need hide nothing (runtime/the-kit.feature, Check 6) |
ours | ||
| what joins mean | jdg:currentlySame |
a derived join counts as a counting Same; a record-level Different still wins (queries/derivations/same-records-under-same-servers.rq); the amended definition is open |
ours | No rule cites this row. |
Why
Why one mechanism. (rows "two servers are one", "two organisations are one", "what joins mean") The three problems are one problem at three levels, answered by one mechanism: name by the source, join by one judgment per source-level fact, and let the matcher work per record only inside the scope that judgment gives it. Everything here is derived, so timing does not matter and retraction undoes every join at once.
Why the client's address, and the self-URL only as evidence. (row "server") Hashing the server's self-asserted base instead of the client's address was measured and lost (research 2): it survives a path edit and not a hosting move (verified, probed: 19 of 19 old Epic hosts now report the new host as themselves), MEDITECH never sends it, eClinicalWorks reports one base for every practice (both verified, probed), and Epic documents that it can differ per client id; as a judgment input it keeps the benefit and makes the failure retractable.
Why the machine's server Same needs two connects under one client id. (rows "two servers are one", "server") An address change is a server Same, and ids survive (inferred, not observed), so the derivation joins by id; the machine makes it only from two of the pod's own connects under one client id, because Epic documents that the self-URL can differ by the client id asking and a pod holds connects from several apps, so a mismatch across apps proves nothing and is left to the person, the safe direction; the app may propose it before a record is pulled, and a judgment made later has the same effect because it was never baked into a name. Records pulled under the new address are still written, so a name never depends on a judgment in one pod.
Why Apple's copy usually needs no join. (row "server") The common case needs no join at all: Apple's copy of a Mercy record carries the address Apple used, and where that is the address the app used the names already agree and the copy is one more revision; where Apple's address is the older one, the pod never spoke to it, so the join is the person's, or the app connects to the old address itself and earns like-for-like evidence while it still answers.
Why a server Same joins only within one organisation. (row "two servers are one") The derivation is confined to one organisation because a
multi-tenant server is one server, so the Same is true, and Patient/1 under two of its practices are two people.
Why a vendor switch is joined by the within-organisation rules. (row "within-organisation rules") A vendor switch re-issues ids, so a server Same joins nothing; but within one organisation a shared identifier is certain and a shared code and date is strong, and those rules join most of the history, with what is left on the review page. The floor is a source that carries no identifier at all, which falls back to labels and a person's judgment, as today.
Why a run is bound to what arrived. (row "what a run compares") A pair neither of whose records arrived was compared when the later of them
did, so a run compares the arrived records with their code groups and nothing else; a sync is a trigger because a union leaves
pairs no matcher saw together. With ?record unbound, every run enumerates every ordered pair of every code group,
about 1 to 5M rows, and same-result within one code is about 80M comparisons, where bound it is about 100k
(assumed ten-year pod, #206).
Why two documents from one organisation need no judgment. (rows "two documents from one organisation", "record from a FHIR document") Two summaries from one hospital need no judgment of their own: each names its custodian by the identifier it carries, so both point at one organisation record by name, a C-CDA's entries are named across documents by their CDA ids under the custodian's id that names that record, and a FHIR document's entries fall to the within-organisation rules like a vendor switch's; "edition" as a judgment would have been a story told about two documents that are only sometimes editions, and where one is, the document says so and the adapter stores what it said.
Why an organisation is a record. (row "organisation") An organisation is a record because a proposal, a view and a Same now point at one, and the source gives an OID or NPI to name it by; its name and address sit on versions so a merger's rename is history.
Why a record names its performing organisation by prov:wasAttributedTo, on its version. (row "organisation")
PROV's attribution, "the ascribing of an entity to an agent", is already how a variant interpretation's version names
the lab that performed it, read from the same FHIR element, Observation.performer, so a lab result from a server says
it the same way, with no term of ours. Looked at: FHIR's own elements (performer, managingOrganization,
serviceProvider), which are where the fact is read from, not terms a pod carries outside FHIR RDF's namespace; W3C
ORG, whose properties (org:memberOf, org:hasUnit, org:siteOf) relate people, units and sites to an organisation
and never an entity to one, so none fits a record; and a role on an association of the act that generated the version,
as a document names its custodian, which needs an act and a node per association inside the version and whose role
would say nothing a performer's plain attribution does not. It sits on the version because it is what one pull of the
record says: a server that later names another lab writes another version, and the record, named by server, type and
id, keeps its name. Only
Observation.performer is read: Patient.managingOrganization assigns a person's records to an organisation on a
server that may serve many, the open question below, and an Encounter, where serviceProvider sits, is no record.
Why the part a party played sits on the act that generated the document. (row "the part a party played in a
document") PROV-DM allows a role on a usage, a generation, an invalidation, an association, a start and an end, and
never on an attribution (https://www.w3.org/TR/2013/REC-prov-dm-20130430/#term-attribute); PROV-O gives prov:hadRole
the domains prov:Influence and the union of prov:Association and prov:InstantaneousEvent, which an attribution is
outside. So a role names the party's part in the act that made the document, and prov:wasAttributedTo still says who
the document is ascribed to, for the many queries that need no role. Looked at:
- The role on a
prov:Attribution, as the pod wrote it until #355. Failed because PROV allows a role on no attribution, so a reader that follows PROV-O reads every such attribution as an association too. - An act named by an IRI made from the document's name. Failed on four counts. A runtime refuses a document's graph
that holds a statement about no record, version, arrival, document or import (
runtime/arrivals.feature, A14), which an IRI act's associations would be. The document's file is its blank-node closure, so it would lose the act, and a typed act would be filed as an entry session underprovenance/activities/(runtime/pod-layout.ttl). It would need a naming rule of its own, computed alike by two adapters and two importers. And nothing points at it. The Bridge already names its own import act and its association as blank nodes. - A transmission as an act of its own. Failed because that act would generate the document too, and PROV-CONSTRAINTS
lets several activities generate one entity only at one instant
(https://www.w3.org/TR/prov-constraints/#generation-generation-ordering), which a writing and a later delivery are
not. It would need a second entity, the source's copy, which no pod holds and every reader would walk through. FHIR
maps one
Provenanceto oneprov:Activityand each of its agents to an agent of that activity (https://hl7.org/fhir/R4/provenance-mappings.html, the W3C PROV column), and US Core puts the transmitter on that sameProvenance(Provenance.agent:ProvenanceTransmitter, https://hl7.org/fhir/us/core/StructureDefinition-us-core-provenance.html). The same column mapsagent.typeto an attribution, the placement PROV-DM forbids, so FHIR is followed for the grouping and not for where the role goes.
Each writer writes its own act, the importer's facts one and each record's mapping that names an organisation's part
another, because none sees the others'. Blank acts assert no two of them are distinct, and PROV lets several
activities generate one entity at one instant (the constraint above), so a reader that walks
prov:wasGeneratedBy/prov:qualifiedAssociation reads every part whichever act names it.
Why privacy is drawn at the boundary. (row "what leaves the pod") The server and organisation records are in the clear inside the pod because the person owns the pod; the opaque name earns its keep at the boundary, where a receiver gets a name it can cite and reconcile by, and nothing that says where the record came from, because what leaves the pod is the person's choice, record by record, and the source is one more thing they may not want known.
Alternatives that lost
- The server's self-asserted base as the name input. The strongest case: it survived every Epic path edit measured, which is the common churn. It does not survive a hosting move, is absent from MEDITECH, and is one value for every eClinicalWorks practice.
- Pin to the first address the pod saw for a server. The strongest case: it would survive a hosting move too. The name would then depend on one pod's memory, so no other holder could recompute it.
- The guard on self-URL alone, whoever asked. The strongest case: it would fire on Apple's addresses and on another app's connects too. Apple's export carries no capability statement, so there is nothing to compare, and a self-URL reported to another client id can differ for the same server, so the comparison would miss joins it should make and could not be told from a real move.
- An edition judgment between two documents, with a derivation. The strongest case: CDA and FHIR both name the relation, and one judgment would join a whole summary's entries at once. Two summaries from one organisation are only sometimes editions; where they are, the document says so and that is a fact, not a judgment; and the entry joins already come from names (C-CDA) or the within-organisation rules (FHIR), so the derivation had nothing left to do.
- A judgment per record. The strongest case: it is what the matcher does today and needs nothing new. A moved server is one fact and thousands of records; one judgment says it once and is retracted once.
- Organisations as blank nodes with a label. The strongest case: nothing pointed at one, and labels collide. A proposal, a view and a Same now point at one, and the source gives an OID or NPI to name it by.
- Name by the visible pair and pseudonymise at share time. The strongest case: FHIR already has every part
(
Provenance, identifiers,Linkage,relatesTo), privacy belongs at the one boundary where it matters, and the pod stores source URLs, organisation names and OIDs in plain text anyway. A pseudonym per share is a new name per share, so a receiver cannot tell that two shares hold one record, or cite one back, and a hospital importing over the protocol needs the pod's names stable for the same reconciliation the pod does; the opaque name is stable and says nothing, and the line is drawn at what a share carries instead. - A run over the whole pod, filtered to its records afterwards. The strongest case: the matcher queries as written
leave
?recordunbound, so a run needs no list of what arrived and misses nothing. Every run then enumerates every pair of every code group, 1 to 5M rows and 80M same-result comparisons, a thousand times in ten years (assumed, #206).
Still open
- The full list of what a shared view may carry, beyond "records and their current states, no source records, acts or the Sames over them, and a person's judgment only as the share-time choice says": a views decision, resting on the tenet that anything in the pod may be what the person does not want shared, so the person chooses what leaves and nothing leaves by default.
- Which code-and-date pairs are near-certain inside one organisation; and how a record is assigned to an
organisation on a server that serves many (81 brands on one Epic server, verified, research 2; every eClinicalWorks practice on one base),
which the within-organisation derivation now depends on. Until it is ruled, the server Same's derivation holds two
records apart only when their documents name custodians that are not one organisation, so records from pulls, which
name none, are joined whenever the Same holds: a working choice pending Jay on
#204, not a ruling. The within-organisation identifier
rule for lab results (R18,
runtime/matcher.featureM22, #270) assumes the other way round, the safe direction: a record's organisation is one its documents name as custodian or author, or one a Same joins to it, and a record whose documents name none, as every pull's, is joined by no identifier; a server Same counts for nothing there, since one server serves many organisations. A pulled lab result's performing organisation (A20) is not read as its organisation by either: the lab that ran a test is not the organisation whose record it is, and the performer is one candidate for the assignment, asPatient.managingOrganizationis another, which this question rules on. - The amended
jdg:currentlySame. - A matcher rule for organisations:
jdg:SameBusinessIdentifierneeds a shared code, which an organisation lacks, and M2 takes no organisation's record. - Whether the NPI registry becomes a reference table kind; the organisation record does not wait on it.
What would change our mind
Vendors publishing an old-to-new address mapping, or a stable server identity the client can read, would make the server Same a derivation with no judgment. Servers keeping ids across a vendor switch would let the server Same cover it. Generators guaranteeing deterministic entry ids in FHIR documents would let those join by name as C-CDA entries do.