Skip to main content

Diagnosis

One patient's diagnosis at one visit: the code, when it started, and whether it has resolved.

383,998 records · 8 data fields · 4 relationships

Explore records
Source: conditions.csv → table diagnosis → displayed as Diagnosis why?

This data originates from Synthea as conditions (conditions.csv), one row per row, is stored in the diagnosis SurrealDB table, and displayed as Diagnosis for clinical-domain familiarity.

Relationship map — Diagnosis highlighted
Has visit Attended by At care site Recorded diagnosis Prescribed Included procedure Has care plan Addresses diagnosis Practices at Started care plan Billed as Has claim Billed to Primary Secondary Has expense year Covered by Has diagnosis Has medication Has procedure PatientDIM · ACTOR GRAIN VisitFACT · EVENT GRAIN Diagnosis conceptDIM · CODE GRAIN DiagnosisFACT · EVENT GRAIN Medication conceptDIM · CODE GRAIN MedicationFACT · EVENT GRAIN Procedure conceptDIM · CODE GRAIN ProcedureFACT · EVENT GRAIN ProviderDIM · ACTOR GRAIN Care planFACT · EVENT GRAIN Care siteDIM · ACTOR GRAIN ClaimFACT · EVENT GRAIN PayerDIM · ACTOR GRAIN Expense yearFACT · YEAR ROLLUP Coded as Coded as Coded as

Click any node to explore its schema. Highlighted relationships connect to or from Diagnosis.

Field definitions

opens the record when pasted into search points at another record, named under Links to

Field Type Description Links to
patient_id Diagnosis of string Foreign key to the Patient. Each diagnosis has exactly one patient; each patient has one or many diagnoses. Patient
encounter_id Diagnosed during string Foreign key to the Encounter when the condition was diagnosed. Each diagnosis has exactly one visit; each visit has zero or many diagnoses. Visit
code Coded as string Diagnosis code from SNOMED-CT or ICD10. Each diagnosis has exactly one diagnosis concept; each diagnosis concept has one or many diagnoses. Diagnosis concept Pages only
system string Specifies the code system — SNOMED-CT or ICD10.
description string Description of the condition.
start datetime The date the condition was diagnosed.
stop option<datetime> The date the condition resolved, if applicable.
record_id string This diagnosis's identity, built at import from its visit's id and its code — the source export gives the row no id of its own.

Referenced by

Records joined to this one by a visit and a code

  • Each diagnosis has zero or one care plan; each care plan has zero or one diagnosis. Care plan exact key careplan.encounter_id and careplan.reason_code on each care plan

Provenance where this row came from · 7 fields

Field Type Description
source_table string Synthea CSV this row was read from.
source_snapshot_id string Corpus generation this row belongs to.
ingest_run_id string Import run that wrote the row.
generation_run_id string Synthea run that produced the source CSV.
load_timestamp datetime When the row was written.
source_role string Role this source played for the record.
contributing_sources option<array<string>> Other rows that contributed to this record.

Collapsed here because a reader came for what diagnosis means, not where one row came from — that question is the substance of every diagnosis record's own Provenance page, reachable from any diagnosis record.

Types are SurrealDB's own: option<T> means the value may be absent. Full reference: SurrealDB data types.

Not searchable

A diagnosis is reached from its visit, its patient or its diagnosis concept, or by pasting its id; search finds the concept.

Beyond text search

what else happened at this diagnosis's visit

Answering this means walking diagnosis → diagnosed during → visit. The three shipped search arms — BM25, HNSW, RRF fusion — match text inside one table, so none can.