REST API
Complete HTTP API reference for patient management, VFS access, data ingestion, and pipeline inspection.
REST API
Base URL
https://api.<workspace-id>.clinia.cloudReplace <workspace-id> with your workspace identifier.
All patient-scoped routes are prefixed with /patients/{patientId}.
The MCP tools (browse_patient, read_patient, search_patient, get_patient_info) are not part of this spec. See MCP Tools for those.
Authentication
All requests require an API key header:
X-Clinia-API-Key: <clinia-api-key>Patients
Patient registry management. A patient is created implicitly on first ingest and is identified by a registry key chosen by the caller.
List all patients
GET /patientsReturns all patients currently loaded in the server registry. An empty array is returned if no patients have been ingested yet.
Response 200
Array of PatientRegistryEntry objects.
curl "https://api.<workspace-id>.clinia.cloud/patients" \
-H "X-Clinia-API-Key: <clinia-api-key>"[
{
"registryKey": "jane-smith",
"patient": {
"id": "p-001",
"name": "Jane Smith",
"birthDate": "1968-04-12",
"gender": "female"
},
"ready": true,
"stats": { "entities": 18, "events": 11, "relationships": 22, "warnings": 1, "loadMs": 840 }
}
]Get patient
GET /patients/{patientId}Returns demographics and pipeline statistics for a single registered patient.
Path parameters
| Parameter | Type | Description |
|---|---|---|
patientId | string | Patient registry key |
Response 200 (PatientDetail)
Response 404 (ErrorResponse, patient not found or no data ingested yet)
curl "https://api.<workspace-id>.clinia.cloud/patients/{patientId}" \
-H "X-Clinia-API-Key: <clinia-api-key>"{
"id": "p-001",
"name": "Jane Smith",
"birthDate": "1968-04-12",
"gender": "female",
"stats": { "entities": 18, "events": 11, "relationships": 22, "warnings": 1, "loadMs": 840 }
}Delete patient
DELETE /patients/{patientId}Removes all in-memory state for the patient including the resolved graph, event store, and search index. Does not delete cache files on disk. Use Reset patient to also clear the cache. Safe to call on a patient that does not exist (existed will be false).
Path parameters
| Parameter | Type | Description |
|---|---|---|
patientId | string | Patient registry key |
Response 200
| Field | Type | Description |
|---|---|---|
ok | boolean | Always true when the request processed without error |
existed | boolean | true if the patient was present and removed; false if the key was not found |
curl -X DELETE "https://api.<workspace-id>.clinia.cloud/patients/{patientId}" \
-H "X-Clinia-API-Key: <clinia-api-key>"{ "ok": true, "existed": true }VFS
Browse and read the resolved patient graph through a path-based filesystem metaphor. Content is materialized lazily on each request from the live graph. Nothing is stored as pre-rendered files.
Slugs in path segments are derived from entity display names: lowercased, spaces and special characters replaced with underscores.
Browse VFS
GET /patients/{patientId}/vfsReturns a directory listing with one-line previews for each entry, or file content if the path resolves to a leaf file. Omit the path parameter to browse the patient root.
Path parameters
| Parameter | Type | Description |
|---|---|---|
patientId | string | Patient registry key |
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
path | string | / | VFS path relative to the patient root (e.g. /conditions/active) |
Supported path schema
| Path | Returns |
|---|---|
/ | Patient root: top-level category directories |
/conditions/ | active/ and resolved/ subdirectories |
/conditions/{active|resolved}/ | List of condition slugs |
/conditions/{active|resolved}/{slug}/ | _story.md and _raw.json entries |
/medications/ | current/ and discontinued/ subdirectories |
/medications/{current|discontinued}/{slug} | Medication detail entries |
/labs/latest | Most recent value per LOINC code |
/labs/trends/{loinc-slug} | Time series for a specific lab |
/timeline/ | List of years with events |
/timeline/{year}/ | Events in a given year |
/allergies/ | List of allergy slugs |
/family_history/ | List of family history slugs |
/sources/ | List of source document slugs |
/sources/{doc-slug} | Document metadata and narrative sections |
/memory/ | Agent-accumulated facts and insights |
Response 200 (BrowseResult)
Response 404 (ErrorResponse, path not found)
curl "https://api.<workspace-id>.clinia.cloud/patients/{patientId}/vfs?path=/conditions/active" \
-H "X-Clinia-API-Key: <clinia-api-key>"{
"path": "/patient/jane-smith/conditions/active",
"type": "directory",
"children": [
{ "name": "type_2_diabetes_mellitus", "type": "directory", "preview": "active since 2016" },
{
"name": "chronic_kidney_disease_stage_3",
"type": "directory",
"preview": "active since 2019"
}
]
}Read VFS path
GET /patients/{patientId}/readReturns the rendered content of a specific VFS file. The format parameter controls output verbosity.
Path parameters
| Parameter | Type | Description |
|---|---|---|
patientId | string | Patient registry key |
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
path | string | (required) | VFS file path relative to the patient root (e.g. /conditions/active/type_2_diabetes_mellitus/_story.md) |
format | narrative | structured | compact | narrative | Output verbosity level (see below) |
token_budget | integer | none | Approximate upper bound on output length in tokens (1 token ≈ 4 characters). Truncates output to fit. |
Format values
| Value | Output | Approx. tokens | Best for |
|---|---|---|---|
narrative | Prose Markdown with full clinical context | 300–800 | Agent reasoning over the complete picture |
structured | JSON with all entity fields, codes, provenance, and relationships | 200–500 | Programmatic field access |
compact | Key facts in minimal prose | 50–150 | Scanning many entities quickly |
Notable file paths
| Path | Description |
|---|---|
/conditions/{status}/{slug}/_story.md | Full longitudinal condition narrative: onset, active medications with dosage, monitoring labs with trend, complications, comorbidities, and timeline. Highest-value path for multi-hop clinical questions. |
/conditions/{status}/{slug}/_raw.json | Raw ClinicalEntity JSON plus all typed relationships to and from this entity |
/labs/latest | Most recent lab value per LOINC code across all lab entities |
/labs/trends/{loinc-slug} | Full chronological time series for a single LOINC code with computed trend direction |
Response 200
| Field | Type | Description |
|---|---|---|
content | string | Rendered content in the requested format |
Response 404 (ErrorResponse, path not found)
curl "https://api.<workspace-id>.clinia.cloud/patients/{patientId}/read?path=/conditions/active/type_2_diabetes_mellitus/_story.md" \
-H "X-Clinia-API-Key: <clinia-api-key>"Ingest
Submit clinical data for entity resolution. The resolution pipeline runs synchronously after each ingest call. Data is immediately queryable when the response returns. Calling an ingest endpoint multiple times on the same patient accumulates sources; each call re-runs the full resolution pipeline over all accumulated data.
Batch ingest
POST /patients/{patientId}/ingestSubmits FHIR, CDA, and/or document metadata in a single call. More efficient than three separate calls because the resolution pipeline runs only once. At least one of fhir, cda, or documents must be present.
Path parameters
| Parameter | Type | Description |
|---|---|---|
patientId | string | Patient registry key (created on first ingest) |
Request body: BatchIngestRequest
Response 200 (IngestResult)
curl -X POST "https://api.<workspace-id>.clinia.cloud/patients/{patientId}/ingest" \
-H "X-Clinia-API-Key: <clinia-api-key>" \
-H "Content-Type: application/json" \
-d '{ "fhir": [{ "resourceType": "Bundle", "entry": [] }], "cda": ["<ClinicalDocument>...</ClinicalDocument>"] }'Ingest FHIR
POST /patients/{patientId}/ingest/fhirAccepts a FHIR R4 Bundle or a single FHIR resource. If a Bundle is passed, all entries in bundle.entry[].resource are processed. Single resources are wrapped in a synthetic bundle internally.
Supported resource types: Patient, Condition, MedicationStatement, Observation, Encounter, AllergyIntolerance, Coverage, Procedure, Immunization, FamilyMemberHistory, DocumentReference, DiagnosticReport.
Path parameters
| Parameter | Type | Description |
|---|---|---|
patientId | string | Patient registry key |
Request body: A FHIR R4 Bundle or any supported single FHIR resource (JSON). Additional FHIR properties are passed through without validation. The FHIR connector handles structural parsing and emits warnings for unrecognised fields.
Response 200 (IngestResult)
curl -X POST "https://api.<workspace-id>.clinia.cloud/patients/{patientId}/ingest/fhir" \
-H "X-Clinia-API-Key: <clinia-api-key>" \
-H "Content-Type: application/json" \
-d @bundle.jsonIngest CDA
POST /patients/{patientId}/ingest/cdaAccepts a CDA or C-CDA XML document as a raw string. Sections are identified by LOINC code. Sections with narrative text but no structured entries are extracted as NarrativeSection objects and stored for source browsing.
Supported section types: Problems, Medications, Allergies, Results, Vitals, Encounters, Procedures, Payers, Advance Directives.
Path parameters
| Parameter | Type | Description |
|---|---|---|
patientId | string | Patient registry key |
Request body: CDA or C-CDA XML document as a raw string. Content-Type: text/xml or text/plain.
Response 200 (IngestResult)
curl -X POST "https://api.<workspace-id>.clinia.cloud/patients/{patientId}/ingest/cda" \
-H "X-Clinia-API-Key: <clinia-api-key>" \
-H "Content-Type: text/xml" \
--data-binary @summary.xmlIngest document
POST /patients/{patientId}/ingest/documentRegisters a PDF, image, or other unstructured file by metadata only (no file bytes are uploaded). Creates a DocumentNode indexed in the full-text search store, making the document discoverable in the VFS at /sources/ even though its content is not parsed. Useful for maintaining provenance references to documents that exist outside the system.
Path parameters
| Parameter | Type | Description |
|---|---|---|
patientId | string | Patient registry key |
Request body: DocumentMetadata
Response 200 (IngestResult)
curl -X POST "https://api.<workspace-id>.clinia.cloud/patients/{patientId}/ingest/document" \
-H "X-Clinia-API-Key: <clinia-api-key>" \
-H "Content-Type: application/json" \
-d '{ "name": "scan_20230801.pdf", "mimeType": "application/pdf" }'Reset patient
POST /patients/{patientId}/ingest/resetRemoves all ingested data, the resolved graph, the event store, the search index, and any cached pipeline output files on disk. Also removes the patient registry entry. Equivalent to DELETE /patients/{patientId} plus cache file deletion. Use before re-ingesting a corrected data set from scratch.
Path parameters
| Parameter | Type | Description |
|---|---|---|
patientId | string | Patient registry key |
Response 200
| Field | Type | Description |
|---|---|---|
ok | boolean | Always true when the reset completed without error |
curl -X POST "https://api.<workspace-id>.clinia.cloud/patients/{patientId}/ingest/reset" \
-H "X-Clinia-API-Key: <clinia-api-key>"Get ingest status
GET /patients/{patientId}/ingest/statusReturns whether data has been ingested and the pipeline has run, current pipeline statistics, and all ExtractionWarning objects emitted during the most recent ingest. Use this to diagnose missing entities. Warnings indicate why a resource was not extracted.
Path parameters
| Parameter | Type | Description |
|---|---|---|
patientId | string | Patient registry key |
Response 200 (IngestStatus)
curl "https://api.<workspace-id>.clinia.cloud/patients/{patientId}/ingest/status" \
-H "X-Clinia-API-Key: <clinia-api-key>"{
"ready": true,
"sources": [
{
"label": "FHIR Bundle",
"stats": { "itemsScanned": 42, "entitiesExtracted": 12, "eventsExtracted": 8 }
},
{
"label": "Summary_20230907.xml",
"stats": { "itemsScanned": 28, "entitiesExtracted": 9, "eventsExtracted": 4 }
}
],
"patient": { "id": "p-001", "name": "Jane Smith" },
"loadStats": { "entitiesExtracted": 18, "eventsExtracted": 11, "relationshipsExtracted": 22 },
"loadMs": 840
}Pipeline
Read-only access to resolution and reconciliation reports produced by the consolidation pipeline. Use these to audit merge decisions, debug unexpected entity behaviour, and review post-processing actions.
Get resolution report
GET /patients/{patientId}/resolutionReturns every entity in the resolved graph with its complete ProvenanceTrace: which sources contributed, what field-level conflicts existed, how each conflict was resolved, and which resolution layer (1–4) made the final merge or no-merge decision.
Path parameters
| Parameter | Type | Description |
|---|---|---|
patientId | string | Patient registry key |
Response 200 (ResolutionReport)
curl "https://api.<workspace-id>.clinia.cloud/patients/{patientId}/resolution" \
-H "X-Clinia-API-Key: <clinia-api-key>"See Audit Entity Resolution for a guide to reading this report.
Get reconciliation summary
GET /patients/{patientId}/reconciliationReturns a summary of what the consolidation pipeline did: merge statistics, the full list of inferred relationships added by the relationship resolver, and all post-processing actions applied by the condition post-processor.
Path parameters
| Parameter | Type | Description |
|---|---|---|
patientId | string | Patient registry key |
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
format | markdown | json | markdown | markdown returns a human-readable report; json returns a structured ReconciliationReport |
Response 200 (ReconciliationReport or Markdown string)
curl "https://api.<workspace-id>.clinia.cloud/patients/{patientId}/reconciliation" \
-H "X-Clinia-API-Key: <clinia-api-key>"curl "https://api.<workspace-id>.clinia.cloud/patients/{patientId}/reconciliation?format=json" \
-H "X-Clinia-API-Key: <clinia-api-key>"See Review the Reconciliation Summary for a guide to reading this report.
Schemas
PatientInfo
Demographics extracted from ingested source data. Populated from the FHIR Patient resource or equivalent CDA patient header.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | Clinical patient identifier from the source data. May differ from the registry key. |
name | string | yes | Patient's full display name as extracted from the source |
birthDate | string (date) | no | Date of birth in ISO 8601 format (YYYY-MM-DD) |
gender | string | no | Gender as recorded in the source (not normalized) |
PipelineStats
Counts produced by the entity resolution pipeline after the most recent ingest call.
| Field | Type | Description |
|---|---|---|
entities | integer | Number of deduplicated ClinicalEntity nodes in the resolved graph |
events | integer | Number of ClinicalEvent entries in the timeline store (encounters, lab results, procedures). Not deduplicated (each occurrence is preserved). |
relationships | integer | Number of typed edges, including both explicit and inferred relationships |
warnings | integer | Total ExtractionWarning count. Non-zero does not prevent querying. |
loadMs | integer | Wall-clock time in milliseconds for the most recent full pipeline execution |
PatientRegistryEntry
A single entry in the patient registry, as returned by GET /patients.
| Field | Type | Required | Description |
|---|---|---|---|
registryKey | string | yes | Caller-assigned identifier used as patientId in all endpoints |
patient | PatientInfo | no | Demographics. Absent if no Patient resource was ingested. |
ready | boolean | yes | true if at least one ingest has completed and the pipeline has run |
stats | PipelineStats | no | Pipeline statistics from the most recent ingest run. Absent when ready is false. |
PatientDetail
Full patient detail returned by GET /patients/{patientId}. Combines PatientInfo fields with pipeline statistics.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | Clinical patient identifier from the source |
name | string | yes | Patient's full display name |
birthDate | string | no | Date of birth in ISO 8601 format |
gender | string | no | Gender as recorded in the source |
stats | PipelineStats | yes | Pipeline statistics from the most recent ingest run |
VfsEntry
A single entry in a VFS directory listing.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Directory entry name or file name (slug or literal file name like _story.md) |
type | directory | file | yes | Whether this entry is navigable (directory) or readable (file) |
preview | string | no | One-line summary of the entry's content |
BrowseResult
The result of a VFS browse operation.
| Field | Type | Required | Description |
|---|---|---|---|
path | string | yes | Fully-qualified VFS path that was resolved, including the /patient/{id} prefix |
type | directory | file | yes | Whether the resolved path is a directory or a file |
children | VfsEntry[] | no | Entries in this directory. Present only when type is directory. |
content | string | no | Inline file content. Present only when type is file. |
DocumentMetadata
Metadata for registering an unstructured document without uploading file bytes.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | File name including extension (e.g. scan_20230801.pdf). Used to derive document type and attempt date extraction from an embedded YYYYMMDD sequence. |
mimeType | string | no | MIME type (e.g. application/pdf, image/jpeg). If omitted, inferred from extension. |
BatchIngestRequest
Request body for batch ingest. At least one of fhir, cda, or documents must be present.
| Field | Type | Description |
|---|---|---|
fhir | object[] | One or more FHIR R4 Bundles or single resources. See Ingest FHIR. |
cda | string[] | One or more CDA or C-CDA XML documents as raw strings. See Ingest CDA. |
documents | DocumentMetadata[] | One or more unstructured document metadata entries to register. |
ConnectorStats
Extraction statistics produced by a single connector run.
| Field | Type | Description |
|---|---|---|
itemsScanned | integer | Total source items inspected by the connector, including skipped items |
entitiesExtracted | integer | ClinicalEntity objects successfully produced and passed to the resolution pipeline |
eventsExtracted | integer | ClinicalEvent objects (encounters, lab results, procedures) added to the timeline store |
ExtractionWarning
A warning emitted when a source item could be partially parsed but not fully extracted. Warnings do not halt ingestion.
| Field | Type | Required | Description |
|---|---|---|---|
source | fhir | cda | document | yes | The connector that emitted this warning |
path | string | no | Resource path within the source (e.g. Condition/abc123, Problems section / entry 3) |
message | string | yes | Human-readable description of what was missing or unparseable |
severity | low | medium | high | yes | low: minor data degradation. medium: entity extracted with reduced fidelity. high: item skipped entirely. |
IngestResult
The result of a completed ingest operation. Returned after the connector and resolution pipeline have both completed.
| Field | Type | Required | Description |
|---|---|---|---|
ok | boolean | yes | true if ingest and pipeline completed without a fatal error. Can be true even when warnings > 0. |
source | string | yes | The connector used: fhir, cda, document, or batch |
stats | ConnectorStats | yes | Extraction statistics. For batch ingest, combined totals across all connectors. |
warnings | integer | yes | Total ExtractionWarning count. Check GET /ingest/status for the full list. |
patient | PatientInfo | no | Demographics extracted from the source. Absent for document-only ingest. |
IngestStatus
Current state of a patient in the registry.
| Field | Type | Required | Description |
|---|---|---|---|
ready | boolean | yes | true if at least one ingest has completed and the pipeline has run |
sources | SourceStat[] | yes | One entry per ingested source, each with a label and per-connector stats |
patient | PatientInfo | no | Demographics. Absent if no Patient resource was ingested. |
loadStats | LoadStats | no | Aggregate post-resolution counts. Absent when ready is false. |
loadMs | integer | yes | Total pipeline duration in milliseconds |
SourceStat
| Field | Type | Description |
|---|---|---|
label | string | Human-readable label for the source |
stats | ConnectorStats | Extraction statistics for this source |
LoadStats
| Field | Type | Description |
|---|---|---|
entitiesExtracted | integer | Total deduplicated entities in the resolved graph |
eventsExtracted | integer | Total clinical events in the timeline store |
relationshipsExtracted | integer | Total typed relationship edges in the graph |
SourceRef
A reference to a single source that contributed to a merged entity.
| Field | Type | Required | Description |
|---|---|---|---|
type | fhir | cda | document | yes | Connector type that produced this source reference |
origin | string | yes | Human-readable label for the source document (e.g. FHIR Bundle, Summary_20230907.xml) |
reliability | number (0–1) | yes | Weight given to this source when resolving conflicts. FHIR sources typically score 0.85; CDA 0.80. |
ref | string | no | Original resource reference within the source (e.g. Condition/abc123) |
ConflictRecord
A field-level conflict between two or more sources during entity resolution.
| Field | Type | Required | Description |
|---|---|---|---|
field | string | yes | The entity field with conflicting values (e.g. status, dosageText) |
values | string[] | yes | The conflicting values, one per contributing source, in the same order as sources |
resolution | string | yes | Which value was selected as canonical and why |
ProvenanceTrace
The complete audit record attached to every merged ClinicalEntity.
| Field | Type | Required | Description |
|---|---|---|---|
sources | SourceRef[] | yes | All source records merged into this entity. A single-element array means the entity appeared in only one source. |
conflicts | ConflictRecord[] | yes | Field-level conflicts. Empty array means all sources agreed. |
resolvedBy | string | yes | The resolution layer that made the final decision (see table below) |
reasoning | string | no | LLM's natural-language rationale. Only present when resolvedBy is llm-adjudication. |
confidence | number (0–1) | yes | Overall confidence combining source reliability and resolution layer confidence |
resolvedBy values
| Value | Layer | What happened |
|---|---|---|
deterministic-code | 1 | Entities share a standard code (SNOMED, RxNorm, ICD-10, LOINC) |
nlp-normalization | 2 | Same concept with different display text or minor variation |
embedding-similarity | 3 | Semantically similar with no shared code |
llm-adjudication | 4 | Ambiguous case escalated to LLM for clinical judgment |
no-merge | none | Entity was not merged (treated as unique) |
ClinicalCode
A single clinical code from a standardized coding system.
| Field | Type | Required | Description |
|---|---|---|---|
system | string | yes | URI of the coding system (e.g. http://snomed.info/sct, http://loinc.org) |
code | string | yes | Code value within the system (e.g. 44054006, E11.9) |
display | string | no | Human-readable display name as it appeared in the source |
ResolvedEntity
A single deduplicated clinical entity in the resolved graph.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | Stable graph identifier derived from primary code (e.g. condition:snomed:44054006) |
display | string | yes | Canonical display name after normalization. Used to generate VFS path slugs. |
type | string | yes | Clinical category (see VFS Paths) |
status | active | resolved | inactive | stopped | no | Clinical status. Absent if the source did not provide one. |
codes | ClinicalCode[] | no | All clinical codes across contributing sources, deduplicated |
confidence | number (0–1) | yes | Overall confidence reflecting source reliability and resolution decision strength |
provenance | ProvenanceTrace | yes | Complete audit trail for this entity's resolution |
ResolutionReport
The complete entity resolution report for a patient.
| Field | Type | Required | Description |
|---|---|---|---|
patient | PatientInfo | yes | Demographics of the patient this report covers |
entities | ResolvedEntity[] | yes | All deduplicated entities in the resolved graph, ordered by type then display name |
InferredRelationship
A typed directed edge inferred by the relationship resolver using the clinical knowledge base. Only created when no explicit edge of the same type already exists between the same pair.
| Field | Type | Required | Description |
|---|---|---|---|
fromId | string | yes | Graph entity ID of the source node |
fromDisplay | string | no | Display name of the source entity |
toId | string | yes | Graph entity ID of the target node |
toDisplay | string | no | Display name of the target entity |
type | string | yes | Semantic relationship type (see table below) |
confidence | number (0–1) | yes | Derived from knowledge base strength: 0.90 (strong), 0.75 (moderate), 0.60 (weak) |
Relationship types
| Type | Source | Example |
|---|---|---|
prescribed_for | knowledge_base | metformin → type_2_diabetes_mellitus |
monitors | knowledge_base | hba1c → type_2_diabetes_mellitus |
complication_of | knowledge_base | chronic_kidney_disease → type_2_diabetes_mellitus |
manifestation_of | knowledge_base | peripheral_neuropathy → type_2_diabetes_mellitus |
progression_of | knowledge_base | ckd_stage_4 → ckd_stage_3 |
risk_factor_for | knowledge_base | hyperlipidemia → coronary_artery_disease |
commonly_comorbid | knowledge_base | hypertension → type_2_diabetes_mellitus |
same_disease_axis | knowledge_base | microalbuminuria → chronic_kidney_disease |
occurred_during | temporal_inference | chronic_kidney_disease → encounter_2023_05 |
PostProcessAction
A single action taken by the condition post-processor heuristic pass to fix a common EHR data quality issue.
| Field | Type | Required | Description |
|---|---|---|---|
type | string | yes | Action type (see table below) |
entityId | string | yes | Graph entity ID of the entity that was modified |
entityDisplay | string | no | Display name of the affected entity |
description | string | no | Plain-language explanation of what was changed and why |
Action types
| Type | What it does |
|---|---|
reclassify-to-family-history | Conditions coded as "hx of X" or "family history of X" moved to the family history subgraph |
reclassify-to-care-plan | Items better classified as care plan goals reclassified accordingly |
infer-resolved-status | Conditions with textual cues ("resolved", "in remission", "former") have status set accordingly |
link-symptom | Non-specific symptoms (fatigue, nausea) linked to likely parent conditions via clinical knowledge |
compound-condition | Related conditions combined into a compound clinical entity |
ReconciliationReport
A summary of all consolidation pipeline activity for a patient.
| Field | Type | Required | Description |
|---|---|---|---|
patient | PatientInfo | yes | Demographics of the patient this report covers |
stats | object | yes | Aggregate counts (see table below) |
inferredRelationships | InferredRelationship[] | yes | Complete list of relationship edges inferred by the relationship resolver |
postProcessActions | PostProcessAction[] | yes | Complete list of heuristic actions applied by the condition post-processor |
stats fields
| Field | Type | Description |
|---|---|---|
inputEntities | integer | Total ClinicalEntity objects produced by all connectors before deduplication |
resolvedEntities | integer | Entities remaining in the graph after deduplication (always ≤ inputEntities) |
mergedGroups | integer | Number of merge groups where two or more input entities collapsed into one |
explicitRelationships | integer | Relationship edges extracted directly from source data references |
inferredRelationships | integer | Relationship edges added by the relationship resolver |
postProcessActions | integer | Total heuristic post-processing actions applied |
ErrorResponse
Standard error response for 4xx responses.
| Field | Type | Required | Description |
|---|---|---|---|
error | string | yes | Human-readable description of what went wrong |
code | string | no | Machine-readable error code (e.g. PATIENT_NOT_FOUND, VFS_PATH_NOT_FOUND) |