FHIR

Get clinical data status

get
/v1/{workspace_id}/fhir/status

Get event and entity counts for the workspace's clinical data.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Responses
chevron-right
200

Successful Response

application/json
configuredbooleanRequired
ehr_typeany ofOptional
stringOptional
or
nullOptional
fhir_store_urlany ofOptional
stringOptional
or
nullOptional
event_countintegerRequired
entity_countintegerRequired
last_poll_atany ofOptional
stringOptional
or
nullOptional
last_change_atany ofOptional
stringOptional
or
nullOptional
sync_healthyany ofOptional
booleanOptional
or
nullOptional
sync_failure_countintegerOptionalDefault: 0
get
/v1/{workspace_id}/fhir/status

List sync failures

get
/v1/{workspace_id}/fhir/sync-failures

Get events that permanently failed to sync to the external EHR. These need manual attention.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Query parameters
limitinteger · min: 1 · max: 100OptionalDefault: 50
Responses
chevron-right
200

Successful Response

application/json
totalintegerRequired
get
/v1/{workspace_id}/fhir/sync-failures

Import FHIR Bundle

post
/v1/{workspace_id}/fhir/import

Import a FHIR Bundle. Decomposes into events and creates patient entities.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Body
sourcestringOptionalDefault: fhir_import
source_systemany ofOptional
stringOptional
or
nullOptional
Responses
chevron-right
200

Successful Response

application/json
events_createdintegerRequired
events_skippedintegerOptionalDefault: 0
events_updatedintegerOptionalDefault: 0
entities_createdintegerRequired
entities_updatedintegerRequired
errorsstring[]Optional
post
/v1/{workspace_id}/fhir/import

Search patients

get
/v1/{workspace_id}/fhir/patients

Search patient entities by name, MRN, or phone.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Query parameters
qany ofOptional

Search by name

stringOptional
or
nullOptional
mrnany ofOptional

Search by MRN

stringOptional
or
nullOptional
phoneany ofOptional

Search by phone

stringOptional
or
nullOptional
limitinteger · min: 1 · max: 100OptionalDefault: 20
offsetintegerOptionalDefault: 0
Responses
chevron-right
200

Successful Response

application/json
totalintegerRequired
get
/v1/{workspace_id}/fhir/patients

Patient timeline

get
/v1/{workspace_id}/fhir/patients/{patient_id}/timeline

Get the full event timeline for a patient entity.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
patient_idstringRequired
Query parameters
domainany ofOptional
stringOptional
or
nullOptional
limitinteger · min: 1 · max: 200OptionalDefault: 50
offsetintegerOptionalDefault: 0
Responses
chevron-right
200

Successful Response

application/json
entity_idstringRequired
totalintegerRequired
get
/v1/{workspace_id}/fhir/patients/{patient_id}/timeline

Patient summary

get
/v1/{workspace_id}/fhir/patients/{patient_id}/summary

Get the agent-maintained world model state for a patient.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
patient_idstringRequired
Responses
chevron-right
200

Successful Response

application/json
entity_idstringRequired
entity_typestringRequired
display_nameany ofRequired
stringOptional
or
nullOptional
event_countintegerRequired
last_event_atany ofRequired
string · date-timeOptional
or
nullOptional
get
/v1/{workspace_id}/fhir/patients/{patient_id}/summary

Search FHIR resources

get
/v1/{workspace_id}/fhir/resources/{resource_type}

Search FHIR resources by type with standard search parameters.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
resource_typestringRequired
Query parameters
_countinteger · min: 1 · max: 100OptionalDefault: 20
_offsetintegerOptionalDefault: 0
nameany ofOptional
stringOptional
or
nullOptional
identifierany ofOptional
stringOptional
or
nullOptional
birthdateany ofOptional
stringOptional
or
nullOptional
dateany ofOptional
stringOptional
or
nullOptional
patientany ofOptional
stringOptional
or
nullOptional
statusany ofOptional
stringOptional
or
nullOptional
qany ofOptional

General search text

stringOptional
or
nullOptional
Responses
chevron-right
200

Successful Response

application/json
resource_typestringRequired
totalany ofRequired
integerOptional
or
nullOptional
next_urlany ofOptional
stringOptional
or
nullOptional
get
/v1/{workspace_id}/fhir/resources/{resource_type}

Create a FHIR resource

post
/v1/{workspace_id}/fhir/resources/{resource_type}

Create a new FHIR resource. Automatically creates patient entities.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
resource_typestringRequired
Body
Responses
post
/v1/{workspace_id}/fhir/resources/{resource_type}

Get a FHIR resource

get
/v1/{workspace_id}/fhir/resources/{resource_type}/{resource_id}

Fetch a single FHIR resource by type and ID.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
resource_typestringRequired
resource_idstringRequired
Responses
chevron-right
200

Successful Response

application/json
resource_typestringRequired
resource_idstringRequired
get
/v1/{workspace_id}/fhir/resources/{resource_type}/{resource_id}

Update a FHIR resource

put
/v1/{workspace_id}/fhir/resources/{resource_type}/{resource_id}

Update a FHIR resource. Creates a new event that supersedes the old one.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
resource_typestringRequired
resource_idstringRequired
Body
Responses
chevron-right
200

Successful Response

application/json
resource_typestringRequired
resource_idstringRequired
put
/v1/{workspace_id}/fhir/resources/{resource_type}/{resource_id}

Last updated

Was this helpful?