MedicalTrace

Data residency

Which store holds passport data, files, and chain commitments, and who operates each store.

MedicalTrace is a network of organizations. The passport has to be readable across those organizations. The files behind the passport do not have to sit in one company’s database.

Carl Richardson LLC operates the shared platform and publishes the privacy rules: which fields may appear on a public passport, which files stay restricted, and what a hosted store is allowed to process. Publishing those rules is the operator’s job. Holding every participant’s PostgreSQL database and file bucket is not.

Demo stack versus the network model

The demo API runs as one PostgreSQL database and one object store, with rows separated by organization id. Carl Richardson LLC operates that demo stack. The split below is the residency model for the network. It is not how the local seed is deployed today.

Four places data can live

PlaceWho operates itWhat belongs there
Organization storeThat organizationIts restricted documents, internal copies, and the database it uses for its own operational records
Hosted storeCarl Richardson LLC, only if that organization chooses itThe same private material, for that one organization
Passport indexThe platform operatorThe shared identity, credential summaries, custody coordination, and digests other parties must be able to resolve
ChainThe configured networkSelected commitment hashes and status anchors. Not the PDF and not the operational database

An organization store is that organization’s own PostgreSQL (or equivalent) and its own file storage. The organization chooses the region, the backups, and who can administer the disks. Other tenants do not receive a connection string to it.

A hosted store is optional. An organization that does not want to run a database can place its private store with Carl Richardson LLC. That arrangement covers that organization’s bytes. It does not merge the files into another tenant’s store, and it does not make the operator the owner of the records. The operator processes those bytes under the privacy terms the organization accepted. A team that picks hosting should assume the operator can access the stored objects as a processor. Hosting is not a claim that the operator is unable to read the files.

Signing keys stay with the organization that signs. They are not a column in the passport index and they are not written into the hosted database as raw key material.

What the shared index is for

If every byte lived only inside Demo Lab’s database, Demo Hospital could not see that an inspection was signed after the bed moved. The index is the part that crosses tenants. It is intentionally small.

The index carries:

  • Passport id and the fields approved as public (in the demo, category and model)
  • Registering organization and current custodian, so the API can enforce the private-row rule
  • Credential summary: issuer organization, claim type, validity window, status, lifecycle, and the payload digest
  • Custody requests addressed to a receiver, so that receiver can accept or reject
  • Document digests (sha256), not the file body
  • The outbox row that asks a worker to anchor a hash

The index does not carry the PDF, the service-report bytes, prices, or patient information. Patient information is out of scope for the equipment passport.

When Demo Lab signs an inspection, the file remains in the lab’s store (its own, or a hosted store the lab chose). The passport records the digest. Demo Hospital can compare a file it received with that digest. Releasing the bytes themselves is a decision of the organization that holds them, under the access policy. The demo API does not yet federate a download from another organization’s store. In the demo, the object key and the digest sit in the shared document_versions table, and the object store is the single local bucket.

What the chain is for

The chain stores a commitment so a later reader can see whether a file matches a recorded version, and so selected status changes have an integrity history. The underlying claim still depends on the issuer and its evidence.

In the demo schema, blockchain_outbox holds payloadHash, a small JSON payload, network, state, and an optional txHash. Full documents are not the payload. Ordinary reads are application reads. They are not designed to require a node, a token, or a fee.

Chain events, addresses, and stored commitments can be publicly observable. Keeping a PDF off-chain does not make the commitment, the timing, or the relationship between anchors anonymous.

How the demo schema maps

These tables exist in the demo PostgreSQL database today. The right-hand column is where that data belongs once an organization store is real.

Demo tableIntended place
organizations, memberships, issuer_grantsPassport index. Participation and grants are network facts
usersThe identity provider that user belongs to. Production IdP is not chosen yet
equipment public fields, passport id, manufacturer, custodian, custody versionPassport index
credential_versions summaries, status, digests, credential_status_eventsPassport index
custody_transfersPassport index, so the named receiver can answer
lifecycle_events summariesPassport index. Evidence bytes cited by evidenceRefs stay in the holding organization’s store
document_versions.storage_key and the object bytesOrganization store or hosted store. The index keeps the digest and the access policy
audit_eventsThe organization whose member acted, in that organization’s store. The demo writes them into the shared database
blockchain_outboxOperator infrastructure next to the index. The chain holds the resulting commitment

document_versions.access_policy defaults to RESTRICTED.

What “the operator manages the database” means

Today, for this demo API, Carl Richardson LLC manages the one database and the one object store. Tenant separation is application-level: queries filter by organization, and a cross-tenant equipment id is hidden as 404.

For the network, the operator manages the passport index and the privacy rules. Each organization manages its own database and file storage, unless it opts into a hosted store. Choosing the hosted store is a procurement decision for that organization. It is not the default, and it is not required in order to register a device or accept custody.

Export of an organization’s own records is part of this model. Format and scope follow the pilot. The demo API names audit:export on memberships and does not yet serve that export.

On this page