Skip to main content

Installation


Client Initialization


Engagements

hana.engagements.create(params)

Create a new patient engagement.
Returns: Engagement object with id, status, patient_id, scheduled_at, created_at.

hana.engagements.get(id)

Retrieve an engagement by ID, including outcomes if completed.

hana.engagements.list(filters)

List engagements with filtering and pagination.

hana.engagements.cancel(id)

Cancel a scheduled engagement before it starts.

Patients

hana.patients.upsert(id, data)

Create or update a patient record. Upsert by your internal patient ID.

hana.patients.get(id)

Retrieve a patient record.

hana.patients.getMemory(id)

Retrieve the longitudinal engagement memory for a patient — preferences, trends, barriers, interaction patterns.

hana.patients.delete(id, options)

Delete a patient and optionally erase all data (GDPR right to erasure):

Protocols

hana.protocols.create(config)

Create a custom clinical protocol:

hana.protocols.list()

List all protocols for your organization.

hana.protocols.upload(file)

Upload a clinical guideline (PDF, DOCX) for HANA to parse into a structured protocol:

Webhooks

hana.webhooks.create(config)

Register a webhook endpoint:

hana.webhooks.list()

List registered webhooks.

hana.webhooks.test(id)

Send a test event to verify connectivity.

hana.webhooks.replay(id, eventIds)

Replay failed webhook deliveries.

Organizations (Connect Mode)

Available when mode: 'connect'.

hana.organizations.create(config)

Create a sub-organization (for multi-tenant deployments):

hana.organizations.list()

List all sub-organizations under your platform.

Error Handling

All SDK methods throw typed errors:

TypeScript Support

The Node.js SDK is fully typed. All request params and response objects have TypeScript definitions:

Next: API Reference

Full REST API documentation for direct HTTP integration.